ERROR REFERENCE
Stack already exists during a CloudFormation create operation
A CloudFormation create operation targeted an existing stack name
A direct CreateStack call or a CREATE-type change set named a stack
that already exists in the selected account and Region. The message is not proof
that deletion is safe or that the current caller can even inspect the stack.
WHAT IT MEANS
What this error means
An error occurred (AlreadyExistsException) when calling the CreateStack operation:
Stack [my-app] already exists
An error occurred (ValidationError) when calling the CreateChangeSet operation:
Stack [my-app] already exists and cannot be created again with the changeSet [deploy].
CREATE is only for a stack that does not exist. The name may belong to the
deployment you intended to update, a different profile or Region, another
samconfig.toml environment, or a separate deployment entirely.
SAFE NEXT STEPS
Confirm the stack before changing anything
-
Confirm the caller and Region, then inspect the exact stack read-only.
aws sts get-caller-identity aws cloudformation describe-stacks --stack-name YOUR_STACK --region YOUR_REGION \ --query "Stacks[0].[StackId,StackStatus,CreationTime]" --output table -
Handle a review stack carefully. If the status is
REVIEW_IN_PROGRESS, list its change sets before making any decision:aws cloudformation list-change-sets --stack-name YOUR_STACK --region YOUR_REGION - Choose the intended path. Use an update-capable path only for the stack you own and expect to update. Otherwise correct the stack name, profile, Region, SAM configuration environment, or change-set type; use another name when a different deployment owns this one.
-
Do not turn every failed lookup into "absent". A denied
describe-stacksrequest is a permissions problem, not evidence that no stack exists. Branch only on CloudFormation's explicit not-found response. - Do not delete from this message alone. Review the stack identity, status, retained resources, and termination protection before selecting a cleanup path.
AUTOMATE THE TRIAGE
Diagnose this automatically
SAM Doctor recognizes the direct create and CREATE-type change-set forms, keeps S3 bucket conflicts and terminal-stack recovery separate, and runs locally without AWS credentials or log upload.
python -m pip install sam-doctor
sam-doctor diagnose deployment.log --format markdown
RELATED
Related errors
- ROLLBACK_COMPLETE or DELETE_COMPLETE — a terminal stack cannot take an update.
- Another stack operation is in progress — wait for the existing operation before starting one.
- Failed to create a change set — the general configuration handoff when no concrete reason is present.