Created
November 16, 2016 15:41
-
-
Save nathansgreen/33fc50aaa82f18a0a035b84926cd7b65 to your computer and use it in GitHub Desktop.
AWS ElasticBeanstalk Instance Name
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
#!/usr/bin/bash | |
export INSTANCE_ID=$(curl http://169.254.169.254/latest/meta-data/instance-id) | |
export INSTANCE_NAME=$( ec2-describe-instances ${INSTANCE_ID} |grep -E "^TAG.+" |cut -f 4,5 |grep -E "^Name" |cut -f 2 ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment