Skip to content

pubg/sts2credentials-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sts2credentials-go

Seamlessly converts role assumption outputs from AWS CLI AssumeRole or Vault AWS Secret Engine into an AWS cli credentials.

How to install

Download from Release and move binary to PATH

How to use

AWS Assume Role

aws sts assume-role \
  --role-arn=arn:aws:iam::123456789012:role/foo-role \
  --role-session-name=bar-name | sts2credentials

AWS Get Session Token (MFA)

aws sts get-session-token \
--serial-number=arn:aws:iam::123456789012:mfa/foo-user \
--token-code=123456 | sts2credentials

Vault AWS Secret Engine

vault read aws/creds/my-role -format=json | sts2credentials

Options

--profile (Default sts)

Change target profile name

aws sts assume-role \
  --role-arn=arn:aws:iam::123456789012:role/foo-role \
  --role-session-name=bar-name --profile=default | sts2credentials --profile=myprofile

--help

shows help message

References

This tool has been recoded to this Git Repository