mfaws

A cli tool to manage multi-factor IAM User authentication for the AWS CLI.

Usage no npm install needed!

<script type="module">
  import mfaws from 'https://cdn.skypack.dev/mfaws';
</script>

README

mfaws npm

Easy MFA access for AWS IAM Users for the AWS CLI.

Works with any AWS tool that reads from ~/.aws/credentials (e.g. SDKs, CDK, SAM, CodeCommit GRC).

Install

Install with NPM: npm i -g mfaws

Usage

Each example below assumes that you have run aws configure and have set an access key id and secret access key.

All mfaws commands can be run with the --profile flag to select a user profile.

Set credentials
$ mfaws set
? Enter your MFA Code: ยป 012345

Expiration: 5/4/2020, 9:18:29 AM

$ aws ... // This call is MFA authenticated
Restore original credentials
$ mfaws restore

$ aws ... // This call is not MFA authenticated