From the course: Amazon EC2 Essential Training

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Instance metadata

Instance metadata

- [Instructor] Let's talk about instance metadata. Instance metadata is data about your EC2 instance. It contains important attributes of your EC2 instance, such as the ami-id, hostname, instance-id, public-ipv4 address, security groups, and more. To retrieve instance metadata, you will need to access a specific IP address using the HTTP protocol. For IPv4, the URL is http://169.254.169.254/latest/meta-data. There is a similar URL for IPv6 as well. The IP address used by the metadata service is a special IP address known as the link local address, and it is only accessible by software running on the instance. Software or scripts running on your instance can access the metadata to get information such as hostname, public IP address, MAC address, and more. To access instance metadata, requests can be made in one of two versions. Version one, which is a request response method, and version two, which is a session oriented…

Contents