Instance identity documents for Amazon EC2 instances
Each instance that you launch has an instance identity document that provides information about the instance itself. You can use the instance identity document to validate the attributes of the instance.
The instance identity document is generated when the instance is stopped and started, restarted, or launched. You can access the instance identity document for an instance through the Instance Metadata Service (IMDS). For the instructions, see Retrieve the instance identity document.
The instance identity document uses plaintext JSON format. It includes the following information.
Data | Description |
---|---|
accountId |
The ID of the AWS account that launched the instance. |
architecture |
The architecture of the AMI used to launch the instance (i386 | x86_64 | arm64). |
availabilityZone |
The name of the Availability Zone in which the instance is running. For example, |
billingProducts |
The billing products of the instance. |
devpayProductCodes |
Deprecated. |
imageId |
The ID of the AMI used to launch the instance. |
instanceId |
The ID of the instance. |
instanceType |
The instance type of the instance. |
kernelId |
The ID of the kernel associated with the instance, if applicable. |
marketplaceProductCodes |
The AWS Marketplace product code of the AMI used to launch the instance. |
pendingTime |
The date and time that the instance was launched. |
privateIp (deprecated) |
The private IP address of the instance. For IPv4-only and dual-stack instances, this contains the IPv4 address.
For IPv6-only instances, this contains the IPv6 address. This field is deprecated; use |
primaryIPv6Address |
The IPv6 address associated with the instance's primary network interface. This field contains the IPv6 address
for IPv6-only and dual-stack instances, and is |
privateIPv4Address |
The IPv4 address associated with the instance's primary network interface. This field contains the IPv4 address
for IPv4-only and dual-stack instances, and is |
ramdiskId |
The ID of the RAM disk associated with the instance, if applicable. |
region |
The Region in which the instance is running. |
version |
The version of the instance identity document format. |
Note
The privateIp
field is deprecated but maintained for backward compatibility. For new implementations, use privateIPv4Address
to access the IPv4 address or primaryIPv6Address
to access the IPv6 address.