DescribeInstanceInformation - AWS Systems Manager


Describes one or more of your instances, including information about the operating system platform, the version of SSM Agent installed on the instance, instance status, and so on.

If you specify one or more instance IDs, it returns information for those instances. If you don't specify instance IDs, it returns information for all your instances. If you specify an instance ID that isn't valid or an instance that you don't own, you receive an error.


The IamRole field for this API operation is the AWS Identity and Access Management (IAM) role assigned to on-premises instances. This call doesn't return the IAM role for EC2 instances.

Request Syntax

{ "Filters": [ { "Key": "string", "Values": [ "string" ] } ], "InstanceInformationFilterList": [ { "key": "string", "valueSet": [ "string" ] } ], "MaxResults": number, "NextToken": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.


One or more filters. Use a filter to return a more specific list of instances. You can filter based on tags applied to EC2 instances. Use this Filters data type instead of InstanceInformationFilterList, which is deprecated.

Type: Array of InstanceInformationStringFilter objects

Array Members: Minimum number of 0 items.

Required: No


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 instance information by filtering based on tags applied to managed instances.


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

Type: Array of InstanceInformationFilter objects

Array Members: Minimum number of 0 items.

Required: No


The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

Type: Integer

Valid Range: Minimum value of 5. Maximum value of 50.

Required: No


The token for the next set of items to return. (You received this token from a previous call.)

Type: String

Required: No

Response Syntax

{ "InstanceInformationList": [ { "ActivationId": "string", "AgentVersion": "string", "AssociationOverview": { "DetailedStatus": "string", "InstanceAssociationStatusAggregatedCount": { "string" : number } }, "AssociationStatus": "string", "ComputerName": "string", "IamRole": "string", "InstanceId": "string", "IPAddress": "string", "IsLatestVersion": boolean, "LastAssociationExecutionDate": number, "LastPingDateTime": number, "LastSuccessfulAssociationExecutionDate": number, "Name": "string", "PingStatus": "string", "PlatformName": "string", "PlatformType": "string", "PlatformVersion": "string", "RegistrationDate": number, "ResourceType": "string" } ], "NextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


The instance information list.

Type: Array of InstanceInformation objects


The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

Type: String


For information about the errors that are common to all actions, see Common Errors.


An error occurred on the server side.

HTTP Status Code: 500


The specified key isn't valid.

HTTP Status Code: 400


The following problems can cause this exception:

  • You don't have permission to access the instance.

  • AWS Systems Manager Agent(SSM Agent) isn't running. Verify that SSM Agent is running.

  • SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.

  • The instance isn't in valid state. Valid states are: Running, Pending, Stopped, and Stopping. Invalid states are: Shutting-down and Terminated.

HTTP Status Code: 400


The specified filter value isn't valid.

HTTP Status Code: 400


The specified token isn't valid.

HTTP Status Code: 400



This example illustrates one usage of DescribeInstanceInformation.

Sample Request

POST / HTTP/1.1 Host: Accept-Encoding: identity X-Amz-Target: AmazonSSM.DescribeInstanceInformation Content-Type: application/x-amz-json-1.1 User-Agent: aws-cli/2.0.0 Python/3.7.5 Windows/10 botocore/2.0.0dev4 X-Amz-Date: 20200220T234247Z Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20200220/us-east-2/ssm/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=39c3b3042cd2aEXAMPLE Content-Length: 72 { "Filters": [ { "Key": "InstanceIds", "Values": [ "i-02573cafcfEXAMPLE" ] } ] }

Sample Response

{ "InstanceInformationList": [ { "AgentVersion": "2.3.871.0", "AssociationOverview": { "DetailedStatus": "Failed", "InstanceAssociationStatusAggregatedCount": { "Failed": 1, "Success": 1 } }, "AssociationStatus": "Failed", "ComputerName": "WIN-11RMS222RPK.WORKGROUP", "IPAddress": "", "InstanceId": "i-02573cafcfEXAMPLE", "IsLatestVersion": false, "LastAssociationExecutionDate": 1582242019, "LastPingDateTime": 1582242018.094, "PingStatus": "Online", "PlatformName": "Microsoft Windows Server 2008 R2 Datacenter", "PlatformType": "Windows", "PlatformVersion": "6.1.7601", "ResourceType": "EC2Instance" } ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: