These are python 2 and 3 snippets showing how to generate headers to authenticate with HashiCorp's Vault using the AWS authentication method. There's also a Ruby implementation which uses version 3 of the AWS SDK for Ruby.
The python scripts look for credentials in the
default boto3 locations;
if you need to supply custom credentials (such as from an AssumeRole call), you would use the
botocore.session.set_credentials
method before calling create_client.
This documentation aims at being a quick-straight-to-the-point-hands-on AWS resources manipulation with [boto3][0].
First of all, you'll need to install [boto3][0]. Installing it along with [awscli][1] is probably a good idea as
- [awscli][1] is boto-based
- [awscli][1] usage is really close to boto's
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -e | |
| # Inspired by: https://github.com/adrienthebo/git-tools/blob/master/git-truncate | |
| if [[ (-z $1) || (-z $2) ]]; then | |
| echo "Usage: $(basename "$0") DROP_AT_SHA1 BRANCH" | |
| exit 1 | |
| fi | |
| if [[ ! $1 =~ ^[0-9a-f]{7,40}$ ]]; then | |
| echo "Error: invalid Git commit SHA1" >&2 |