项目作者: 4p00rv

项目描述 :
Generate AWS sts token and add it to the credentials file.
高级语言: Ruby
项目地址: git://github.com/4p00rv/aws-sts-token-generator.git
创建时间: 2018-07-31T02:18:03Z
项目社区:https://github.com/4p00rv/aws-sts-token-generator

开源协议:

下载


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:

  1. MFA_DEVICE_TO_PROFILE_MAP = {
  2. 'default' => 'arn:aws:iam::123456789012:mfa/user',
  3. 's3_access' => 'arn:aws:iam::123456789012:mfa/otheruser'
  4. }