CloudFormation: Resource ... already exists (AlreadyExists / already exists in stack)
The template tries to create a resource with a fixed name that already exists — created manually, by another stack, or left over after deletion (retained resource).
Seen on:
AWS
Meaning
Explicit names (BucketName, TableName, RoleName, log group names) must be unique. Retained resources from deleted stacks and log groups auto-created by Lambda are common culprits.
Common causes
- Resource with the same name created outside CloudFormation
- Another stack owns a resource with that name
- DeletionPolicy: Retain left it behind
- Lambda auto-created its log group before the stack did
⚡ Quick fix
- Let CloudFormation generate names (remove the explicit name)
- Import the existing resource into the stack
- Delete the leftover resource if safe
Detailed fix by platform
AWS CLI
aws cloudformation describe-stack-events --stack-name app --query "StackEvents[?contains(ResourceStatusReason, 'already exists')].[LogicalResourceId,ResourceStatusReason]"
How to diagnose
- Owner — Which stack/tool created it?
- Name — Explicit name in the template?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- ALREADY_EXISTS API Error: Resource already exists (ALREADY_EXISTS / resource_already_exists / 409)
- BucketAlreadyExists BucketAlreadyExists: The requested bucket name is not available
- IAM AccessDeniedException AccessDeniedException: User: arn:aws:iam::... is not authorized to perform: service:Action on resource: ...
Most viewed in AWS
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026