Skip to content

Commit 6726da9

Browse files
committed
docs(ecs): remove L1 Construct settings for blue/green deployment example from README
1 parent df1c4cb commit 6726da9

File tree

1 file changed

+0
-81
lines changed

1 file changed

+0
-81
lines changed

packages/aws-cdk-lib/aws-ecs/README.md

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,7 +2076,6 @@ Amazon ECS supports native blue/green deployments that allow you to deploy new v
20762076

20772077
[Amazon ECS blue/green deployments](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-blue-green.html)
20782078

2079-
### Using Fargate L2 constructs for Blue/Green Feature
20802079

20812080
```ts
20822081
import * as lambda from 'aws-cdk-lib/aws-lambda';
@@ -2110,86 +2109,6 @@ const target = service.loadBalancerTarget({
21102109
target.attachToApplicationTargetGroup(blueTargetGroup);
21112110
```
21122111

2113-
### Using Escape Hatches for Blue/Green Features
2114-
2115-
The new blue/green deployment features are added to CloudFormation but not yet available in the CDK L2 constructs, you can use escape hatches to access them through the L1 (CfnService) construct.
2116-
2117-
#### Load Balancer Advanced Configuration
2118-
2119-
Configure advanced load balancer settings for blue/green deployments with alternate target groups and listener rules:
2120-
2121-
```ts
2122-
declare const service: ecs.FargateService;
2123-
2124-
const cfnService = service.node.defaultChild as ecs.CfnService;
2125-
cfnService.loadBalancers = [{
2126-
containerName: 'web',
2127-
containerPort: 80,
2128-
targetGroupArn: 'arn:aws:elasticloadbalancing:region:account:targetgroup/production',
2129-
advancedConfiguration: {
2130-
alternateTargetGroupArn: 'arn:aws:elasticloadbalancing:region:account:targetgroup/test',
2131-
productionListenerRule: 'arn:aws:elasticloadbalancing:region:account:listener-rule/production-rule',
2132-
testListenerRule: 'arn:aws:elasticloadbalancing:region:account:listener-rule/test-rule',
2133-
roleArn: 'arn:aws:iam::account:role/ecs-blue-green-role'
2134-
}
2135-
}];
2136-
```
2137-
2138-
#### Blue/Green Deployment Configuration
2139-
2140-
Configure deployment strategy with bake time and lifecycle hooks:
2141-
2142-
```ts
2143-
declare const service: ecs.FargateService;
2144-
2145-
const cfnService = service.node.defaultChild as ecs.CfnService;
2146-
cfnService.deploymentConfiguration = {
2147-
maximumPercent: 200,
2148-
minimumHealthyPercent: 100,
2149-
strategy: 'BLUE_GREEN',
2150-
bakeTimeInMinutes: 15,
2151-
lifecycleHooks: [{
2152-
hookTargetArn: 'arn:aws:lambda:region:account:function:pre-deployment-hook',
2153-
roleArn: 'arn:aws:iam::account:role/deployment-hook-role',
2154-
lifecycleStages: ['PRE_STOP', 'POST_START']
2155-
}]
2156-
};
2157-
```
2158-
2159-
#### Service Connect Test Traffic Rules
2160-
2161-
Configure test traffic routing for Service Connect during blue/green deployments:
2162-
2163-
```ts
2164-
declare const cluster: ecs.Cluster;
2165-
declare const taskDefinition: ecs.TaskDefinition;
2166-
2167-
const service = new ecs.FargateService(this, 'Service', {
2168-
cluster,
2169-
taskDefinition,
2170-
});
2171-
2172-
const cfnService = service.node.defaultChild as ecs.CfnService;
2173-
cfnService.serviceConnectConfiguration = {
2174-
enabled: true,
2175-
services: [{
2176-
portName: 'api',
2177-
clientAliases: [{
2178-
port: 80,
2179-
dnsName: 'my-service',
2180-
testTrafficRules: {
2181-
header: {
2182-
name: 'x-canary-test',
2183-
value: {
2184-
exact: 'beta-version'
2185-
}
2186-
}
2187-
}
2188-
}]
2189-
}]
2190-
};
2191-
```
2192-
21932112
## Daemon Scheduling Strategy
21942113
You can specify whether service use Daemon scheduling strategy by specifying `daemon` option in Service constructs. See [differences between Daemon and Replica scheduling strategy](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html)
21952114

0 commit comments

Comments
 (0)