View a markdown version of this page

ContinueServiceDeployment - Amazon Elastic Container Service

ContinueServiceDeployment

Continues or rolls back an Amazon ECS service deployment that is paused at a lifecycle hook.

When a service deployment reaches a lifecycle stage that has a PAUSE hook configured, the deployment pauses and waits for an explicit action. Use this API to either continue the deployment to the next stage or roll back to the previous service revision.

To find the hookId of the paused hook, call DescribeServiceDeployments and inspect the lifecycleHookDetails field.

For more information, see Continuing Amazon ECS service deployments in the Amazon Elastic Container Service Developer Guide.

Request Syntax

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

action

The action to take on the paused lifecycle hook. Valid values are:

  • CONTINUE - Proceeds the deployment to the next lifecycle stage.

  • ROLLBACK - Rolls back the deployment to the previous service revision.

If no value is specified, the default action is CONTINUE.

Type: String

Valid Values: ROLLBACK | CONTINUE

Required: No

hookId

The ID of the paused lifecycle hook to act on. You can find the hookId by calling DescribeServiceDeployments and inspecting the lifecycleHookDetails field of the service deployment.

Type: String

Required: Yes

serviceDeploymentArn

The ARN of the service deployment to continue or roll back.

Type: String

Required: Yes

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 service deployment that was continued or rolled back.

Type: String

Errors

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

AccessDeniedException

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

message

Message that describes the cause of the exception.

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.

message

Message that describes the cause of the exception.

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.

message

Message that describes the cause of the exception.

HTTP Status Code: 400

ServerException

These errors are usually caused by a server issue.

message

Message that describes the cause of the exception.

HTTP Status Code: 500

ServiceDeploymentNotFoundException

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

message

Message that describes the cause of the exception.

HTTP Status Code: 400

UnsupportedFeatureException

The specified task isn't supported in this Region.

message

Message that describes the cause of the exception.

HTTP Status Code: 400

Examples

Example 1

This example continues a paused service deployment, allowing it to proceed to the next lifecycle stage.

Sample Request

POST / HTTP/1.1 Host: ecs.us-east-1.amazonaws.com Accept-Encoding: identity Content-Length: 180 X-Amz-Target: AmazonEC2ContainerServiceV20141113.ContinueServiceDeployment X-Amz-Date: 20260506T160000Z 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/abc123DEF456", "hookId": "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", "action": "CONTINUE" }

Sample Response

HTTP/1.1 200 OK Server: Server Date: Tue May 6, 2026 16:00:00 GMT Content-Type: application/x-amz-json-1.1 Content-Length: 130 Connection: keep-alive RequestId: 360c5551-123e-4e74-9914-7582d3a28807 { "serviceDeploymentArn": "arn:aws:ecs:us-east-1:123456789012:service-deployment/MyCluster/MyService/abc123DEF456" }

Example 2

This example rolls back a paused service deployment to the previous service revision.

Sample Request

POST / HTTP/1.1 Host: ecs.us-east-1.amazonaws.com Accept-Encoding: identity Content-Length: 180 X-Amz-Target: AmazonEC2ContainerServiceV20141113.ContinueServiceDeployment X-Amz-Date: 20260506T160500Z 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/abc123DEF456", "hookId": "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", "action": "ROLLBACK" }

Sample Response

HTTP/1.1 200 OK Server: Server Date: Tue May 6, 2026 16:05:00 GMT Content-Type: application/x-amz-json-1.1 Content-Length: 130 Connection: keep-alive RequestId: 470d6662-234f-5e85-0025-fg2345678901 { "serviceDeploymentArn": "arn:aws:ecs:us-east-1:123456789012:service-deployment/MyCluster/MyService/abc123DEF456" }

See Also

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