Open nprbsg opened 9 years ago
I've structured the code so that existing configurations that explicitly set :access_key_id
and :secret_access_key
will still work as expected.
Thanks for the PR! Can you write some quick specs for this, please? :)
Ok? I mean I could I guess, but currently there's no corpus of specs to add to so it'd be a little hard to know what was adequate.
AWS-SDK provides robust support for finding credentials in standard places in the process's context, including well-known environment variables and EC2 metadata when IAM instance profiles are in use. Additionally, there are more options that a user may want to specify to the
AWS.config()
method (e.g.:region
), which is possible now by set a hash value for the:aws_connect_options
.Using these features together, it is possible also to explicitly assume an IAM role in a capistrano configuration like this:
The initial call to
AWS.config
uses credentials from the environment, and then the gem will uses the credentials that result from the STS AssumeRole call.