ecs_patterns.ApplicationLoadBalancedFargateService should have a way to easily specify healtCheck for the loadbalancer.
Currently ApplicationLoadBalancedFargateService creates automatically a healthCheck that points to the root /. I'd like to specify another path.
/ is not always suitablte to use as the healthCheck. In my case the correct path would be /health-check.
new ecs_patterns.ApplicationLoadBalancedFargateService(stack, 'Web', {
...
// basically same thing as the listener.addTargets() takes
healthCheck: {
path: '/index.html',
protocol: elbv2.Protocol.HTTP,
port: '' + containerPort,
},
});
This is a :rocket: Feature Request
I had the same issue. There is a way to change the path by changing the targetGroup of the resulting service:
service.targetGroup.configureHealthCheck({
path: healthcheckEndpoint,
});
@jls-tschanzc Thanks! That works fine.
Maybe there should be some pointers to above in js-docs for ApplicationLoadBalancedFargateService?
Most helpful comment
I had the same issue. There is a way to change the path by changing the targetGroup of the resulting service: