How to Retrieve Metadata of AWS EC2 Machine?
Metadata is data about your EC2 instance that is used to manage and configure the instance. Developers use the metadata in the script in order to configure the instances and their resources.
Please login to your EC2 machine and run the following command:
# curl http://169.254.169.254/latest/meta-data
Curl command will retrieve the information associated with your EC2 machine, check the below image.
I have checked few metadata of the AWS EC2 machine, please check below:
[ec2-user@ip-172-31-2-247 ~]$ curl http://169.254.169.254/latest/meta-data/instance-id
OutPut: i-049a37cb6053d0813
Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.
Originally published at https://blog.webnersolutions.com on November 22, 2021.