Is there a way to delay registration until the build/deployment has completed? Alternately, is there a way to avoid starting Tomcat until the build/deployment has completed?
You'll want to delay the instances in ASG-A from being registered to the NLB until the application is done being installed. You can do this by adding a Lifecycle Hook (LCH) to the ASG. The last step if your CHEF cookbook should be to complete the lifecycle action with the CONTINUE action so AutoScaling registers the instance to the NLB's target group and moves the instance to InService.
Also, since you mentioned it takes ~10 minutes, you may want to look into using a Warm Pool on the ASG if their isn't frequent changes to the application/data to be loaded on the instance. A warm pool lets you pre-launch instances into an ASG, configure them (via a LCH), and then they're stopped. When the desired capacity goes up, the pre-configured instances in the warm pool will be started, saving you lots of time. Keep in mind that the launching LCH will run again when the instance is being moved to InService, so you'll either need to run the UserData again to apply any new updates + complete the hook, or trigger another process (like a lambda function) to complete the LCH, otherwise the instance will sit there in Pending:Wait and you'll lose all the time savings
Health check at NLB level for a Fargate Serviceasked 4 months ago
nginx with NLB - health check succeeds, nginx is not responsiveAccepted Answerasked 3 years ago
Why does the EC2 Auto Scaling Group automatically generate Scheduled Actions?Accepted Answerasked 10 months ago
Spot Instance interruption while CodeDeploy is running a deployment to an Auto Scaling groupAccepted AnswerEXPERTasked 2 years ago
Auto Scaling Group not scaling based on ECS desired task countasked 4 months ago
Amazon EC2 Auto Scaling based on memory utilizationasked 6 months ago
TCP health check with NLBasked 6 months ago
How to handle error? You cannot change the health check interval for a target group with the TCP protocolasked 6 months ago
Unable to access Spring Boot application deployed on AWS EC2 instance (Windows Server 2022)asked 3 months ago
NLB-ECS Health CheckAccepted Answerasked 2 years ago