Instance Metadata

(From the locally installed metadata service http://169.254.169.254/latest)

Metadata Path Metadata Value
/meta-data/instance-id i-19130215
/meta-data/placement/availability-zone us-west-2a
/meta-data/ami-id
ami-dfc39aef
/user-data
#!/bin/bash
wget -q --tries=10 --timeout=20 http://google.com
yum update -y
yum -y install httpd php
chkconfig httpd on
/etc/init.d/httpd start
cd /var/www/html
wget https://us-west-2-aws-training.s3.amazonaws.com/awsu-ilt/sys-ops/v2.0/lab-1-compute-linux/static/ec2-info.zip
unzip ec2-info.zip
echo 'UserData has been successfully executed.' >> /home/ec2-user/result