2 Respuestas
- Más nuevo
- Más votos
- Más comentarios
1
Hello.
To configure the health check path for the load balancer in the ApplicationLoadBalancedFargateService construct, you'll need to make use of the health_check attribute inside the listener property of the construct.
domain_name="nginx-cdk.dev.devops.directwines.com",
domain_zone=domain_zone,
listener_port=443,
health_check=elasticloadbalancingv2.HealthCheck(
path="/grapevine/index.jsp",
# You can specify other health check parameters here, for example:
# interval=core.Duration.seconds(30),
# timeout=core.Duration.seconds(5),
# healthy_http_codes="200"
)
This will configure the health check of the ALB to use the path /grapevine/index.jsp.
Regards, Andrii
0
The health_check within the attribute ApplicationLoadBalancedFargateService.health_check is for the container. You want the health check of the load balancer, and need to do the below:
- Configure your ApplicationLoadBalancedFargateService as usual:
service = aws_ecs_patterns.ApplicationLoadBalancedFargateService(self, Service, ...)
And, then set the load balancer health check:
service.target_group.configure_health_check(
path="/grapevine/index.jsp",
)
respondido hace 2 días
Contenido relevante
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace 3 meses
- OFICIAL DE AWSActualizada hace 2 años
Hi Andri, I went on holidays, resumed back today. Thanks you for helping me. but I end up with the below error, when I added the above suggested code change by you and given cdk ls command in my wsl. Please help me on this.
<(.venv) gowtham@LAPTIND04486:~/git/aws-cdk-nginx-grapevine/app-cdk$ cdk ls Traceback (most recent call last): File "/home/gowtham/git/aws-cdk-nginx-grapevine/app-cdk/app.py", line 19, in <module> nginx_stack = NginxCdkStack( File "/home/gowtham/.local/lib/python3.10/site-packages/jsii/_runtime.py", line 112, in call inst = super().call(*args, **kwargs) File "/home/gowtham/git/aws-cdk-nginx-grapevine/app-cdk/app_cdk/nginx_cdk_stack.py", line 44, in init ecs_patterns.ApplicationLoadBalancedFargateService(self, "NGINXFargateService", File "/home/gowtham/.local/lib/python3.10/site-packages/jsii/_runtime.py", line 112, in call inst = super().call(*args, **kwargs) TypeError: ApplicationLoadBalancedFargateService.init() got an unexpected keyword argument 'health_check_path'
Subprocess exited with error 1>