Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

StopServiceDeployment

Focus mode
StopServiceDeployment - Amazon Elastic Container Service

Stops an ongoing service deployment.

Note

StopServiceDeployment isn't currently supported.

Request Syntax

{ "serviceDeploymentArn": "string", "stopType": "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.

serviceDeploymentArn

The ARN of the service deployment that you want to stop.

Type: String

Required: Yes

stopType

How you want Amazon ECS to stop the service.

The ROLLBACK and ABORT stopType aren't supported.

Type: String

Valid Values: ABORT | ROLLBACK

Required: No

Response Syntax

{ "serviceDeploymentArn": "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.

serviceDeploymentArn

The ARN of the stopped service deployment.

Type: String

Errors

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

AccessDeniedException

You don't have authorization to perform the requested action.

HTTP Status Code: 400

ClientException

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.

The following list includes additional causes for the error:

  • The RunTask could not be processed because you use managed scaling and there is a capacity error because the quota of tasks in the PROVISIONING per cluster has been reached. For information about the service quotas, see Amazon ECS service quotas.

HTTP Status Code: 400

ConflictException

The request could not be processed because of conflict in the current state of the resource.

HTTP Status Code: 400

InvalidParameterException

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

For more information about service event errors, see Amazon ECS service event messages.

HTTP Status Code: 400

ServerException

These errors are usually caused by a server issue.

HTTP Status Code: 500

ServiceDeploymentNotFoundException

The service deploy ARN that you specified in the StopServiceDeployment doesn't exist. You can use ListServiceDeployments to retrieve the service deployment ARNs.

HTTP Status Code: 400

UnsupportedFeatureException

The specified task isn't supported in this Region.

HTTP Status Code: 400

Examples

Example

This example request stops the service deployment with the ARN of arn:aws:ecs:us-east-1:123456789012:service-deployment/MyCluster/MyService/r9i43YFjvgF_xlg7m2eJ1using the ROLLBACK stop type.

Sample Request

POST / HTTP/1.1 Host: ecs.us-west-2.amazonaws.com Accept-Encoding: identity Content-Length: 55 X-Amz-Target: AmazonEC2ContainerServiceV20141113.StopServiceDeployment X-Amz-Date: 20250407T133521Z User-Agent: aws-cli/2.26 Python/3.12.6 Darwin/14.3.0 Content-Type: application/x-amz-json-1.1 Authorization: AUTHPARAMS { "serviceDeploymentArn": "arn:aws:ecs:us-east-1:123456789012:service-deployment/MyCluster/MyService/r9i43YFjvgF_xlg7m2eJ1", "stopType": "ROLLBACK" }

Sample Response

HTTP/1.1 200 OK Server: Server Date: Mon Apr 7, 2025 18:50:14 GMT Content-Type: application/x-amz-json-1.1 Content-Length: 220 Connection: keep-alive RequestId: 360c5551-123e-4e74-9914-7582d3a28807 { "serviceDeploymentArn": "arn:aws:ecs:us-east-1:123456789012:service-deployment/MyCluster/MyService/r9i43YFjvgF_xlg7m2eJ1", } }

See Also

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

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.