The official AWS command line tools, have support for configuration profiles. See Configuring the AWS Command Line Interface - Named Profiles.
Managing multiple profiles with the AWS CLI itself is relatively straight forward, switching between them with --profile
flag on the command line or the AWS_PROFILE
environment variable.
These helpers extend that functionality for convenience with other tools in the ecosystem.
Configure the current shell with AWS configuration for a given aws-cli
profile.
aws-profile <profile_name>
Sets the following Environment Variables
AWS_PROFILE=<profile_name>
used byaws-cli
AWS_DEFAULT_REGION=<profiles_configured_region>
AWS_ACCESS_KEY_ID=<profiles_access_key_id>
AWS_SECRET_ACCESS_KEY=<profiles_secret_access_key>
Run a single command in a subshell configured for a specific aws-cli
profile.
with-aws-profile <profile_name> my --arbitrary command
Any command line tool which can understand the environment varibles set by aws-profile
should just work.