AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

ServerDeploymentGroup

A CodeDeploy Deployment Group that deploys to EC2/on-premise instances.

Import

import { ServerDeploymentGroup } from 'aws-cdk-lib/aws-codedeploy';

Or use the module namespace:

import * as codedeploy from 'aws-cdk-lib/aws-codedeploy';
// codedeploy.ServerDeploymentGroup

Properties

Configuration passed to the constructor as ServerDeploymentGroupProps.

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.

Default: []

applicationOptional
IApplicationRef

The CodeDeploy EC2/on-premise Application this Deployment Group belongs to.

Default: - A new Application will be created.

autoRollbackOptional
AutoRollbackConfig

The auto-rollback configuration for this Deployment Group.

Default: - default AutoRollbackConfig.

autoScalingGroupsOptional
IAutoScalingGroup[]

The auto-scaling groups belonging to this Deployment Group. Auto-scaling groups can also be added after the Deployment Group is created using the `#addAutoScalingGroup` method. [disable-awslint:ref-via-interface] is needed because we update userdata for ASGs to install the codedeploy agent.

Default: []

deploymentConfigOptional
IDeploymentConfigRef

The EC2/on-premise Deployment Configuration to use for this Deployment Group.

Default: ServerDeploymentConfig#OneAtATime

deploymentGroupNameOptional
string

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

Default: - An auto-generated name will be used.

ec2InstanceTagsOptional
InstanceTagSet

All EC2 instances matching the given set of tags when a deployment occurs will be added to this Deployment Group.

Default: - No additional EC2 instances will be added to the Deployment Group.

ignoreAlarmConfigurationOptional
boolean

Whether to skip the step of checking CloudWatch alarms during the deployment process.

Default: - false

ignorePollAlarmsFailureOptional
boolean

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

Default: false

installAgentOptional
boolean

If you've provided any auto-scaling groups with the `#autoScalingGroups` property, you can set this property to add User Data that installs the CodeDeploy agent on the instances.

Default: true

loadBalancerOptionalDeprecated
LoadBalancer

The load balancer to place in front of this Deployment Group. Can be created from either a classic Elastic Load Balancer, or an Application Load Balancer / Network Load Balancer Target Group.

Default: - Deployment Group will not have a load balancer defined.

Deprecated: - Use `loadBalancers` instead.

loadBalancersOptional
LoadBalancer[]

CodeDeploy supports the deployment to multiple load balancers. Specify either multiple Classic Load Balancers, or Application Load Balancers / Network Load Balancers Target Groups.

Default: - Deployment Group will not have load balancers defined.

onPremiseInstanceTagsOptional
InstanceTagSet

All on-premise instances matching the given set of tags when a deployment occurs will be added to this Deployment Group.

Default: - No additional on-premise instances will be added to the Deployment Group.

roleOptional
IRole

The service Role of this Deployment Group.

Default: - A new Role will be created.

terminationHookOptional
boolean

Indicates whether the deployment group was configured to have CodeDeploy install a termination hook into an Auto Scaling group.

Default: - false

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter