# DeploymentLifecycleHookTargetConfig

Configuration for a deployment lifecycle hook target.

- Source: [`aws-ecs/lib/deployment-lifecycle-hook-target.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-ecs/lib/deployment-lifecycle-hook-target.ts#L42)
- Type last changed: v2.211.0 · 13 Aug 2025

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const role: iam.Role;
const deploymentLifecycleHookTargetConfig: ecs.DeploymentLifecycleHookTargetConfig = {
  lifecycleStages: [ecs.DeploymentLifecycleStage.RECONCILE_SERVICE],
  targetArn: 'targetArn',

  // the properties below are optional
  role: role,
};
```

## Properties

- `lifecycleStages`: [DeploymentLifecycleStage](/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.DeploymentLifecycleStage.html)[] (required) — The lifecycle stages when this hook should be executed.

- `role`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The IAM role that grants permissions to invoke the target.

  **Default:** a role will be created automatically

- `targetArn`: string (required) — The ARN of the target resource.
