An open API service indexing awesome lists of open source software.

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.

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