AWS CodeDeploy
API Reference (API Version 2014-10-06)

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

PutLifecycleEventHookExecutionStatus

Sets the result of a Lambda validation function. The function validates lifecycle hooks during a deployment that uses the AWS Lambda or Amazon ECS compute platform. For AWS Lambda deployments, the available lifecycle hooks are BeforeAllowTraffic and AfterAllowTraffic. For Amazon ECS deployments, the available lifecycle hooks are BeforeInstall, AfterInstall, AfterAllowTestTraffic, BeforeAllowTraffic, and AfterAllowTraffic. Lambda validation functions return Succeeded or Failed. For more information, see AppSpec 'hooks' Section for an AWS Lambda Deployment and AppSpec 'hooks' Section for an Amazon ECS Deployment.

Request Syntax

{ "deploymentId": "string", "lifecycleEventHookExecutionId": "string", "status": "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.

deploymentId

The unique ID of a deployment. Pass this ID to a Lambda function that validates a deployment lifecycle event.

Type: String

Required: No

lifecycleEventHookExecutionId

The execution ID of a deployment's lifecycle hook. A deployment lifecycle hook is specified in the hooks section of the AppSpec file.

Type: String

Required: No

status

The result of a Lambda function that validates a deployment lifecycle event (Succeeded or Failed).

Type: String

Valid Values: Pending | InProgress | Succeeded | Failed | Skipped | Unknown

Required: No

Response Syntax

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

lifecycleEventHookExecutionId

The execution ID of the lifecycle event hook. A hook is specified in the hooks section of the deployment's AppSpec file.

Type: String

Errors

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

DeploymentDoesNotExistException

The deployment with the IAM user or AWS account does not exist.

HTTP Status Code: 400

DeploymentIdRequiredException

At least one deployment ID must be specified.

HTTP Status Code: 400

InvalidDeploymentIdException

At least one of the deployment IDs was specified in an invalid format.

HTTP Status Code: 400

InvalidLifecycleEventHookExecutionIdException

A lifecycle event hook is invalid. Review the hooks section in your AppSpec file to ensure the lifecycle events and hooks functions are valid.

HTTP Status Code: 400

InvalidLifecycleEventHookExecutionStatusException

The result of a Lambda validation function that verifies a lifecycle event is invalid. It should return Succeeded or Failed.

HTTP Status Code: 400

LifecycleEventAlreadyCompletedException

An attempt to return the status of an already completed lifecycle event occurred.

HTTP Status Code: 400

UnsupportedActionForDeploymentTypeException

A call was submitted that is not supported for the specified deployment type.

HTTP Status Code: 400

See Also

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