Skip to content

aws.ssm.describe_instance_information

Example SQL Queries

SELECT * FROM
aws.ssm.describe_instance_information;

Description

Provides information about one or more of your managed nodes, including the operating system platform, SSM Agent version, association status, and IP address. This operation does not return information for nodes that are either Stopped or Terminated.

If you specify one or more node IDs, the operation returns information for those managed nodes. If you don't specify node IDs, it returns information for all your managed nodes. If you specify a node ID that isn't valid or a node that you don't own, you receive an error.

The IamRole field returned for this API operation is the role assigned to an Amazon EC2 instance configured with a Systems Manager Quick Setup host management configuration or the role assigned to an on-premises managed node.

Table Definition

Column NameColumn Data Type
filters Input Column

One or more filters. Use a filter to return a more specific list of managed nodes. You can filter based on tags applied to your managed nodes. Tag filters can't be combined with other filter types. Use this Filters data type instead of InstanceInformationFilterList, which is deprecated.

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

The filter key name to describe your managed nodes.

Valid filter key values: ActivationIds | AgentVersion | AssociationStatus | IamRole | InstanceIds | PingStatus | PlatformTypes | ResourceType | SourceIds | SourceTypes | "tag-key" | "tag:{keyname}

  • Valid values for the AssociationStatus filter key: Success | Pending | Failed

  • Valid values for the PingStatus filter key: Online | ConnectionLost | Inactive (deprecated)

  • Valid values for the PlatformType filter key: Windows | Linux | MacOS

  • Valid values for the ResourceType filter key: EC2Instance | ManagedInstance

  • Valid values for the SourceType filter key: AWS::EC2::Instance | AWS::SSM::ManagedInstance | AWS::IoT::Thing

  • Valid tag examples: Key=tag-key,Values=Purpose | Key=tag:Purpose,Values=Test.

filters[].values[]
instance_information_filter_list Input Column

This is a legacy method. We recommend that you don't use this method. Instead, use the Filters data type. Filters enables you to return node information by filtering based on tags applied to managed nodes.

Attempting to use InstanceInformationFilterList and Filters leads to an exception error.

STRUCT(
"key" VARCHAR,
"value_set" VARCHAR[]
)[]
Show child fields
instance_information_filter_list[]
Show child fields
instance_information_filter_list[].key

The name of the filter.

instance_information_filter_list[].value_set[]
_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
activation_id

The activation ID created by Amazon Web Services Systems Manager when the server or virtual machine (VM) was registered.

VARCHAR
agent_version

The version of SSM Agent running on your Linux managed node.

VARCHAR
association_overview

Information about the association.

STRUCT(
"detailed_status" VARCHAR,
"instance_association_status_aggregated_count" MAP(VARCHAR, BIGINT)
)
Show child fields
association_overview.detailed_status

Detailed status information about the aggregated associations.

association_overview.instance_association_status_aggregated_count

The number of associations for the managed nodes.

association_status

The status of the association.

VARCHAR
computer_name

The fully qualified host name of the managed node.

VARCHAR
iam_role

The role assigned to an Amazon EC2 instance configured with a Systems Manager Quick Setup host management configuration or the role assigned to an on-premises managed node.

This call doesn't return the IAM role for unmanaged Amazon EC2 instances (instances not configured for Systems Manager). To retrieve the role for an unmanaged instance, use the Amazon EC2 DescribeInstances operation. For information, see DescribeInstances in the Amazon EC2 API Reference or describe-instances in the Amazon Web Services CLI Command Reference.

VARCHAR
instance_id

The managed node ID.

VARCHAR
ip_address

The IP address of the managed node.

VARCHAR
is_latest_version

Indicates whether the latest version of SSM Agent is running on your Linux managed node. This field doesn't indicate whether or not the latest version is installed on Windows managed nodes, because some older versions of Windows Server use the EC2Config service to process Systems Manager requests.

BOOLEAN
last_association_execution_date

The date the association was last run.

TIMESTAMP_S
last_ping_date_time

The date and time when the agent last pinged the Systems Manager service.

TIMESTAMP_S
last_successful_association_execution_date

The last date the association was successfully run.

TIMESTAMP_S
name

The name assigned to an on-premises server, edge device, or virtual machine (VM) when it is activated as a Systems Manager managed node. The name is specified as the DefaultInstanceName property using the CreateActivation command. It is applied to the managed node by specifying the Activation Code and Activation ID when you install SSM Agent on the node, as explained in Install SSM Agent for a hybrid and multicloud environment (Linux) and Install SSM Agent for a hybrid and multicloud environment (Windows). To retrieve the Name tag of an EC2 instance, use the Amazon EC2 DescribeInstances operation. For information, see DescribeInstances in the Amazon EC2 API Reference or describe-instances in the Amazon Web Services CLI Command Reference.

VARCHAR
ping_status

Connection status of SSM Agent.

The status Inactive has been deprecated and is no longer in use.

VARCHAR
platform_name

The name of the operating system platform running on your managed node.

VARCHAR
platform_type

The operating system platform type.

VARCHAR
platform_version

The version of the OS platform running on your managed node.

VARCHAR
registration_date

The date the server or VM was registered with Amazon Web Services as a managed node.

TIMESTAMP_S
resource_type

The type of instance. Instances are either EC2 instances or managed instances.

VARCHAR
source_id

The ID of the source resource. For IoT Greengrass devices, SourceId is the Thing name.

VARCHAR
source_type

The type of the source resource. For IoT Greengrass devices, SourceType is AWS::IoT::Thing.

VARCHAR