Last active
November 9, 2022 03:12
-
-
Save shamal/10c918c72cc5e6b7c6d68e46403c223d to your computer and use it in GitHub Desktop.
AWS EC2 Userdata: httpd, mount EFS, write index.html
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 httpd -y | |
chkconfig httpd on | |
sudo yum install -y amazon-efs-utils | |
sudo mount -t efs YOUR_EFS_ENDPOINT:/ /var/www/html | |
echo '<html><h1>Hello World!</h1><html>' > /var/www/html/index.html | |
service httpd start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment