Skip to content
v2.275.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 ​

alarmsoptionalIAlarmRef[]alarmsoptionaltyping.List[IAlarmRef]alarmsoptionalList<IAlarmRef>AlarmsoptionalIAlarmRef[]Alarmsoptional*[]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

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

Default: One will be created for you.

autoRollbackoptionalAutoRollbackConfigauto_rollbackoptionalAutoRollbackConfigautoRollbackoptionalAutoRollbackConfigAutoRollbackoptionalAutoRollbackConfigAutoRollbackoptionalAutoRollbackConfig#
The auto-rollback configuration for this Deployment Group.

Default: default AutoRollbackConfig.

deploymentConfigoptionalILambdaDeploymentConfigdeployment_configoptionalILambdaDeploymentConfigdeploymentConfigoptionalILambdaDeploymentConfigDeploymentConfigoptionalILambdaDeploymentConfigDeploymentConfigoptionalILambdaDeploymentConfig#
The Deployment Configuration this Deployment Group uses.

Default: LambdaDeploymentConfig.CANARY_10PERCENT_5MINUTES

deploymentGroupNameoptionalstringdeployment_group_nameoptionalstrdeploymentGroupNameoptionalStringDeploymentGroupNameoptionalstringDeploymentGroupNameoptional*string#
The physical, human-readable name of the CodeDeploy Deployment Group.

Default: An auto-generated name will be used.

ignoreAlarmConfigurationoptionalbooleanignore_alarm_configurationoptionalboolignoreAlarmConfigurationoptionalBooleanIgnoreAlarmConfigurationoptionalboolIgnoreAlarmConfigurationoptional*bool= false#
Whether to skip the step of checking CloudWatch alarms during the deployment process.
ignorePollAlarmsFailureoptionalbooleanignore_poll_alarms_failureoptionalboolignorePollAlarmsFailureoptionalBooleanIgnorePollAlarmsFailureoptionalboolIgnorePollAlarmsFailureoptional*bool= false#
Whether to continue a deployment even if fetching the alarm status from CloudWatch failed.
postHookoptionalIFunctionpost_hookoptionalIFunctionpostHookoptionalIFunctionPostHookoptionalIFunctionPostHookoptionalIFunction= None.#
The Lambda function to run after traffic routing starts.
preHookoptionalIFunctionpre_hookoptionalIFunctionpreHookoptionalIFunctionPreHookoptionalIFunctionPreHookoptionalIFunction= None.#
The Lambda function to run before traffic routing starts.
roleoptionalIRoleroleoptionalIRoleroleoptionalIRoleRoleoptionalIRoleRoleoptionalIRole#
The service Role of this Deployment Group.

Default: A new Role will be created.