CLI script to get security credentials as part of using MFA to protect programmatic calls to specific AWS API operations.
awscrd -p {profile name} -t {MFA token}
AWS credentials are assumed to be in ~./aws/credentials
per standard guidance from AWS. Refer to the docs for info.
Session token and other security credentials are written to ~/.creds
which suits my workflow at Big Health.
These file locations can be changed in ./awscrd/conf.py
.
# create a venv
virtualenv -p python3.7 venv
# activate the venv
source venv/bin/activate
# install dependencies
poetry install
To bundle your script with setuptools for dev purposes run:
pip3 install --editable .
To setup the script to run from any directory, run this in your home directory:
pip3 install --editable /Users/{username}/path/to/awscrd