This file contains hidden or 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
| #!/bin/sh | |
| export AWS_PAGER="" | |
| subnetId=$1 | |
| if [ -z "$subnetId" ] | |
| then | |
| echo "No subnet ID provided. Please provide a subnet ID as an argument." | |
| exit 1 | |
| fi |
This file contains hidden or 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
| unset AWS_ACCESS_KEY_ID && unset AWS_SECRET_ACCESS_KEY && unset AWS_SESSION_TOKEN && eval $(aws sts assume-role --role-arn "arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME" --role-session-name "gc-local-shell" | jq -r '"export AWS_ACCESS_KEY_ID=\"" + .Credentials.AccessKeyId + "\"\nexport AWS_SECRET_ACCESS_KEY=\"" + .Credentials.SecretAccessKey + "\"\nexport AWS_SESSION_TOKEN=\"" + .Credentials.SessionToken + "\""') |
OlderNewer