Project/Repo:
Code Quality/CI:
This CLI will take your AWS credentials and output them in various formats.
The initial use case is for displaying your AWS credentials for use as the
Authorization
parameter in several AWS Redshift commands.
See Use Cases for all possible output formats.
aws-key-formatter
can be installed by running:
pip install aws-key-formatter
It requires Python 3.6+ to run.
You can, also, install via pipx
:
pipx install aws-key-formatter
To use your AWS credentials as the Authorization
parameter in a Redshift
command (See the Redshift docs):
$ aws-key-formatter redshift
ACCESS_KEY_ID '<access-key-id>'
SECRET_ACCESS_KEY '<secret-access-key>'
# If you want the session token included as well
$ aws-key-formatter redshift --token
ACCESS_KEY_ID '<access-key-id>'
SECRET_ACCESS_KEY '<secret-access-key>'
SESSION_TOKEN '<temporary-token>'
To use your AWS credentials as environment variables:
$ aws-key-formatter env
AWS_ACCESS_KEY_ID=<access-key-id>
AWS_SECRET_ACCESS_KEY=<secret-access-key>
# If you want the session token included as well
$ aws-key-formatter env --token
ACCESS_KEY_ID=<access-key-id>
SECRET_ACCESS_KEY=<secret-access-key>
SESSION_TOKEN=<temporary-token>