Configure the network page, change the Health check grace period to an appropriate time period for your service (maximum is 7,200 seconds).
be very careful to prevent delayed replacement of legitimately unhealthy Amazon ECS tasks, carefully estimate the grace period required for your lengthiest known tasks. When setting your grace period, consider all relevant factors such as bootstrap time and time to pull container images.