---
title: "Auto Scaling lifecycle hook abandoned the launch: timeout or ABANDON call? | Proofline"
description: "A Cancelled launch with Lifecycle Action Completed with ABANDON Result means a launch hook ended in ABANDON, by timeout or by an explicit call."
url: https://proofline.sh/learn/asg-lifecycle-hook-timeout-abandon/
---

[Learning center](/learn/)

# Auto Scaling lifecycle hook abandoned the launch: timeout or ABANDON call?

A Cancelled launch with Lifecycle Action Completed with ABANDON Result means a launch hook ended in ABANDON, by timeout or by an explicit call. Compare how long the instance waited with the hook's HeartbeatTimeout, then look for a CompleteLifecycleAction call for that instance. A wait as long as the timeout with no call is a timeout; a shorter wait with a call is the deploy agent reporting its own failure.

Deployment failures The Proofline team November 22, 2026 6 min read

## The signature and its nearby causes

A launch lifecycle hook holds a new instance in `Pending:Wait` while something prepares it: a user data script, a deploy agent, or a Lambda function triggered by EventBridge. Whatever does the work must call `CompleteLifecycleAction` with `CONTINUE` for the launch to proceed. When the hook ends in `ABANDON`, Auto Scaling terminates the instance and launches a replacement, and the launch activity records it. AWS's examples show `StatusCode` `Cancelled` with a status message that begins `Instance failed to complete user's Lifecycle Action` and ends `Lifecycle Action Completed with ABANDON Result`. [Retrieve an error message](https://docs.aws.amazon.com/autoscaling/ec2/userguide/CHAP_Troubleshooting.html) · [Lifecycle hooks](https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html)

The same message covers three situations:

-   The hook timed out. `DefaultResult` is the action taken when the heartbeat timeout elapses or an unexpected failure occurs, and its default is `ABANDON`. An agent that never ran, lacked permission, or never reached the API looks like this.
-   The agent called `CompleteLifecycleAction` with `ABANDON` itself. AWS's Lambda tutorial does exactly this when its custom action fails. The hook worked; the agent's own check failed.
-   The hook uses `CONTINUE` and nothing abandoned. The instance waits, and after the timeout goes into service without the work finishing. This leaves no cancelled activity, only a slow launch and a deploy that seems to stall.

[LifecycleHook](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_LifecycleHook.html) · [PutLifecycleHook](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_PutLifecycleHook.html)

## Read the hooks

Use a read-only profile and replace the uppercase placeholders. [describe-lifecycle-hooks](https://docs.aws.amazon.com/cli/latest/reference/autoscaling/describe-lifecycle-hooks.html)

```
aws autoscaling describe-lifecycle-hooks \
  --profile PROFILE --region REGION --auto-scaling-group-name GROUP \
  --query 'LifecycleHooks[].{name:LifecycleHookName,transition:LifecycleTransition,heartbeat:HeartbeatTimeout,global:GlobalTimeout,default:DefaultResult,target:NotificationTargetARN}' \
  --output json --no-cli-pager
```

Only hooks with `autoscaling:EC2_INSTANCE_LAUNCHING` matter here. `heartbeat` is how long an instance can wait without a heartbeat; the range is 30 to 7200 seconds and the default is 3600. Each `RecordLifecycleActionHeartbeat` call restarts that timer, up to `global`, which is 48 hours or 100 times the heartbeat timeout, whichever is smaller. An empty `target` means the hook relies on EventBridge or user data, not an SNS topic or SQS queue. [Add lifecycle hooks](https://docs.aws.amazon.com/autoscaling/ec2/userguide/adding-lifecycle-hooks.html) · [Complete a lifecycle action](https://docs.aws.amazon.com/autoscaling/ec2/userguide/completing-lifecycle-hooks.html)

## Time the abandoned launches

```
aws autoscaling describe-scaling-activities \
  --profile PROFILE --region REGION --auto-scaling-group-name GROUP \
  --filters Name=Status,Values=Cancelled \
  --query 'Activities[].{start:StartTime,end:EndTime,description:Description,message:StatusMessage}' \
  --output json --no-cli-pager

aws autoscaling describe-auto-scaling-groups \
  --profile PROFILE --region REGION --auto-scaling-group-names GROUP \
  --query 'AutoScalingGroups[0].Instances[?LifecycleState==`"Pending:Wait"`].{id:InstanceId,version:LaunchTemplate.Version,zone:AvailabilityZone}' \
  --output json --no-cli-pager
```

The time from `start` to `end` covers boot plus the wait. If every cancelled launch lasts roughly the boot time plus `HeartbeatTimeout`, the timeout ended them. If they end minutes after launch, well inside the timeout, something called `ABANDON`. Timing alone cannot separate a timeout from an `ABANDON` sent just before it, so confirm either reading with the agent's call below. The second command lists instances waiting now; during an instance refresh, these are the replacements the refresh is waiting on. [describe-scaling-activities](https://docs.aws.amazon.com/cli/latest/reference/autoscaling/describe-scaling-activities.html)

## Look for the agent's call

CloudTrail records Auto Scaling API calls, including who made them and their request parameters. Look up `CompleteLifecycleAction` and `RecordLifecycleActionHeartbeat` in the window of a cancelled launch, and read `CloudTrailEvent` for the hook name, the instance ID and the result. [Auto Scaling in CloudTrail](https://docs.aws.amazon.com/autoscaling/ec2/userguide/logging-using-cloudtrail.html) · [lookup-events](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/lookup-events.html)

```
aws cloudtrail lookup-events \
  --profile PROFILE --region REGION \
  --lookup-attributes AttributeKey=EventName,AttributeValue=CompleteLifecycleAction \
  --start-time LAUNCH_START_TIME --end-time LAUNCH_END_TIME \
  --query 'Events[].{time:EventTime,user:Username,event:CloudTrailEvent}' \
  --output json --no-cli-pager
```

Read the call first. A successful `CompleteLifecycleAction` for this hook and instance settles the case whatever the timing; the wait only decides when no such call succeeded.

| Call for this instance | Wait compared with `HeartbeatTimeout` | Reading |
| --- | --- | --- |
| Succeeded with `ABANDON`, matching hook and instance | Any, even just under the timeout | The agent reported failure; its own log has the reason |
| None | About equal | The agent never completed the action: it did not run, could not authenticate, or did not receive the event |
| Present but failed, or naming another hook, group or instance | About equal | The call did not complete this action; compare its `errorCode`, hook name, group name and instance ID or token with the hook |
| Heartbeats | Instance still in `Pending:Wait` | The agent is still working, and the launch waits up to the global timeout |

For "did not run" and "could not authenticate", AWS lists the prerequisites. A user data script that completes the action needs an instance profile whose role allows the call. A Lambda function needs the permission on its execution role, and its EventBridge rule must be in the group's Region. A hook created with an SNS topic or SQS queue needs a role that lets Auto Scaling publish to it. If the release changed the instance profile, the agent or the rule, start there. [Prepare to add a lifecycle hook](https://docs.aws.amazon.com/autoscaling/ec2/userguide/prepare-for-lifecycle-notifications.html)

## What abandoning does to a deploy

Each abandoned launch terminates the instance and starts another, so a broken agent turns into a loop of launches that never reach `InService`. AWS throttles launches when hooks fail consistently, which makes the loop slower and the rollout look stuck. An instance refresh that cannot launch any healthy instances eventually fails; see [instance refresh failures](/learn/asg-instance-refresh-failed/). The `CONTINUE` case fails differently: instances go into service without the deploy, and can then fail load balancer health checks, which [the health check guide](/learn/asg-elb-health-check-replaces-new-instances/) covers. [Lifecycle hooks considerations](https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html)

## Two fictional outcomes

The group `orders-asg` has a launch hook `orders-deploy` with `HeartbeatTimeout` 600 and `DefaultResult` `ABANDON`. A script in user data installs the `orders` service and calls `complete-lifecycle-action` with `CONTINUE`. Launch template version 8 switches the instance profile to a new role.

In the first outcome, every launch since the switch is `Cancelled` about 11 minutes after it started: roughly a minute of boot plus the 600-second timeout. CloudTrail has no `CompleteLifecycleAction` event for those instances, and the script's log on a kept instance ends with an access denied error. The new role lacks permission to complete the action, so the hook timed out. Adding the permission to the role fixes the launches without touching the hook.

In the second outcome, launches end `Cancelled` after three minutes, well inside the timeout. CloudTrail shows `CompleteLifecycleAction` with result `ABANDON` from the instance role. The script ran and reported failure: its log shows the release artifact for version 8 could not be downloaded. The hook and its permissions are fine; the artifact is the cause.

## Fix and confirm

Fix what the table points to: the agent's permissions or trigger, the agent itself, or the hook settings. If the work legitimately takes longer than the timeout, raise `HeartbeatTimeout` with `put-lifecycle-hook` or have the agent send heartbeats; both are changes. Keep `ABANDON` as the default result if an unprepared instance must never take traffic. [put-lifecycle-hook](https://docs.aws.amazon.com/cli/latest/reference/autoscaling/put-lifecycle-hook.html) · [record-lifecycle-action-heartbeat](https://docs.aws.amazon.com/cli/latest/reference/autoscaling/record-lifecycle-action-heartbeat.html)

Confirm on the next launch: the activity ends `Successful`, the instance moves from `Pending:Wait` to `InService` in about the time the work takes, and CloudTrail shows a `CompleteLifecycleAction` call with `CONTINUE` for that instance.

## Where this reading stops

The status message is the same for a timeout and for an explicit `ABANDON`, so the timing and the API call carry the distinction. A missing CloudTrail event shows that no completed call was recorded for that window; it cannot tell you why the agent stayed silent. Launch hooks do not run when you attach instances or move them out of standby. Scaling activities are kept for six weeks. For the other launch and health signatures, see [the signature table](/learn/aws-deployment-failure-signatures/).

## Questions

### What does Lifecycle Action Completed with ABANDON Result mean?

A launch lifecycle hook ended with `ABANDON`, so Auto Scaling terminated the new instance and recorded the launch as `Cancelled`. Either the hook timed out with its default result of `ABANDON`, or something called `CompleteLifecycleAction` with `ABANDON`.

### What is the default result of an Auto Scaling lifecycle hook?

`ABANDON`, with a heartbeat timeout of 3600 seconds unless you set one. A launching instance that is not completed in time is terminated and replaced.

### Why is my Auto Scaling instance stuck in Pending:Wait?

A launch hook is waiting for `CompleteLifecycleAction`. It waits until the heartbeat timeout, or longer if the agent sends heartbeats, up to the global timeout. Check that the agent ran and has permission to complete the action.

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Auto Scaling replaces new instances for failing ELB health checks](/learn/asg-elb-health-check-replaces-new-instances/)
    
    Deployment failures The Proofline team November 22, 2026 7 min read
    
-   ### [EC2 Auto Scaling instance refresh failed, cancelled or rolled back](/learn/asg-instance-refresh-failed/)
    
    Deployment failures The Proofline team November 22, 2026 6 min read
