Skip to content

aws.ec2.describe_instance_status

Example SQL Queries

SELECT * FROM
aws.ec2.describe_instance_status;

Description

Describes the status of the specified instances or all of your instances. By default, only running instances are described, unless you specifically indicate to return the status of all instances.

Instance status includes the following components:

  • Status checks - Amazon EC2 performs status checks on running EC2 instances to identify hardware and software issues. For more information, see Status checks for your instances and Troubleshoot instances with failed status checks in the Amazon EC2 User Guide.

  • Scheduled events - Amazon EC2 can schedule events (such as reboot, stop, or terminate) for your instances related to hardware issues, software updates, or system maintenance. For more information, see Scheduled events for your instances in the Amazon EC2 User Guide.

  • Instance state - You can manage your instances from the moment you launch them through their termination. For more information, see Instance lifecycle in the Amazon EC2 User Guide.

The order of the elements in the response, including those within nested structures, might vary. Applications should not assume the elements appear in a particular order.

Table Definition

Column NameColumn Data Type
dry_run Input Column

Checks 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.

BOOLEAN
filters Input Column

The filters.

  • availability-zone - The Availability Zone of the instance.

  • event.code - The code for the scheduled event (instance-reboot | system-reboot | system-maintenance | instance-retirement | instance-stop).

  • event.description - A description of the event.

  • event.instance-event-id - The ID of the event whose date and time you are modifying.

  • event.not-after - The latest end time for the scheduled event (for example, 2014-09-15T17:15:20.000Z).

  • event.not-before - The earliest start time for the scheduled event (for example, 2014-09-15T17:15:20.000Z).

  • event.not-before-deadline - The deadline for starting the event (for example, 2014-09-15T17:15:20.000Z).

  • instance-state-code - The code for the instance state, as a 16-bit unsigned integer. The high byte is used for internal purposes and should be ignored. The low byte is set based on the state represented. The valid values are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped).

  • instance-state-name - The state of the instance (pending | running | shutting-down | terminated | stopping | stopped).

  • instance-status.reachability - Filters on instance status where the name is reachability (passed | failed | initializing | insufficient-data).

  • instance-status.status - The status of the instance (ok | impaired | initializing | insufficient-data | not-applicable).

  • system-status.reachability - Filters on system status where the name is reachability (passed | failed | initializing | insufficient-data).

  • system-status.status - The system status of the instance (ok | impaired | initializing | insufficient-data | not-applicable).

  • attached-ebs-status.status - The status of the attached EBS volume for the instance (ok | impaired | initializing | insufficient-data | not-applicable).

STRUCT(
"name" VARCHAR,
"values" VARCHAR[]
)[]
Show child fields
filters[]
Show child fields
filters[].name

The name of the filter. Filter names are case-sensitive.

filters[].values[]
include_all_instances Input Column

When true, includes the health status for all instances. When false, includes the health status for running instances only.

Default: false

BOOLEAN
instance_ids Input Column

The instance IDs.

Default: Describes all your instances.

Constraints: Maximum 100 explicitly specified instance IDs.

VARCHAR[]
Show child fields
instance_ids[]
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
attached_ebs_status

Reports impaired functionality that stems from an attached Amazon EBS volume that is unreachable and unable to complete I/O operations.

STRUCT(
"details" STRUCT(
"impaired_since" TIMESTAMP_S,
"name" VARCHAR,
"status" VARCHAR
)[],
"status" VARCHAR
)
Show child fields
attached_ebs_status.details[]
Show child fields
attached_ebs_status.details[].impaired_since

The date and time when the attached EBS status check failed.

attached_ebs_status.details[].name

The name of the attached EBS status check.

attached_ebs_status.details[].status

The result of the attached EBS status check.

attached_ebs_status.status

The current status.

availability_zone

The Availability Zone of the instance.

VARCHAR
events

Any scheduled events associated with the instance.

STRUCT(
"instance_event_id" VARCHAR,
"code" VARCHAR,
"description" VARCHAR,
"not_after" TIMESTAMP_S,
"not_before" TIMESTAMP_S,
"not_before_deadline" TIMESTAMP_S
)[]
Show child fields
events[]
Show child fields
events[].code

The event code.

events[].description

A description of the event.

After a scheduled event is completed, it can still be described for up to a week. If the event has been completed, this description starts with the following text: [Completed].

events[].instance_event_id

The ID of the event.

events[].not_after

The latest scheduled end time for the event.

events[].not_before

The earliest scheduled start time for the event.

events[].not_before_deadline

The deadline for starting the event.

instance_id

The ID of the instance.

VARCHAR
instance_state

The intended state of the instance. DescribeInstanceStatus requires that an instance be in the running state.

STRUCT(
"code" BIGINT,
"name" VARCHAR
)
Show child fields
instance_state.code

The state of the instance as a 16-bit unsigned integer.

The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

The valid values for instance-state-code will all be in the range of the low byte and they are:

  • 0 : pending

  • 16 : running

  • 32 : shutting-down

  • 48 : terminated

  • 64 : stopping

  • 80 : stopped

You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

instance_state.name

The current state of the instance.

instance_status

Reports impaired functionality that stems from issues internal to the instance, such as impaired reachability.

STRUCT(
"details" STRUCT(
"impaired_since" TIMESTAMP_S,
"name" VARCHAR,
"status" VARCHAR
)[],
"status" VARCHAR
)
Show child fields
instance_status.details[]
Show child fields
instance_status.details[].impaired_since

The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.

instance_status.details[].name

The type of instance status.

instance_status.details[].status

The status.

instance_status.status

The status.

outpost_arn

The Amazon Resource Name (ARN) of the Outpost.

VARCHAR
system_status

Reports impaired functionality that stems from issues related to the systems that support an instance, such as hardware failures and network connectivity problems.

STRUCT(
"details" STRUCT(
"impaired_since" TIMESTAMP_S,
"name" VARCHAR,
"status" VARCHAR
)[],
"status" VARCHAR
)
Show child fields
system_status.details[]
Show child fields
system_status.details[].impaired_since

The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.

system_status.details[].name

The type of instance status.

system_status.details[].status

The status.

system_status.status

The status.