https://github.com/logicmonitor/vault-aws-formatter
This script is designed to format temporary AWS credentials generated by the Vault CLI into a foramt suitable for use by the AWS CLI.
https://github.com/logicmonitor/vault-aws-formatter
Last synced: 5 months ago
JSON representation
This script is designed to format temporary AWS credentials generated by the Vault CLI into a foramt suitable for use by the AWS CLI.
- Host: GitHub
- URL: https://github.com/logicmonitor/vault-aws-formatter
- Owner: logicmonitor
- License: mpl-2.0
- Created: 2018-04-18T18:39:22.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-18T23:06:45.000Z (about 8 years ago)
- Last Synced: 2024-12-30T00:13:28.091Z (over 1 year ago)
- Language: Python
- Size: 10.7 KB
- Stars: 1
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vault-aws-formatter
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