- Newest
- Most votes
- Most comments
Lifecycle Action Completed with ABANDON Result
This means an explicit ABANDON result was returned via complete-lifecycle-action (you could confirm in CloudTrail, but in these situations, its almost certainly from CodeDeploy)
You'll want to look at the DeploymentGroup and one of the individual Deployments to see what step is failing in CodeDeploy, leading to the failure.
If you need the CodeDeploy agent logs from inside the instance, you could manually send a complete-lifecycle-action call with a CONTINUE result the moment an instance is launched (and before CodeDeploy has a chance to send ABANDON). This will move the instance to InService so you can see the logs and troubleshoot it further
Hello.
Certainly! The issue you're facing typically arises when the lifecycle action isn't completing successfully within the set time frame, causing the Auto Scaling group (ASG) to abandon the instance and try again. Increase the Heartbeat Timeout: By default, instances have an hour to complete the lifecycle action. If your application takes longer than this to install or initialize, the lifecycle action can be abandoned, causing the instance to terminate. Increase the heartbeat timeout to give your instances more time to initialize. https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html#:~:text=is%20one%20hour%20(-,heartbeat%20timeout,-).%20There%20is%20also
Regards, Andrii
Relevant content
- asked a year ago
- asked 4 years ago
- asked 6 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 7 months ago
Thank you for answering my question @Andrii S
I have kept the heartbeat timeout to 10 mins. But every 2 mins my instance is getting terminated
When using CodeDeploy, the hook is created/managed by CodeDeploy, so its not generally a good idea to extend the heartbeat or otherwise modify the hook