# aws cloudformation describe-stack-events

AWS CLI commands · Updated 16 November 2026

**Short answer:** aws cloudformation describe-stack-events --stack-name my-stack lists every status change for a stack and its resources, newest first, with a ResourceStatusReason for failures. To find why a deployment failed, look for the earliest event ending in _FAILED in the latest operation; later failures are usually just the rollback cascading.

## What the command does

Each event records one resource changing state: `LogicalResourceId`, `ResourceType`, `ResourceStatus`, `ResourceStatusReason` and `Timestamp`. Events for the stack itself have the stack name as their logical ID. The CLI fetches every page by default, so on a long-lived stack the full history can be thousands of events; use `--max-items` and `--query`.

## Syntax

```
aws cloudformation describe-stack-events --stack-name <name-or-stack-id> [--max-items <n>]
```

## Worked examples

**The last 25 events in a readable table:**

```
aws cloudformation describe-stack-events --stack-name orders-api --max-items 25 \
  --query "StackEvents[].[Timestamp,LogicalResourceId,ResourceStatus,ResourceStatusReason]" \
  --output table
```

**Only failures, with reasons:**

```
aws cloudformation describe-stack-events --stack-name orders-api --max-items 200 \
  --query "StackEvents[?ends_with(ResourceStatus, 'FAILED')].[Timestamp,LogicalResourceId,ResourceType,ResourceStatusReason]" \
  --output text
```

**The root cause**: the oldest failure in that list is usually the real one. Reverse the order to read it first:

```
aws cloudformation describe-stack-events --stack-name orders-api --max-items 200 \
  --query "reverse(StackEvents[?ends_with(ResourceStatus, 'FAILED')])[0].[LogicalResourceId,ResourceStatusReason]" \
  --output text
```

**Follow a deployment live** with a simple loop (prints the newest few events every 10 seconds):

```
while true; do
  clear
  aws cloudformation describe-stack-events --stack-name orders-api --max-items 15 \
    --query "StackEvents[].[Timestamp,LogicalResourceId,ResourceStatus]" --output text
  sleep 10
done
```

## Common failure reasons and what they mean

| Reason contains | Usually means |
|---|---|
| `Resource handler returned message: ... AccessDenied` | The deploying role (or your credentials) lacks permission for that resource type |
| `already exists` | A resource with that physical name exists outside the stack; see [resource already exists](https://cloudconsole.dev/errors/cloudformation-resource-already-exists) |
| `Resource creation cancelled` | Not the cause: another resource failed first and CloudFormation cancelled the rest |
| `did not stabilize` | The resource was created but never became healthy, e.g. an ECS service whose tasks keep failing |
| `Requires capabilities` | You must pass `--capabilities`; see [requires capabilities](https://cloudconsole.dev/errors/cloudformation-requires-capabilities) |

## Gotchas

- **Newest first.** The top of the list is the end of the story (often `ROLLBACK_COMPLETE`), not the start.
- **Nested stacks hide the real error.** The parent shows the nested stack resource as failed with a generic message. Describe the nested stack's own events, using its physical ID from the parent's events.
- **Deleted stacks** need the stack ID ARN, not the name.
- **Operations are interleaved.** Events from last month's update and today's sit in one list. Find the most recent stack-level `UPDATE_IN_PROGRESS` or `CREATE_IN_PROGRESS` event and only read events after its timestamp.
- **Who started it is not here.** Events say what happened, not which person or pipeline ran the deploy; CloudTrail records the `UpdateStack` or `ExecuteChangeSet` call and its caller.
- **Pagination cost.** Without `--max-items` the CLI fetches the entire history, which is slow on busy stacks.

## Questions

### How do I see only the failed events of a CloudFormation stack?

Filter with --query "StackEvents[?ends_with(ResourceStatus, 'FAILED')]" and add --max-items so the CLI does not fetch the whole history.

### Why do I see "Resource creation cancelled" on many resources?

Those resources were stopped because another resource failed. Scroll further back for the first FAILED event; that one has the real reason.

### Is there a way to stream CloudFormation events?

Not with this command; poll it with a loop. CloudFormation can also send stack events to EventBridge, where a rule can notify you or trigger automation.

## When this happens away from your desk

Deploys that fail after hours tend to leave a puzzle for the morning. CloudConsole is built to put AWS resources, alarms and logs on a phone so you can see how bad it is right away.

[About the CloudConsole app](https://cloudconsole.dev/aws-console-app) · [Download on the App Store](https://apps.apple.com/app/cloudconsole-for-aws/id6835419710)

## Sources

- [aws cloudformation describe-stack-events (AWS CLI Command Reference)](https://docs.aws.amazon.com/cli/latest/reference/cloudformation/describe-stack-events.html)
- [Monitor stack progress (AWS CloudFormation User Guide)](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/monitor-stack-progress.html)

## Related

- [aws cloudformation describe-stacks](https://cloudconsole.dev/cli/cloudformation-describe-stacks)
- [UPDATE_ROLLBACK_FAILED](https://cloudconsole.dev/errors/cloudformation-update-rollback-failed)
- [Resource already exists in stack](https://cloudconsole.dev/errors/cloudformation-resource-already-exists)
- [aws cloudformation continue-update-rollback](https://cloudconsole.dev/cli/cloudformation-continue-update-rollback)
- [Requires capabilities: [CAPABILITY_IAM]](https://cloudconsole.dev/errors/cloudformation-requires-capabilities)
- [aws cloudformation delete-stack](https://cloudconsole.dev/cli/cloudformation-delete-stack)

---

Source: https://cloudconsole.dev/cli/cloudformation-describe-stack-events

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
