Skip to content

Generate AWS sts token and add it to the credentials file.

Notifications You must be signed in to change notification settings

4p00rv/aws-sts-token-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

AWS STS token generator

Generates sts token using aws sts cmd and updates the credentials file. After successfully generating the credentials, the new credentials are written under new profile ("mfa") which can be changed in the aws_get_token.rb file.

Usage:

$ ./aws_get_token.rb --token 123456

Duration and profile to be used for generating token can be specified as:

$ ./aws_get_token.rb --duration 14400 --profile s3_access --token 123456

Instructions:

Please modify the file (aws_get_token.rb) to specify your mfa device id and corresponding profile. For example:

MFA_DEVICE_TO_PROFILE_MAP = {
  'default' => 'arn:aws:iam::123456789012:mfa/user',
  's3_access' => 'arn:aws:iam::123456789012:mfa/otheruser'
}

About

Generate AWS sts token and add it to the credentials file.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages