Skip to main content
Retrieve information for specified EC2 instances. Note: Recently terminated instances might appear in the returned results.
External DocumentationTo learn more, visit the AWS documentation.

Basic Parameters

ParameterDescription
AWS RegionEnter the desired AWS Region.
If no Region is specified, and the requested service supports Regions, AWS routes the request to us-east-1 by default.
FiltersA JSON array of filters to narrow results.

Supports filtering by instance attributes like state, type, tags, network configuration, and more.

For the complete list of attributes to list by, visit AWS documentation.
Instance IDsA space-separated list of instance IDs to filter results by.
QueryA JMESPath query to filter results by.

Advanced Parameters

ParameterDescription
Disable XML To JSON Auto ConvertWhen checked, XML responses are not automatically converted into JSON format.
Dry RunChecks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
Max ResultsThe maximum number of results per call (5-1000).

Note: This parmaeter cannot be used with the Instance IDs parameter.
Next TokenA token from a previous call to retrieve the next page of results.

Example Output

{
	"Reservations": [
		{
			"ReservationId": "<string>",
			"OwnerId": "<string>",
			"Groups": [],
			"Instances": [
				{
					"Architecture": "<string>",
					"BlockDeviceMappings": [
						{
							"DeviceName": "<string>",
							"Ebs": {
								"AttachTime": "<string>",
								"DeleteOnTermination": true,
								"Status": "<string>",
								"VolumeId": "<string>"
							}
						}
					],
					"ClientToken": "<string>",
					"EbsOptimized": true,
					"EnaSupport": true,
					"Hypervisor": "<string>",
					"NetworkInterfaces": [
						{
							"Association": {
								"IpOwnerId": "<string>",
								"PublicDnsName": "<string>",
								"PublicIp": "<string>"
							},
							"Attachment": {
								"AttachTime": "<string>",
								"AttachmentId": "<string>",
								"DeleteOnTermination": true,
								"DeviceIndex": 219,
								"Status": "<string>",
								"NetworkCardIndex": 511
							},
							"Description": "<string>",
							"Groups": [
								{
									"GroupId": "<string>",
									"GroupName": "<string>"
								}
							],
							"Ipv6Addresses": [],
							"MacAddress": "<string>",
							"NetworkInterfaceId": "<string>",
							"OwnerId": "<string>",
							"PrivateDnsName": "<string>",
							"PrivateIpAddress": "<string>",
							"PrivateIpAddresses": [
								{
									"Association": {
										"IpOwnerId": "<string>",
										"PublicDnsName": "<string>",
										"PublicIp": "<string>"
									},
									"Primary": true,
									"PrivateDnsName": "<string>",
									"PrivateIpAddress": "<string>"
								}
							],
							"SourceDestCheck": true,
							"Status": "<string>",
							"SubnetId": "<string>",
							"VpcId": "<string>",
							"InterfaceType": "<string>",
							"Operator": {
								"Managed": false
							}
						}
					],
					"RootDeviceName": "<string>",
					"RootDeviceType": "<string>",
					"SecurityGroups": [
						{
							"GroupId": "<string>",
							"GroupName": "<string>"
						}
					],
					"SourceDestCheck": true,
					"StateReason": {
						"Code": "<string>",
						"Message": "<string>"
					},
					"Tags": [
						{
							"Key": "<string>",
							"Value": "<string>"
						}
					],
					"VirtualizationType": "<string>",
					"CpuOptions": {
						"CoreCount": 834,
						"ThreadsPerCore": 969
					},
					"CapacityReservationSpecification": {
						"CapacityReservationPreference": "<string>"
					},
					"HibernationOptions": {
						"Configured": false
					},
					"MetadataOptions": {
						"State": "<string>",
						"HttpTokens": "<string>",
						"HttpPutResponseHopLimit": 616,
						"HttpEndpoint": "<string>",
						"HttpProtocolIpv6": "<string>",
						"InstanceMetadataTags": "<string>"
					},
					"EnclaveOptions": {
						"Enabled": false
					},
					"PlatformDetails": "<string>",
					"UsageOperation": "<string>",
					"UsageOperationUpdateTime": "<string>",
					"PrivateDnsNameOptions": {
						"HostnameType": "<string>",
						"EnableResourceNameDnsARecord": false,
						"EnableResourceNameDnsAAAARecord": false
					},
					"MaintenanceOptions": {
						"AutoRecovery": "<string>"
					},
					"CurrentInstanceBootMode": "<string>",
					"NetworkPerformanceOptions": {
						"BandwidthWeighting": "<string>"
					},
					"Operator": {
						"Managed": false
					},
					"InstanceId": "<string>",
					"ImageId": "<string>",
					"State": {
						"Code": 361,
						"Name": "<string>"
					},
					"PrivateDnsName": "<string>",
					"PublicDnsName": "<string>",
					"StateTransitionReason": "<string>",
					"KeyName": "<string>",
					"AmiLaunchIndex": 329,
					"ProductCodes": [],
					"InstanceType": "<string>",
					"LaunchTime": "<string>",
					"Placement": {
						"GroupName": "<string>",
						"Tenancy": "<string>",
						"AvailabilityZone": "<string>"
					},
					"Platform": "<string>",
					"Monitoring": {
						"State": "<string>"
					},
					"SubnetId": "<string>",
					"VpcId": "<string>",
					"PrivateIpAddress": "<string>",
					"PublicIpAddress": "<string>"
				}
			]
		}
	]
}

Workflow Library Example

Detect Long Running Aws Ec2 Instances and Send Report to Slack
Workflow LibraryPreview this Workflow on desktop