Environment variables error for AWS secret_access_key


(Erik) #1

Hey guys :),,

I am using the S3 plugin (logstash-input-s3) . I would like to use environment variables for the AWS_ACCESS_KEY_ID and the AWS_SECRET_ACCESS_KEY variables, but I am getting an error with the secret access key. My config:

access_key_id => "${AWS_ACCESS_KEY_ID}"
secret_access_key => "${AWS_SECRET_ACCESS_KEY}"

The error I get:

Plugin: <LogStash::Inputs::S3 bucket=>"<bucket-name>", access_key_id=>"<access-key>" secret_access_key=>"{<secret-access-key>}", codec=><LogStash::Codecs::Multiline pattern=>"Started", negate=>true, what=>"previous", id=>"af4b25dabcd7b02460edde8b5529e818b7314e12-1", enable_metric=>true, charset=>"UTF-8", multiline_tag=>"multiline", max_lines=>500, max_bytes=>10485760>, id=>"af4b25dabcd7b02460edde8b5529e818b7314e12-2", enable_metric=>true, region=>"us-east-1", delete=>false, interval=>60, temporary_directory=>"/tmp/logstash">

So it's working fine for the AWS_ACCESS_KEY_ID , but not for the AWS_SECRET_ACCESS_KEY, it puts the right secret key there, but with the brackets {} .

Does someone know how to fix this?


(Christian Dahlqvist) #2

Looks like you are missing a curly brace after AWS_SECRET_ACCESS_KEY.


(Erik) #3

Oeps, my bad. I have the last bracket in my config, something went wrong with the copy paste.

Updated: secret_access_key => "${AWS_SECRET_ACCESS_KEY}"
And unfortunately it is not working


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.