Skip to main content

EC2 Describe Instances

Describes the specified instances or all instances. If you specify instance IDs, the output includes information for only the specified instances. If you specify filters, the output includes information for only those instances that meet the filter criteria. If you do not specify instance IDs or filters, the output includes information for all instances, which can affect performance. We recommend that you use pagination to ensure that the operation returns quickly and successfully. If you specify an instance ID that is not valid, an error is returned. If you specify an instance that you do not own, it is not included in the output. Recently terminated instances might appear in the returned results. This interval is usually less than one hour. If you describe instances in the rare case where an Availability Zone is experiencing a service disruption and you specify instance IDs that are in the affected zone, or do not specify any instance IDs at all, the call fails. If you describe instances and specify only instance IDs that are in an unaffected zone, the call works normally.

External Documentation

To 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.
FiltersThe filters. affinity - The affinity setting for an instance running on a Dedicated Host (default
Instance IDsThe instance IDs, space separated list.
Default: Describes all your instances.

Input Example:
i-1234e73f7ce83d7ae i-058ae73f7ce2345ae.
QueryA JMESPath query to use in filtering the response data.

Querying uses JMESPath syntax to create expressions for filtering your output.
To learn JMESPath syntax, see Tutorial on the JMESPath website.

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 to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
Next TokenThe token to request the next page of results.

Automation Library Example

Detect Long Running Aws Ec2 Instances and Send Report to Slack

Automation LibraryPreview this Automation on desktop