From 1f51cce83e24505319f8b74a3aeacf69a6769b4f Mon Sep 17 00:00:00 2001 From: Rushali Dantrey <111036690+rushali-aws@users.noreply.github.com> Date: Sun, 24 Mar 2024 17:36:01 +0530 Subject: [PATCH] Update app.py --- python/ecs/ecs-service-with-advanced-alb-config/app.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/python/ecs/ecs-service-with-advanced-alb-config/app.py b/python/ecs/ecs-service-with-advanced-alb-config/app.py index d1b688173..f3b2e3a71 100644 --- a/python/ecs/ecs-service-with-advanced-alb-config/app.py +++ b/python/ecs/ecs-service-with-advanced-alb-config/app.py @@ -77,10 +77,12 @@ asg.connections.allow_from(lb, port_range=ec2.Port.tcp_range(32768, 65535), description="allow incoming traffic from ALB") health_check = elbv2.HealthCheck( - interval=Duration.seconds(60), - path="/health", - timeout=Duration.seconds(5) -) + interval=Duration.seconds(60), + path="/health", + healthy_http_codes = '200-499', + healthy_threshold_count = 2, + timeout=Duration.seconds(5) + ) # Attach ALB to ECS Service listener.add_targets(