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.
Last updated
Was this helpful?