EC2 Instance

An EC2 Instance is a virtual server in Amazon Web Services that provides resizable compute capacity in the cloud. It allows you to run applications on a wide range of instance types optimized for compute, memory, storage, or networking. EC2 Instances can be quickly launched, scaled, and terminated as needed, offering flexibility and cost efficiency for workloads ranging from small applications to large-scale enterprise systems.

aws.ec2_instance

Fields

TitleIDTypeData TypeDescription
_keycorestring
account_idcorestring
ami_launch_indexcoreint64The AMI launch index, which can be used to find this instance in the launch group.
architecturecorestringThe architecture of the image.
block_device_mappingscorejsonAny block device mapping entries for the instance.
boot_modecorestringThe boot mode that was specified by the AMI. If the value is uefi-preferred, the AMI supports both UEFI and Legacy BIOS. The currentInstanceBootMode parameter is the boot mode that is used to boot the instance at launch or start. The operating system contained in the AMI must be configured to support the specified boot mode. For more information, see Boot modes in the Amazon EC2 User Guide.
capacity_reservation_idcorestringThe ID of the Capacity Reservation.
capacity_reservation_specificationcorejsonInformation about the Capacity Reservation targeting option.
client_tokencorestringThe idempotency token you provided when you launched the instance, if applicable.
cpu_optionscorejsonThe CPU options for the instance.
current_instance_boot_modecorestringThe boot mode that is used to boot the instance at launch or start. For more information, see Boot modes in the Amazon EC2 User Guide.
ebs_optimizedcoreboolIndicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
elastic_gpu_associationscorejsonDeprecated. Amazon Elastic Graphics reached end of life on January 8, 2024.
elastic_inference_accelerator_associationscorejsonDeprecated Amazon Elastic Inference is no longer available.
ena_supportcoreboolSpecifies whether enhanced networking with ENA is enabled.
enclave_optionscorejsonIndicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.
hibernation_optionscorejsonIndicates whether the instance is enabled for hibernation.
hypervisorcorestringThe hypervisor type of the instance. The value xen is used for both Xen and Nitro hypervisors.
iam_instance_profilecorejsonThe IAM instance profile associated with the instance, if applicable.
image_idcorestringThe ID of the AMI used to launch the instance.
instance_arncorestring
instance_idcorestringThe ID of the instance.
instance_lifecyclecorestringIndicates whether this is a Spot Instance or a Scheduled Instance.
instance_typecorestringThe instance type.
ipv6_addresscorestringThe IPv6 address assigned to the instance.
kernel_idcorestringThe kernel associated with this instance, if applicable.
key_namecorestringThe name of the key pair, if this instance was launched with an associated key pair.
launch_template_datacorejsonThe instance data.
launch_timecoretimestampThe time that the instance was last launched. To determine the time that instance was first launched, see the attachment time for the primary network interface.
licensescorejsonThe license configurations for the instance.
maintenance_optionscorejsonProvides information on the recovery and maintenance options of your instance.
metadata_optionscorejsonThe metadata options for the instance.
monitoringcorejsonThe monitoring for the instance.
network_interfacescorejsonThe network interfaces for the instance.
network_performance_optionscorejsonContains settings for the network performance options for your instance.
operatorcorejsonThe service provider that manages the instance.
outpost_arncorestringThe Amazon Resource Name (ARN) of the Outpost.
placementcorejsonThe location where the instance launched, if applicable.
platformcorestringThe platform. This value is windows for Windows instances; otherwise, it is empty.
platform_detailscorestringThe platform details value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.
private_dns_namecorestring[IPv4 only] The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state. The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.
private_dns_name_optionscorejsonThe options for the instance hostname.
private_ip_addresscorestringThe private IPv4 address assigned to the instance.
product_codescorejsonThe product codes attached to this instance, if applicable.
public_dns_namecorestringThe public DNS name assigned to the instance. This name is not available until the instance enters the running state. This name is only available if you've enabled DNS hostnames for your VPC. The format of this name depends on the public hostname type.
public_ip_addresscorestringThe public IPv4 address, or the Carrier IP address assigned to the instance, if applicable. A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.
ramdisk_idcorestringThe RAM disk associated with this instance, if applicable.
root_device_namecorestringThe device name of the root device volume (for example, /dev/sda1).
root_device_typecorestringThe root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
security_groupscorejsonThe security groups for the instance.
source_dest_checkcoreboolIndicates whether source/destination checking is enabled.
spot_instance_request_idcorestringIf the request is a Spot Instance request, the ID of the request.
sriov_net_supportcorestringSpecifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.
statecorejsonThe current state of the instance.
state_reasoncorejsonThe reason for the most recent state transition.
state_transition_reasoncorestringThe reason for the most recent state transition. This might be an empty string.
subnet_idcorestringThe ID of the subnet in which the instance is running.
tagscorehstore
tpm_supportcorestringIf the instance is configured for NitroTPM support, the value is v2.0. For more information, see NitroTPM in the Amazon EC2 User Guide.
usage_operationcorestringThe usage operation value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.
usage_operation_update_timecoretimestampThe time that the usage operation was last updated.
virtualization_typecorestringThe virtualization type of the instance.
vpc_idcorestringThe ID of the VPC in which the instance is running.