@korourke/awsmfa
Utility to fetch temp AWS credentials & merge into .env file
Last updated 5 months ago by korourke .
Unlicense · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @korourke/awsmfa 
SYNC missed versions from official npm registry.

@korourke/awsmfa

npm version License: Unlicense

Fetch temporary AWS session credentials for an MFA-protected account, and merge them into local dotenv file (.env).

Installation

$ npm i -g @korourke/awsmfa

Prerequisites

Your aws credentials file should have at least one profile, configured with an aws_access_key_id and aws_secret_access_key:

[default]
aws_access_key_id=EXAMPLEACCESSKEYID
aws_secret_access_key=exampleSecretAccessKey

Usage

Running this script will retrieve session credentials with the passed MFA token/code, then populate the .env file in the current working directory with AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN. If a .env file already exists these values will be merged into the existing file, and all other variables and comments will be preserved.

Basic usage (profile [default]):

$ awsmfa <MFA_CODE>

Usage with other options:

$ awsmfa --profile some.profile --duration-hours 12 <MFA_CODE>

Current Tags

  • 1.0.1                                ...           latest (5 months ago)

2 Versions

  • 1.0.1                                ...           5 months ago
  • 1.0.0                                ...           5 months ago
Maintainers (1)
Downloads
Today 2
This Week 2
This Month 2
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |