aws-cdk-lib.aws_codedeploy.LambdaDeploymentGroupProps

interface LambdaDeploymentGroupProps

LanguageType name
.NETAmazon.CDK.AWS.CodeDeploy.LambdaDeploymentGroupProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscodedeploy#LambdaDeploymentGroupProps
Javasoftware.amazon.awscdk.services.codedeploy.LambdaDeploymentGroupProps
Pythonaws_cdk.aws_codedeploy.LambdaDeploymentGroupProps
TypeScript (source)aws-cdk-lib » aws_codedeploy » LambdaDeploymentGroupProps

Construction properties for LambdaDeploymentGroup.

Example

declare const myApplication: codedeploy.LambdaApplication;
declare const func: lambda.Function;
const version = func.currentVersion;
const version1Alias = new lambda.Alias(this, 'alias', {
  aliasName: 'prod',
  version,
});

const deploymentGroup = new codedeploy.LambdaDeploymentGroup(this, 'BlueGreenDeployment', {
  application: myApplication, // optional property: one will be created for you if not provided
  alias: version1Alias,
  deploymentConfig: codedeploy.LambdaDeploymentConfig.LINEAR_10PERCENT_EVERY_1MINUTE,
});

Properties

NameTypeDescription
aliasAliasLambda Alias to shift traffic. Updating the version of the alias will trigger a CodeDeploy deployment.
alarms?IAlarm[]The CloudWatch alarms associated with this Deployment Group.
application?ILambdaApplicationThe reference to the CodeDeploy Lambda Application that this Deployment Group belongs to.
autoRollback?AutoRollbackConfigThe auto-rollback configuration for this Deployment Group.
deploymentConfig?ILambdaDeploymentConfigThe Deployment Configuration this Deployment Group uses.
deploymentGroupName?stringThe physical, human-readable name of the CodeDeploy Deployment Group.
ignorePollAlarmsFailure?booleanWhether to continue a deployment even if fetching the alarm status from CloudWatch failed.
postHook?IFunctionThe Lambda function to run after traffic routing starts.
preHook?IFunctionThe Lambda function to run before traffic routing starts.
role?IRoleThe service Role of this Deployment Group.

alias

Type: Alias

Lambda Alias to shift traffic. Updating the version of the alias will trigger a CodeDeploy deployment.

[disable-awslint:ref-via-interface] since we need to modify the alias CFN resource update policy


alarms?

Type: IAlarm[] (optional, default: [])

The CloudWatch alarms associated with this Deployment Group.

CodeDeploy will stop (and optionally roll back) a deployment if during it any of the alarms trigger.

Alarms can also be added after the Deployment Group is created using the #addAlarm method.

See also: https://docs.aws.amazon.com/codedeploy/latest/userguide/monitoring-create-alarms.html


application?

Type: ILambdaApplication (optional, default: One will be created for you.)

The reference to the CodeDeploy Lambda Application that this Deployment Group belongs to.


autoRollback?

Type: AutoRollbackConfig (optional, default: default AutoRollbackConfig.)

The auto-rollback configuration for this Deployment Group.


deploymentConfig?

Type: ILambdaDeploymentConfig (optional, default: LambdaDeploymentConfig.CANARY_10PERCENT_5MINUTES)

The Deployment Configuration this Deployment Group uses.


deploymentGroupName?

Type: string (optional, default: An auto-generated name will be used.)

The physical, human-readable name of the CodeDeploy Deployment Group.


ignorePollAlarmsFailure?

Type: boolean (optional, default: false)

Whether to continue a deployment even if fetching the alarm status from CloudWatch failed.


postHook?

Type: IFunction (optional, default: None.)

The Lambda function to run after traffic routing starts.


preHook?

Type: IFunction (optional, default: None.)

The Lambda function to run before traffic routing starts.


role?

Type: IRole (optional, default: A new Role will be created.)

The service Role of this Deployment Group.