Open petemounce opened 8 years ago
Hi @petemounce, to clarify: does your s3_website.yml
snippet work? If it does, what advantages do you see in s3_website having a "built-in" support for IAM Roles (instead of supporting IAM Roles via scripting like yours)?
@laurilehmijoki sadly, the snippet does not work. That was so that I could use the ruby aws-sdk to read the credentials from my profile's AWS credentials file rather than set up environment variables. I work with around a dozen different accounts, so maintaining environment variables is too dangerous a route towards working in one account when I expect to be in another.
By the way, in the doing of this I've come up with a least-priv set of IAM to create in a managed policy - would you like a PR to your doc about that?
If you think your AWS credentials setup benefits other users, please consider adding it to setting-up-aws-credentials.md and submitting a pull request.
About the ~/.aws/credentials
feature: I think it would be a good idea to grow s3_website to support that, but unfortunately due to my other commitments I don't have time to work on that right now. A pull request is of course appreciated.
Where I am, we grant read permissions to users for general use, and then allow them to
sts:AssumeRole
to elevate to granular write permissions that are attached toIAM::Role
resources.The AWS CLI supports this via the
~/.aws/credentials
file like soThe SDKs also have support for this sort of thing - ruby & java too.
Please could
s3_website
grow this capability? At the moment if I try temporarily granted session credentials from assuming my role, I get:I'm doing that by, in
s3_website.yml
: