-
Notifications
You must be signed in to change notification settings - Fork 148
Authenticate to AWS using custom profile #101
Comments
I'll look into this... prefer to be able to have it automatically pick one up. |
When dealing with multiple accounts, sometimes there is no default. There are really 2 things needed to be complete:
So in my case, I have keys for an account, but need to assume a role in another account to perform the operation. For instance my config might look like this:
My S3 operation on the CLI might look like this:
Under the hood, the CLI uses the If you can support both these case, you'll be perfect. The SDK does the first one automatically for you if you use the default credentials provider chain. The STS role assumption stuff you'll need to add more code for. |
Here is an example diff that lets me set role-arn via the CLI. It would be more ideal to respect the aws config files properly, but this is a quick workaround. I haven't yet figured out where to put the force_path_style option for the STS connection. |
Nobody parses the config file except the aws cli that I have found. I did something similar for unicreds here. Your patch looks more or less correct. The role arn is just an updated config you use in the client setup. The |
Allow users to provide a profile name to use when authenticating against AWS
The text was updated successfully, but these errors were encountered: