0.0.14 • Published 4 years ago

dotenv-aws-mfa v0.0.14

Weekly downloads
107
License
MIT
Repository
github
Last release
4 years ago

Why

Because switching between AWS credentials is annoying with mfa.

Status

Still beta

Prerequisite

Before using the script you have to have aws access key and secret key present in ~/.aws/credentials

How

  1. Install direnv or a clone but I've only tested in direnv.

  2. Create a .envrc file in your project with following configuration:

# .envrc
dotenv

It is safe to check-in to repository.

  1. Add an empty .env file

  2. First use

dotenv-aws-mfa
  1. Once .envrc is reloaded you can just use
dotenv-aws-mfa -t <token>

Something is not right

DEBUG=dotenv-aws-mfa dotenv-aws-mfa -t <token>

Under the hood

Environment variables

NameDescription
DAM_USERyour AWS login username
DAM_ACCOUNTyour AWS account number
DAM_PROFILEprofile configured in AWS credentials
DAM_ROLEa role

Order of precedence

  1. Environment variables
  2. Arguments
  3. Interactive command line

Fancy contribute

To install locally just run:

yarn build; yarn global add $(pwd)
dotenv-aws-mfa
0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.1-alpha

4 years ago