> For the complete documentation index, see [llms.txt](https://ibwpang.gitbook.io/aws-csa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ibwpang.gitbook.io/aws-csa/ec2-elastic-computing-cloud/417-ec2-instance-metadata.md).

# 4.17 EC2 Instance Metadata

This lab will show how can we access the metadata of an instance from CLI.

## Steps:

* Create a new EC2 instance, attach AmazonS3FullAccess IAM Role to it.
* SSH to your instance. Go to root user.
* Using "**curl** <http://169.254.169.254/latest/meta-data>" to see the metadata of this EC2 instance.
* You can use "**curl** <http://169.254.169.254/latest/meta-data/public-ipv4> **> mypublicip.html**" to get the public IP of the instance and write it into a html file. Then you can copy this file to S3 bucket and then use it to configure your Route53, all can be done by using bash commands. So now you can imagine how all of these parts can be connected and work together.
