Created
April 20, 2018 15:34
-
-
Save omar-yassin/1e4ee1e25574aa3a1d26b22ad1f1a5f0 to your computer and use it in GitHub Desktop.
aws ec2 metadata
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
INSTANCE_ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id) | |
AWS_AZ=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone) | |
AWS_REGION="${AWS_AZ::-1}" | |
AWS_CMD="aws --region ${AWS_REGION} --output json" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment