Created
January 24, 2018 19:49
-
-
Save ibejohn818/f8f904cb52d1e81f4983a561183ea6bb to your computer and use it in GitHub Desktop.
ec2 metadata get region
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
EC2_REGION="`curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone | sed -e 's:\([0-9][0-9]*\)[a-z]*\$:\\1:'`" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment