Created
August 20, 2017 19:10
-
-
Save gaurish/ad03481ce9b296951d20ab84850f40f2 to your computer and use it in GitHub Desktop.
Revisions
-
gaurish created this gist
Aug 20, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ #!/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