How to select a role in the AWS CLI
PreviousHow to get credentials for working locally, e.g. the AWS CLINextHow to get credentials for staff who aren't developers
Last updated
Last updated
Once you have , you need to configure the roles you want to use in ~/.aws/credentials
.
Append the contents of to your ~/.aws/credentials
file.
This contains a list of , e.g. a profile for the read-only role in the platform account:
The list is generated automatically by the create_account_role_config.py
script.
To select a role, pass the AWS_PROFILE
environment variable with the name of the profile.
For example, these S3 commands will run in the platform, catalogue, and workflow accounts, respectively: