awscli-addons relies on the standard AWS configuration files and environment variables, meaning it works seamlessly with your existing setup.
The tool reads from standard AWS locations:
- Environment variables (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_SESSION_TOKEN). - Your local credentials file (
~/.aws/credentials). - Your local configuration file (
~/.aws/config).
You can explicitly target specific profiles using the -p or --profile flag on most commands:
awscli-addons whoami --profile productionTo use the tool as aws addons <command>, you need to register it in the AWS CLI alias file. The installer script does this automatically, but if you need to do it manually:
-
Open or create the file at
~/.aws/cli/alias. -
Add the following block:
[toplevel] addons = !awscli-addons
Once saved, aws addons myip will pass the execution seamlessly to the awscli-addons binary.
You can use the built-in configuration tool to set up new profiles interactively, similar to aws configure:
awscli-addons configure --profile new-dev-profile