-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ECS Fargate Service: Alarm based rollback is not supported (cn-north-1) #26574
Comments
Thank you for your feedback. Have you tried to remove the (service.node.tryFindChild('Service') as ecs.CfnService).addPropertyDeletionOverride('DeploymentConfiguration.Alarms.Rollback') If this works in CN regions, we probably should add a condition for that. |
Thanks Pahub, nice to meet you again hahaha. Yes, I use Here is my code: .....
Aspects.of(this).add(new InjectRemoveECSAlarm());
....
class InjectRemoveECSAlarm implements IAspect {
public visit(node: IConstruct): void {
if (
node instanceof CfnResource &&
node.cfnResourceType === "AWS::ECS::Service"
) {
node.addDeletionOverride(
"Properties.DeploymentConfiguration.Alarms"
);
}
}
} |
This was fixed, #26458 correct? |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Hi @YikaiHu According to https://github.com/bvtujo/aws-cdk/blob/a25fdc8545f2a6731afddd3ab6f27becbf4dd6e1/packages/aws-cdk-lib/aws-ecs/lib/base/base-service.ts#L1370 I think you should not need the injection anymore? |
Yes, it worked, no more injection is needed, thanks! |
Describe the bug
In version v2.89.0,
will trigger the CDK deployment failure:
This may caused by: from #25840, ECS L2 construct sets the default configuration for the CfnService.deploymentConfiguration.alarms property to:
But it seems like that not all AWS region support this feature.
Expected Behavior
Deployment successfully
Current Behavior
CDK deployment failed
Resource handler returned message: "Alarm based rollback is not supported. (Service: AmazonECS; Status Code: 400; Error Code: UnsupportedFeatureException; Request ID: a76f0b28-829f-40dc-ad32-11ff095a3d22; Proxy: null)" (RequestToken: 1fc816d1-763b-edf2-813f-52938aac2e50, HandlerErrorCode: GeneralServiceException)
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
v2.89.0
Framework Version
No response
Node.js Version
nodejs16
OS
MacOS
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: