Skip to content
v2.273.0

LambdaDeploymentGroupProps Struct ​

Construction properties for LambdaDeploymentGroup.

Example ​

ts
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 ​

alarmsIAlarmRef[]alarmstyping.List[IAlarmRef]alarmsList<IAlarmRef>AlarmsIAlarmRef[]Alarms*[]IAlarmRef= []#
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.

aliasAliasaliasAliasaliasAliasAliasAliasAliasAliasrequired#
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

applicationILambdaApplicationapplicationILambdaApplicationapplicationILambdaApplicationApplicationILambdaApplicationApplicationILambdaApplication= One will be created for you.#
The reference to the CodeDeploy Lambda Application that this Deployment Group belongs to.
autoRollbackAutoRollbackConfigauto_rollbackAutoRollbackConfigautoRollbackAutoRollbackConfigAutoRollbackAutoRollbackConfigAutoRollbackAutoRollbackConfig= default AutoRollbackConfig.#
The auto-rollback configuration for this Deployment Group.
deploymentConfigILambdaDeploymentConfigdeployment_configILambdaDeploymentConfigdeploymentConfigILambdaDeploymentConfigDeploymentConfigILambdaDeploymentConfigDeploymentConfigILambdaDeploymentConfig= LambdaDeploymentConfig.CANARY_10…#
The Deployment Configuration this Deployment Group uses.
default

Default: LambdaDeploymentConfig.CANARY_10PERCENT_5MINUTES

deploymentGroupNamestringdeployment_group_namestrdeploymentGroupNameStringDeploymentGroupNamestringDeploymentGroupName*string= An auto-generated name will be u…#
The physical, human-readable name of the CodeDeploy Deployment Group.
default

Default: An auto-generated name will be used.

ignoreAlarmConfigurationbooleanignore_alarm_configurationboolignoreAlarmConfigurationBooleanIgnoreAlarmConfigurationboolIgnoreAlarmConfiguration*bool= false#
Whether to skip the step of checking CloudWatch alarms during the deployment process.
ignorePollAlarmsFailurebooleanignore_poll_alarms_failureboolignorePollAlarmsFailureBooleanIgnorePollAlarmsFailureboolIgnorePollAlarmsFailure*bool= false#
Whether to continue a deployment even if fetching the alarm status from CloudWatch failed.
postHookIFunctionpost_hookIFunctionpostHookIFunctionPostHookIFunctionPostHookIFunction= None.#
The Lambda function to run after traffic routing starts.
preHookIFunctionpre_hookIFunctionpreHookIFunctionPreHookIFunctionPreHookIFunction= None.#
The Lambda function to run before traffic routing starts.
roleIRoleroleIRoleroleIRoleRoleIRoleRoleIRole= A new Role will be created.#
The service Role of this Deployment Group.

Used as props by ​