- Newest
- Most votes
- Most comments
To prevent Elastic Beanstalk from resetting the health check grace period when it updates the launch template, you can use an Elastic Beanstalk configuration file (ebextension) to modify the AWSEBAutoScalingGroup resource.
Follow these steps:
-
Create a new folder called .ebextensions in the root of your source bundle.
-
Inside the .ebextensions folder, create a configuration file with the .config extension, e.g., autoscaling.config.
-
In the autoscaling.config file, add the following configuration:
Resources:
AWSEBAutoScalingGroup:
Type: "AWS::AutoScaling::AutoScalingGroup"
Properties:
HealthCheckType: ELB
HealthCheckGracePeriod: 1200
Replace 1200 with the desired health check grace period value in seconds.
- Include the .ebextensions folder when generating the deployment package for your Elastic Beanstalk application.
This configuration file will override the default health check grace period (600 seconds) set by Elastic Beanstalk when updating the launch template. The HealthCheckType property is set to ELB, which means the Auto Scaling group will use Elastic Load Balancing health checks to determine an instance's health, in addition to Amazon EC2 status checks.
By including this configuration file in your deployment package, Elastic Beanstalk will apply the specified health check grace period value whenever it updates the launch template, ensuring that your desired setting is not reset.
Relevant content
- asked 2 years ago
- asked 3 years ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 3 years ago

Thank you. We already had an autoscaling.config setup within our solution that was updating the Health Check Grace period. This was set to 600 which was why the changes in the console were being overwritten.