enum DeploymentStrategy
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ECS.DeploymentStrategy |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#DeploymentStrategy |
Java | software.amazon.awscdk.services.ecs.DeploymentStrategy |
Python | aws_cdk.aws_ecs.DeploymentStrategy |
TypeScript (source) | aws-cdk-lib » aws_ecs » DeploymentStrategy |
The deployment stratergy to use for ECS controller.
Example
declare const cluster: ecs.Cluster;
declare const taskDefinition: ecs.TaskDefinition;
declare const blueTargetGroup: elbv2.ApplicationTargetGroup;
declare const greenTargetGroup: elbv2.ApplicationTargetGroup;
declare const prodListenerRule: elbv2.ApplicationListenerRule;
const service = new ecs.FargateService(this, 'Service', {
cluster,
taskDefinition,
deploymentStrategy: ecs.DeploymentStrategy.LINEAR,
linearConfiguration: {
stepPercent: 10.0,
stepBakeTime: Duration.minutes(5),
},
});
const target = service.loadBalancerTarget({
containerName: 'web',
containerPort: 80,
alternateTarget: new ecs.AlternateTarget('AlternateTarget', {
alternateTargetGroup: greenTargetGroup,
productionListener: ecs.ListenerRuleConfiguration.applicationListenerRule(prodListenerRule),
}),
});
target.attachToApplicationTargetGroup(blueTargetGroup);
Members
| Name | Description |
|---|---|
| ROLLING | Rolling update deployment. |
| BLUE_GREEN | Blue/green deployment. |
| LINEAR | Linear deployment with progressive traffic shifting. |
| CANARY | Canary deployment with fixed traffic percentage testing. |
ROLLING
Rolling update deployment.
BLUE_GREEN
Blue/green deployment.
LINEAR
Linear deployment with progressive traffic shifting.
CANARY
Canary deployment with fixed traffic percentage testing.

.NET
Go
Java
Python
TypeScript (