Elastic Compute Service
Metadata item | Description | Examples |
Metadata item | Description | Examples |
mac | MAC address of the instance | 00:16:3e:53:xx:xx |
hostname | Instance hostname | iv-ybo19qc2zqijuuub**** |
uuid | Unique identifier of the instance | 8508262e-df5a-11ec-9ec1-0c42a14c**** |
instance_id | Instance ID | i-ybo19qc2zqijuuub**** |
instance_type_id | Instance type | ecs.g1.large |
image_id | ID of the image used for instance startup | image-4ay4awvwifaqrvqd**** |
region_id | The ID of the region where the instance is located. | cn-beijing |
availability_zone | The availability zone where the instance is located. | cn-beijing_a |
private_ipv4 | The primary private IPv4 address of the primary network interface. | 192.XX.XX.2 |
eip_address | The EIP of the instance primary network interface. | 10.XX.XX.88 |
network/interfaces/macs/[mac]/primary_ip_address | The primary private IP address of the network interface. | 172.XX.XX.127 |
network/interfaces/macs/[mac]/eip_address | The list of EIPs associated with the instance. | 10.XX.XX.1 |
network/interfaces/macs/[mac]/vpc_id | The VPC ID of the instance. | vpc-mini07ggfxmo5smt1b5f**** |
network/interfaces/macs/[mac]/subnet_id | The subnet ID of the instance. | subnet-13g3mh3hjglj43n6nu5if**** |
network/interfaces/macs/[mac]/private_ip_addresses | The list of private IPv4 addresses assigned to network interfaces. | 172.XX.XX.127 |
network/interfaces/macs/[mac]/subnet_cidr_block | The subnet mask corresponding to the network interface. | 172.XX.XX.0/24 |
network/interfaces/macs/[mac]/gateway | IPv4 gateway address of the subnet where the network interface resides | 172.XX.XX.1 |
network/interfaces/macs/[mac]/interface_type | The network interface attribute. |
|
payment/charge_type | Billing method |
|
payment/created_at | The time when the instance is created. | 2022-4-30 13:39:12 |
payment/expired_at | The expiration date of the subscription-based instance. | 2022-5-30 13:39:12 |
network/interfaces/macs/[mac]/security_group_ids | The ID of the security group with which the instance associates. | sg-mini0ddjs3k05smt1b6n**** |
network/interfaces/macs/[mac]/security_group_names | The name of the security group with which the instance associates. | default |
block_devices | Disk ID list | vol-3tf33o3o254bwbhd**** |
block_devices/[volume_id]/device_type | You can query the volume type (Volume or local volume) based on the volume ID. |
|
serial_number | View the mapping relationship between Volume IDs and Volume serial numbers. | [{"serial_number":"3vqvpywv352tq1di****","volume_id":"vol-3vqvpywv352tq1di****"}] |
iam/security_credentials | The list of IAM roles associated with the instance. | ServiceRoleForECS |
spot_instance_termination_time | The interruption time of spot instances. | 2023-02-23T17:35:00Z |
instance_network_bandwith_baseline | The network baseline bandwidth (outbound/inbound), in Mbps. | 2560 |
instance_network_bandwith_maximum | The network peak bandwidth (outbound + inbound), in Mbps. | 12288 |
instance_network_throughput_maximum | The maximum throughput (outbound + inbound), in Kpps. | 150 |
Item | Normal Mode | Security Hardening Mode |
Item | Normal Mode | Security Hardening Mode |
Interaction mode | Request/Response | Session |
Security verification | Authentication of source IP address within the same VPC | Authentication of source IP address within the same VPC + Authentication of credentials for accessing instance metadata tip The access credentials have the following characteristics:
|
Viewing method | Direct access to the endpoint through commands | You must first obtain metadata access credentials for authentication, and then access the endpoint via a command. The request must contain the token header. |
Security | Relatively low tip Requests are authenticated based on IP addresses. Attackers can forge the source IP address of requests to bypass IP address authentication and launch SSRF attacks, posing a risk of instance metadata leakage. | Relatively high tip Before accessing metadata, you need to obtain the access credentials, which can only be generated within the ECS instance. The credentials are time-sensitive and apply only to specific instances. Attackers find them difficult to guess or forge, capable of preventing most SSRF attacks. |