-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load aws credentials from env vars or instance profile #7
Conversation
…tance Profile by making the credentials non-mandatory
Load aws credentials from env vars or instance profile
Thanks for the pull request! Will update the plugin within my environment and use several days (1.1 to 1.7 is huge jump). If everything is fine, I'll release the new version. |
:secret_access_key => @aws_sec_key | ||
} | ||
if @aws_key_id && @aws_sec_key | ||
options[:access_key_id] = @aws_key_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the 'options' variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damm, could you fix it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, my fault, merge error. Should be after the super
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the fix is already committed by @repeatedly 👍
cool, thx @repeatedly |
# This is the 1st commit message: # This is a combination of 3 commits. # This is the 1st commit message: # This is a combination of 3 commits. # This is the 1st commit message: Out S3 change so that user can use minimal policy at AWS, to work with fluentd like S3:PutObject # This is the commit message fluent#2: Spacing handled in out-S3 plugin # This is the commit message fluent#3: Identation modified # This is the commit message fluent#4: Introduce check_bucket paramater To skip the using of auto_create_bucket for bucket existence checking # This is the commit message fluent#5: Fixes: Test cases added. README has been modified with check_bucket's usage and sample AWS policy. # This is the commit message fluent#6: Fixes: Issues for extra spoaces. Modified # This is the commit message fluent#7: Spacing issues # This is the commit message fluent#8: Update test_out_s3.rb # This is the commit message fluent#9: time slicer modified for utc also # This is the commit message fluent#10: removing test cases # This is the commit message fluent#1: renaming time_slicer variable # This is the commit message fluent#2: Test casees added Test cases for out_s3 plugin has been added. This feature will work with hardened S3 policy like with only PutObject permission. As it will not check bucket existence not even object existence, as for each object creation it will name it with timestamp. So anyhow it will be unique everytime. Only thing it willl assume that bucket is created already. # This is the commit message fluent#3: Some variable renamed # This is the commit message fluent#2: Clean up dependencies # This is the commit message fluent#3: Update README for placeholders # This is the commit message fluent#2: v0.8.0.rc1
AWS supports loading credentials via env variables[1] and the IAM Instance Profile[2]. To achieve this you simply don't give aws any credentials.
To enable this feature I had to make the credentials non-mandatory. As they work as a pair I don't provide either unless they are both present.
Support for IAM Instance Role security is supported from aws-sdk 1.5.3 [3], I've upgraded to 1.7.1 which is currently the latest.
[1] http://docs.amazonwebservices.com/AWSRubySDK/latest/AWS/Core/CredentialProviders/ENVProvider.html
[2] http://docs.amazonwebservices.com/AWSRubySDK/latest/frames.html
[3] http://aws.amazon.com/releasenotes/0304005114813505