Because switching between AWS credentials is annoying with mfa.
Still beta
Before using the script you have to have aws access key and secret key present in ~/.aws/credentials
-
Install direnv or a clone but I've only tested in
direnv
. -
Create a
.envrc
file in your project with following configuration:
# .envrc
dotenv
It is safe to check-in to repository.
-
Add an empty
.env
file -
First use
dotenv-aws-mfa
- Once
.envrc
is reloaded you can just use
dotenv-aws-mfa -t <token>
DEBUG=dotenv-aws-mfa dotenv-aws-mfa -t <token>
Name | Description |
---|---|
DAM_USER | your AWS login username |
DAM_ACCOUNT | your AWS account number |
DAM_PROFILE | profile configured in AWS credentials |
DAM_ROLE | a role |
- Environment variables
- Arguments
- Interactive command line
To install locally just run:
yarn build; yarn global add $(pwd)
dotenv-aws-mfa