Created
August 20, 2017 19:10
-
-
Save gaurish/ad03481ce9b296951d20ab84850f40f2 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
#!/bin/bash | |
yum update -y | |
yum install httpd24 -y | |
service httpd start | |
chkconfig httpd on | |
EC2_AVAIL_ZONE=`curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone` | |
INSTANCE_ID=`curl -s http://169.254.169.254/latest/meta-data/instance-id/` | |
echo "<html><body><h1>Hello, this is Instance ID | |
${INSTANCE_ID} located in ${EC2_AVAIL_ZONE}</h1></body></html>" > /var/www/html/index.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment