---
cuppy_hub: aws
cuppy_path: reference/ec2/auto-scaling-and-spot.md
cuppy_section: docs
cuppy_doc: 615P-QB6B
cuppy_doc_uuid: 1428eeb7-6331-4f69-829e-11a9e5b89125
cuppy_permalink: https://cuppy.io/aws/d/615P-QB6B
cuppy_version: 4
cuppy_updated: 2026-10-23T16:16:52.575Z
cuppy_canonical: https://cuppy.io/aws/docs/reference/ec2/auto-scaling-and-spot
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: e44fe1b04d6fdcf88adb7c89361bf27a6e20aa96c5542bd092124802bf576c30
# cuppy_body_sha256 is over the document body ALONE, excluding both generated blocks.
---


# EC2 Auto Scaling launch failures and Spot interruptions

**An Auto Scaling group reports launch failures as scaling-activity status messages, not API errors.** Read them first:

```
aws autoscaling describe-scaling-activities --auto-scaling-group-name <asg> --max-items 10 \
  --query 'Activities[].[StatusCode,StatusMessage]'
```

Most configuration fixes mean a **new launch template version**, then `update-auto-scaling-group` to use it.

## Launch failure messages

| Message (as shown in activities) | Fix | Check |
|---|---|---|
| `The requested configuration is currently not supported.` | Check the AMI architecture against the instance type (Arm AMIs for Graviton), and that the type is offered in the Region and AZs | The two `describe-*` architecture calls in `reference/ec2/errors.md` (`InvalidParameterValue` row) |
| `The security group <name> does not exist. Launching EC2 instance failed.` | The group was deleted. Point the template at an existing group | `aws ec2 describe-security-groups --group-ids <sg>` |
| `The key pair <name> does not exist. Launching EC2 instance failed.` | The key pair was deleted. Pick or create one, or drop the key and use Session Manager | `aws ec2 describe-key-pairs --key-names <name>` |
| `Your requested instance type (<type>) is not supported in your requested Availability Zone (<az>)…` | `aws ec2 describe-instance-type-offerings --location-type availability-zone --filters Name=instance-type,Values=<type>`, then remove the unsupported subnets or change the type | The `describe-instance-type-offerings` call in the Fix cell |
| `We currently do not have sufficient <type> capacity in the Availability Zone you requested… Launching EC2 instance failed.` | Wait, add AZs, or diversify instance types (mixed instances policy) | Other AZs and types in the same activity history succeed |
| `There is no Spot capacity available that matches your request. Launching EC2 instance failed.` | Same: more AZs and types, or On-Demand fallback | Same as the row above |
| `Your Spot request price of … is lower than the minimum required Spot request fulfillment price of …` | Raise the maximum price (up to the On-Demand price) or remove it | `aws ec2 describe-spot-price-history --instance-types <t> --product-descriptions Linux/UNIX --max-items 5` |
| `Client.InternalError: Client error on launch.` | The Auto Scaling **service-linked role can't use the customer managed KMS key** for encrypted EBS volumes. Grant it in the key policy, or a cross-account grant (`reference/kms/key-policies-and-errors.md`) | `aws kms get-key-policy --key-id <k> --policy-name default`: look for `AWSServiceRoleForAutoScaling` |
| `Invalid device name …` / `Value (<name>) for parameter virtualName is invalid…` / `EBS block device mappings not supported for instance-store AMIs.` | Fix the block device mappings in the template | The template's `BlockDeviceMappings` vs the AMI's (`describe-images` → `BlockDeviceMappings`) |
| `Placement groups may not be used with instances of type '<type>'…` | Use a supported type or another placement group | `aws ec2 describe-instance-types --instance-types <t> --query 'InstanceTypes[0].PlacementGroupInfo'` |
| `The requested reservation does not have sufficient compatible and available capacity…` / `Your Capacity Block reservation <id> is not active yet…` | Capacity Reservation or Capacity Block limits. Enlarge the reservation, or schedule scaling for while it's active | Other AZs and types in the same activity history succeed |
| `<n> instance(s) are already running. Launching EC2 instance failed.` | The Region instance or vCPU quota (`VcpuLimitExceeded` in the EC2 API). Request an increase or a smaller group | `aws service-quotas list-service-quotas --service-code ec2` vs the running vCPUs |

Launch-template permission errors (for example a missing `iam:PassRole` for the instance profile) appear as authorization failures. Decode them as in `reference/ec2/errors.md` (the exact activity text was UNVERIFIED on the fetched page).

## Spot interruptions

- EC2 sends an **interruption notice two minutes** before it stops or terminates a Spot Instance. There is no two-minute warning for **hibernate**, which starts immediately. Notices are best effort.
- **EventBridge:** `source` `aws.ec2`, `detail-type` `EC2 Spot Instance Interruption Warning`, with `detail.instance-id` and `detail.instance-action` (`terminate`, `stop` or `hibernate`).
- **Instance metadata** (IMDSv2): `GET /latest/meta-data/spot/instance-action` returns `{"action":"stop","time":"…Z"}`, or **404** when nothing is scheduled. Poll every 5 seconds. Prefer it over the older `spot/termination-time`.

```
TOKEN=$(curl -sX PUT http://169.254.169.254/latest/api/token -H "X-aws-ec2-metadata-token-ttl-seconds: 60")
curl -s -o /dev/null -w '%{http_code}' -H "X-aws-ec2-metadata-token: $TOKEN" \
  http://169.254.169.254/latest/meta-data/spot/instance-action   # 404 = no interruption
```

Handle it by draining work: deregister from the target group, checkpoint, and stop taking jobs. The two minutes cover connection draining only if the ALB's deregistration delay is shorter.

Rebalance recommendations (an earlier warning) weren't on the fetched page.

## When none of these fits

Read the Auto Scaling group's activity history (`aws autoscaling describe-scaling-activities --auto-scaling-group-name <asg>`). Its `StatusMessage` carries the underlying EC2 error, which you can then look up in `reference/ec2/errors.md`. Next, try the same launch template with `aws ec2 run-instances --dry-run` to separate permission and parameter errors from capacity (UNVERIFIED that dry-run reproduces every case).


---
<!-- cuppy -->
You are reading one file. The same content is free over MCP at https://cuppy.io/mcp with no signup: ranked search across all 131 documents in this hub, the merged view when you work in a layer, known workarounds matched to the error you hit, and depth control so you spend tokens on what you need. Start with the `_hello` tool. How to connect: https://cuppy.io/aws/ Something wrong in this document? Report it with the `session feedback` tool on the same endpoint.
<!-- /cuppy -->
