# CfnCodeDeployLambdaAliasUpdate

To perform an AWS CodeDeploy deployment when the version changes on an AWS::Lambda::Alias resource, use the CodeDeployLambdaAliasUpdate update policy.

- Source: [`core/lib/cfn-resource-policy.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/core/lib/cfn-resource-policy.ts#L284)

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const cfnCodeDeployLambdaAliasUpdate: cdk.CfnCodeDeployLambdaAliasUpdate = {
  applicationName: 'applicationName',
  deploymentGroupName: 'deploymentGroupName',

  // the properties below are optional
  afterAllowTrafficHook: 'afterAllowTrafficHook',
  beforeAllowTrafficHook: 'beforeAllowTrafficHook',
};
```

## Properties

- `afterAllowTrafficHook`: string — The name of the Lambda function to run after traffic routing completes.

- `applicationName`: string (required) — The name of the AWS CodeDeploy application.

- `beforeAllowTrafficHook`: string — The name of the Lambda function to run before traffic routing starts.

- `deploymentGroupName`: string (required) — The name of the AWS CodeDeploy deployment group.

  This is where the traffic-shifting policy is set.
