Last active
November 2, 2016 12:50
-
-
Save belminf/60cf6bf58d868a50c905a85b30037368 to your computer and use it in GitHub Desktop.
EC2 user-data apache bootstrap
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
#!/bin/bash | |
yum update -y | |
yum install -y httpd jq | |
service httpd start | |
chkconfig httpd on | |
echo "<html><head><title>Test page</title></head><body><h1>From $(curl http://169.254.169.254/latest/dynamic/instance-identity/document 2> /dev/null | jq '.region' | sed 's/"//g' ): Hello world</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