Skip to content

Instantly share code, notes, and snippets.

@andresaaap
Last active March 30, 2020 16:16
Show Gist options
  • Save andresaaap/5ef3e6e55e6cbf5ebc338a68709dff80 to your computer and use it in GitHub Desktop.
Save andresaaap/5ef3e6e55e6cbf5ebc338a68709dff80 to your computer and use it in GitHub Desktop.
UserDate for Udacity Cloud DevOps Deploy a high-availability web app using CloudFormation Project
UserData:
Fn::Base64: !Sub |
#!/bin/bash -xe
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
apt update -y
apt install -y apache2
systemctl start apache2
systemctl enable apache2
rm ../../var/www/html/index.html
wget -P ../../var/www/html https://s3.us-east-2.amazonaws.com/test-udagram-1/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment