DescribeServices - Amazon Elastic Container Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


Describes the specified services running in your cluster.

Request Syntax

{ "cluster": "string", "include": [ "string" ], "services": [ "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.


The short name or full Amazon Resource Name (ARN)the cluster that hosts the service to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the service or services you are describing were launched in any cluster other than the default cluster.

Type: String

Required: No


Determines whether you want to see the resource tags for the service. If TAGS is specified, the tags are included in the response. If this field is omitted, tags aren't included in the response.

Type: Array of strings

Valid Values: TAGS

Required: No


A list of services to describe. You may specify up to 10 services to describe in a single operation.

Type: Array of strings

Required: Yes

Response Syntax

{ "failures": [ { "arn": "string", "detail": "string", "reason": "string" } ], "services": [ { "capacityProviderStrategy": [ { "base": number, "capacityProvider": "string", "weight": number } ], "clusterArn": "string", "createdAt": number, "createdBy": "string", "deploymentConfiguration": { "alarms": { "alarmNames": [ "string" ], "enable": boolean, "rollback": boolean }, "deploymentCircuitBreaker": { "enable": boolean, "rollback": boolean }, "maximumPercent": number, "minimumHealthyPercent": number }, "deploymentController": { "type": "string" }, "deployments": [ { "capacityProviderStrategy": [ { "base": number, "capacityProvider": "string", "weight": number } ], "createdAt": number, "desiredCount": number, "failedTasks": number, "id": "string", "launchType": "string", "networkConfiguration": { "awsvpcConfiguration": { "assignPublicIp": "string", "securityGroups": [ "string" ], "subnets": [ "string" ] } }, "pendingCount": number, "platformFamily": "string", "platformVersion": "string", "rolloutState": "string", "rolloutStateReason": "string", "runningCount": number, "serviceConnectConfiguration": { "enabled": boolean, "logConfiguration": { "logDriver": "string", "options": { "string" : "string" }, "secretOptions": [ { "name": "string", "valueFrom": "string" } ] }, "namespace": "string", "services": [ { "clientAliases": [ { "dnsName": "string", "port": number } ], "discoveryName": "string", "ingressPortOverride": number, "portName": "string" } ] }, "serviceConnectResources": [ { "discoveryArn": "string", "discoveryName": "string" } ], "status": "string", "taskDefinition": "string", "updatedAt": number } ], "desiredCount": number, "enableECSManagedTags": boolean, "enableExecuteCommand": boolean, "events": [ { "createdAt": number, "id": "string", "message": "string" } ], "healthCheckGracePeriodSeconds": number, "launchType": "string", "loadBalancers": [ { "containerName": "string", "containerPort": number, "loadBalancerName": "string", "targetGroupArn": "string" } ], "networkConfiguration": { "awsvpcConfiguration": { "assignPublicIp": "string", "securityGroups": [ "string" ], "subnets": [ "string" ] } }, "pendingCount": number, "placementConstraints": [ { "expression": "string", "type": "string" } ], "placementStrategy": [ { "field": "string", "type": "string" } ], "platformFamily": "string", "platformVersion": "string", "propagateTags": "string", "roleArn": "string", "runningCount": number, "schedulingStrategy": "string", "serviceArn": "string", "serviceName": "string", "serviceRegistries": [ { "containerName": "string", "containerPort": number, "port": number, "registryArn": "string" } ], "status": "string", "tags": [ { "key": "string", "value": "string" } ], "taskDefinition": "string", "taskSets": [ { "capacityProviderStrategy": [ { "base": number, "capacityProvider": "string", "weight": number } ], "clusterArn": "string", "computedDesiredCount": number, "createdAt": number, "externalId": "string", "id": "string", "launchType": "string", "loadBalancers": [ { "containerName": "string", "containerPort": number, "loadBalancerName": "string", "targetGroupArn": "string" } ], "networkConfiguration": { "awsvpcConfiguration": { "assignPublicIp": "string", "securityGroups": [ "string" ], "subnets": [ "string" ] } }, "pendingCount": number, "platformFamily": "string", "platformVersion": "string", "runningCount": number, "scale": { "unit": "string", "value": number }, "serviceArn": "string", "serviceRegistries": [ { "containerName": "string", "containerPort": number, "port": number, "registryArn": "string" } ], "stabilityStatus": "string", "stabilityStatusAt": number, "startedBy": "string", "status": "string", "tags": [ { "key": "string", "value": "string" } ], "taskDefinition": "string", "taskSetArn": "string", "updatedAt": number } ] } ] }

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.


Any failures associated with the call.

Type: Array of Failure objects


The list of services described.

Type: Array of Service objects


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


These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.

HTTP Status Code: 400


The specified cluster wasn't found. You can view your available clusters with ListClusters. Amazon ECS clusters are Region specific.

HTTP Status Code: 400


The specified parameter isn't valid. Review the available parameters for the API request.

HTTP Status Code: 400


These errors are usually caused by a server issue.

HTTP Status Code: 500


In the following example or examples, the Authorization header contents (AUTHPARAMS) must be replaced with an Amazon Signature Version 4 signature. For more information, see Signature Version 4 Signing Process in the Amazon General Reference.

You only need to learn how to sign HTTP requests if you intend to create them manually. When you use the Amazon Command Line Interface or one of the Amazon SDKs to make requests to Amazon, these tools automatically sign the requests for you, with the access key that you specify when you configure the tools. When you use these tools, you don't have to sign requests yourself.


This example request provides a full description of the bunker_buster service in the telemetry cluster.

Sample Request

POST / HTTP/1.1 Host: Accept-Encoding: identity Content-Length: 55 X-Amz-Target: AmazonEC2ContainerServiceV20141113.DescribeServices X-Amz-Date: 20150528T163859Z User-Agent: aws-cli/1.7.30 Python/2.7.9 Darwin/14.3.0 Content-Type: application/x-amz-json-1.1 Authorization: AUTHPARAMS { "services": [ "bunker-buster" ], "cluster": "telemetry" }

Sample Response

HTTP/1.1 200 OK Server: Server Date: Wed, 29 Apr 2015 19:02:59 GMT Content-Type: application/x-amz-json-1.1 Content-Length: 2449 Connection: keep-alive x-amzn-RequestId: 123a4b56-7c89-01d2-3ef4-example5678f { "failures": [], "services": [ { "clusterArn": "arn:aws:ecs:us-west-2:012345678910:cluster/telemetry", "deploymentConfiguration": { "maximumPercent": 200, "minimumHealthyPercent": 100 }, "deployments": [ { "createdAt": 1432829320.611, "desiredCount": 4, "id": "ecs-svc/9223370604025455196", "pendingCount": 0, "runningCount": 4, "status": "PRIMARY", "taskDefinition": "arn:aws:ecs:us-west-2:012345678910:task-definition/hpcc-t2-medium:1", "updatedAt": 1432829320.611 } ], "desiredCount": 4, "events": [], "loadBalancers": [], "pendingCount": 0, "runningCount": 4, "serviceArn": "arn:aws:ecs:us-west-2:012345678910:service/default/bunker-buster", "serviceName": "bunker-buster", "status": "ACTIVE", "taskDefinition": "arn:aws:ecs:us-west-2:012345678910:task-definition/hpcc-t2-medium:1" } ] }

See Also

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