rik2803 / aws-sts-assumerole Goto Github PK
View Code? Open in Web Editor NEWBash script to easily set shell environment with temporary access tokens using a config file and the AWS credentials file
License: MIT License
Bash script to easily set shell environment with temporary access tokens using a config file and the AWS credentials file
License: MIT License
Set custom environment variables in the assumerole
shell if defined in the
assumerole profile in the configuration file:
"aws_profile": "my-bastion",
"aws_account": "123456789012",
"aws_mfa_arn": "arn:aws:iam::123456789012:mfa/me",
"aws_role": "admin",
"environment": [
{
"name": "MYVAR1",
"value": "MYVALUE1"
},
{
"name": "MYVAR1",
"value": "MYVALUE1"
}
]
},
...
aws-ssh ecs
returns the ssh commands that can be used to connect to a ECS host.
It would be nice if a prompt would be displayed and the host to connect to could be selected by entering a number.
I understand that it's not too hard error, but still:
$ assumerole my_profile
jq: error: Could not open file /Users/houdini/.assumerole: No such file or directory
Select from these available accounts:
jq: error: Could not open file /Users/houdini/.assumerole: No such file or directory
jq: error: Could not open file /Users/houdini/.assumerole: No such file or directory
jq: error: Could not open file /Users/houdini/.assumerole: No such file or directory
jq: error: Could not open file /Users/houdini/.assumerole: No such file or directory
jq: error: Could not open file /Users/houdini/.assumerole: No such file or directory
jq: error: Could not open file /Users/houdini/.assumerole: No such file or directory
jq: error: Could not open file /Users/houdini/.assumerole: No such file or directory
MFA token: ^C
When a full path to a SSH private key is available in a profile, try to load it.
Things to take into account:
Currently the environment variable AWS_ACCOUNT is set to the name of the account. It would be nice if the variable AWS_ACCOUNT_ID would be set to the ID of the account. This can be used to create unique global resource names such as S3 bucket names.
How about using this script without enabling MFA?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.