-
Notifications
You must be signed in to change notification settings - Fork 4.5k
aws-ecs-patterns: Health Check Interval > Timeout Fails On Deploy #29062
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-ecs-patternsRelated to ecs-patterns libraryRelated to ecs-patterns librarybugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp2
Description
Describe the bug
When configuring ApplicationLoadBalancedFargateService targetGroup.configureHealthCheck, it is possible to have deployment fail with "Health check interval must be greater
than the timeout.". This should fail during synthesis as the values are known at that time.
Expected Behavior
I expected my deployment to succeed, or the error to be caught during synthesis.
Current Behavior
Stack was synthesized successfully, but the deployment failed.
Reproduction Steps
Create a new ApplicationLoadBalancedFargateService:
import * as ecsp from "aws-cdk-lib/aws-ecs-patterns";
const imageProps = {
image: ecs.ContainerImage.fromRegistry(ADDSOMEIMAGEHERE),
containerPort: 3000,
};
const fargateProps = {
assignPublicIp: true,
cpu: 512,
desiredCount: 1,
memoryLimitMiB: 1024,
publicLoadBalancer: true,
taskImageOptions: imageProps,
};
const ecsService = new ecsp.ApplicationLoadBalancedFargateService(
this,
parentId + "Server",
fargateProps,
);
Then apply the following:
ecsService.targetGroup.configureHealthCheck({
timeout: cdk.Duration.seconds(60),
})
Possible Solution
Synthesis should check the interval of the health check is larger than the timeout.
Additional Information/Context
No response
CDK CLI Version
2.126.0
Framework Version
No response
Node.js Version
18.18.2
OS
macOS 14.3.1
Language
TypeScript
Language Version
No response
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-ecs-patternsRelated to ecs-patterns libraryRelated to ecs-patterns librarybugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortp2