Skip to content

Instantly share code, notes, and snippets.

@robsonbittencourt
Created October 15, 2014 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robsonbittencourt/ea0a404d8b850ec2c6ab to your computer and use it in GitHub Desktop.
Save robsonbittencourt/ea0a404d8b850ec2c6ab to your computer and use it in GitHub Desktop.
A user data sample for AWS Launch Configuration
#!/bin/bash
yum groupinstall -y "Web Server"
service httpd start
instance_id=$(curl http://169.254.169.254/latest/meta-data/instance-id)
echo "<h3>I'am the instance $instance_id</h3>" > /var/www/html/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment