Neither of the two of us on our small team are AWS experts by any stretch of the imagination. We have several Spring Boot applications deployed through Bitbucket Pipelines to AWS EC2 instances. These are single-instance, auto-scaling (up to 2 instances max) Elastic Beanstalk applications.
tl;dr
Why are my single-instance, auto-scaling (rarely actually triggered), Spring Boot applications that take seconds to start up taking over 10 minutes per environment to deploy via Bitbucket Pipelines with Elastic Beanstalk? We're using an Immutable deployment policy, and it appears that most of the time is spent waiting for health checks to pass. How can I reduce the deployment time?
--
Here's one of the instances' "Rolling Updates and Deployment" configuration:
Batch size: 100%
Batch size:
Command timeout: 600
Deployment policy: Immutable
Healthy threshold: Ok
Ignore health check: disabled
Minimum capacity:
Rolling update type: Immutable
Rolling updates: enabled
I can't find any real options to configure the health check for an auto-scaling application. I've found the Auto-Scaling Groups, and checked their health check settings, but the options are very limited. Currently, they're set to EC2 health check type only (ELB is NOT checked), with a grace period of 0 seconds.
After reading https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-healthchecks.html, I worry that somewhere, it's set with similar default values, 30 second interval, with a minimum of 10 successful health checks in order for the instance to be declared healthy.
Where can I see or configure more detailed settings for the health check being used by my auto-scaling, immutable deploy, single-instance applications?