Skip to content

Switch AWS IAM Roles to set envriomnent variables.

License

Notifications You must be signed in to change notification settings

cm-wada-yusuke/aws_swrole

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws_swrole

Switch AWS IAM Roles to set envriomnent variables.

Requirements

This plugin use these command line tools.

Install

Use fisher

fisher add jorgebucaran/fish-getopts
fisher add cm-wada-yusuke/aws_swrole

Usage

aws_swrole [-o] <aws profile>
  • Print AWS_XXX environments commands with -o option.
  • Without -o option to set AWS_XXX environments.

Example

$ aws_swrole
Usage: swrole [-o] <aws profile>

Defined profiles:
  development
  test
  staging
  production
$ aws_swrole development   
Enter MFA code > 123456

$ aws dynamodb list-tables --region ap-northeast-1
{
   "TableNames": [
       "Movies"
   ]
}
$ aws_swrole -o test
Enter MFA code > 123456
set -x AWS_ACCESS_KEY_ID XXXXXXXXXXXXXXXXXX
set -x AWS_SECRET_ACCESS_KEY YYYYYYYYYYYYYYYYYYYYYYYY
set -x AWS_SESSION_TOKEN ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

About

Switch AWS IAM Roles to set envriomnent variables.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%