Skip to content

A fish plugin for updating your AWS env vars with MFA login

License

Notifications You must be signed in to change notification settings

antonwinter/plugin-awsmfa

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

awsmfa

A plugin for Oh My Fish.

Fish Shell Version Oh My Fish Framework license


Gets and sets temporary credentials for an AWS account or IAM user when using an MFA-enabled account.

Install

$ omf install https://github.com/antonwinter/plugin-awsmfa

Configuration

In ~/.aws/config, ensure you have the mfa_serial in each profile that you want to use awsmfa with as per the AWS CLI Using Multi-Factor Authentication Docs.

Usage

$ awsmfa                  Generates temporary credentials for the default aws profile
$ awsmfa [profile_name]   Generates temporary credentials for the aws profile of a provided name

awsmfa sets the env var $AWS_SESSION_EXPIRY, so running awsmfa again will only prompt for a token is its expired. Run the function __awsmfa_clear_variables if you want to clear them.

$ awsmfa
AWS_SESSION_TOKEN is still valid but will expire at 2017-12-01T06:14:57Z

License

© David Gillies et al

About

A fish plugin for updating your AWS env vars with MFA login

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%