Meta-data configuration instructions for AWS EC2 (instance metadata)

There is a magic IP 169.254.169.254 in the EC2 instance. By visiting this ip, you can get a lot of information related to this instance, which is called meta-data.

We send it on the EC2 instance: curl http://169.254.169.254/latest/meta-data/

You can see the related meta-data, as follows:

ami-id
ami-launch-index
ami-manifest-path
block-device-mapping/
events/
hostname
iam/
identity-credentials/
instance-action
instance-id
instance-type
local-hostname
local-ipv4
mac
metrics/
network/
placement/
profile
public-hostname
public-ipv4
public-keys/
reservation-id
security-groups
services

Most of the information can know what information is returned by looking at the name.

The specific content can be viewed: https://docs.amazonaws.cn/AWSEC2/latest/UserGuide/ec2-instance-metadata.html

 

Guess you like

Origin blog.csdn.net/Swallow_he/article/details/105711779