Skip to content

Instantly share code, notes, and snippets.

@jmsktm
Created August 30, 2013 07:01
Show Gist options
  • Save jmsktm/6387006 to your computer and use it in GitHub Desktop.
Save jmsktm/6387006 to your computer and use it in GitHub Desktop.
AWS instance information
#/bin/bash
echo "AMI ID: $(curl http://169.254.169.254/latest/meta-data/ami-id)\n"
echo "AMI LAUNCH INDEX: $(curl http://169.254.169.254/latest/meta-data/ami-launch-index)\n"
echo "AMI MANIFEST PATH: $(curl http://169.254.169.254/latest/meta-data/ami-manifest-path)\n"
echo "BLOCK DEVICE MAPPING: $(curl http://169.254.169.254/latest/meta-data/block-device-mapping/)\n"
echo "HOSTNAME: $(curl http://169.254.169.254/latest/meta-data/hostname)\n"
echo "INSTANCE ACTION: $(curl http://169.254.169.254/latest/meta-data/instance-action)\n"
echo "INSTANCE ID: $(curl http://169.254.169.254/latest/meta-data/instance-id)\n"
echo "INSTANCE TYPE: $(curl http://169.254.169.254/latest/meta-data/instance-type)\n"
echo "KERNEL ID: $(curl http://169.254.169.254/latest/meta-data/kernel-id)\n"
echo "LOCAL HOSTNAME: $(curl http://169.254.169.254/latest/meta-data/local-hostname)\n"
echo "LOCAL IPV4: $(curl http://169.254.169.254/latest/meta-data/local-ipv4)\n"
echo "MAC: $(curl http://169.254.169.254/latest/meta-data/mac)\n"
echo "METRICS: $(curl http://169.254.169.254/latest/meta-data/metrics/)\n"
echo "NETWORK: $(curl http://169.254.169.254/latest/meta-data/network/)\n"
echo "PLACEMENT: $(curl http://169.254.169.254/latest/meta-data/placement/)\n"
echo "PROFILE: $(curl http://169.254.169.254/latest/meta-data/profile)\n"
echo "PUBLIC HOSTNAME: $(curl http://169.254.169.254/latest/meta-data/public-hostname)\n"
echo "PUBLIC IPV4: $(curl http://169.254.169.254/latest/meta-data/public-ipv4)\n"
echo "PUBLIC KEYS: $(curl http://169.254.169.254/latest/meta-data/public-keys/)\n"
echo "RESERVATION ID: $(curl http://169.254.169.254/latest/meta-data/reservation-id)\n"
echo "SECURITY GRUOPS: $(curl http://169.254.169.254/latest/meta-data/security-groups)\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment