Format temporary AWS credentials generated by the Vault CLI into a format suitable for the AWS CLI.
4.1K
This script is designed to format temporary AWS credentials generated by the Vault CLI into a format suitable for use by the AWS CLI.
A typical workflow uses the Vault CLI to generate a set of AWS credentials in json format, piping the output to this script, and then making that output available to the AWS CLI via either environment variables or AWS configuration files.
NOTE: These examples assume you have a properly configured Vault CLI environment with an active Vault client token and as at least one AWS secret backend configured.
For more information about configuring the Vault CLI, see: https://www.vaultproject.io/docs/commands/index.html
Inject AWS credentials as environment variables:
$(vault read -format=json aws/creds/test | vault_aws_formatter.py --format environment)
Inject AWS credentials into the AWS credentials file:
vault read -format=json aws/creds/test | vault_aws_formatter.py --format file > ~/.aws/credentials
Inject AWS credentials into the AWS credentials file with a custom profile name:
vault read -format=json aws/creds/test | vault_aws_formatter.py --format file --profile test > ~/.aws/credentials
Content type
Image
Digest
Size
49.3 MB
Last updated
over 8 years ago
docker pull logicmonitor/vault-aws-formatter