-
-
Save huslage/b3ad0a9877348ce61e32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://sts.amazonaws.com/?Version=2011-06-15&Action=GetSessionToken&DurationSeconds=3600 | |
export AWS_VPC_ID=$(curl -sq http://169.254.169.254/latest/meta-data/network/interfaces/macs/$(curl -sq http://169.254.169.254/latest/meta-data/mac)/vpc-id) | |
export AWS_SECRET_ACCESS_KEY=$(curl -sq http://169.254.169.254/latest/meta-data/iam/security-credentials/training_ec2_deploy | jq -r .SecretAccessKey) | |
export AWS_ACCESS_KEY_ID=$(curl -sq http://169.254.169.254/latest/meta-data/iam/security-credentials/training_ec2_deploy | jq -r .AccessKeyId) | |
export AWS_SESSION_TOKEN=$(curl -sq http://169.254.169.254/latest/meta-data/iam/security-credentials/training_ec2_deploy | jq -r .Token) | |
az=$(curl -qs http://169.254.169.254/latest/meta-data/placement/availability-zone) | |
export AWS_DEFAULT_REGION=${az::-1} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment