Is there an existing issue for this?
Current Behavior
While using LocalStack, I observed an issue with a CloudFormation template.yaml that deploys correctly on AWS (verified), but fails when deployed to LocalStack.
The issue occurs with AWS::RDS::DBInstance when the following policies are used:
DeletionPolicy: !If [IsProduction, Snapshot, Delete]
UpdateReplacePolicy: !If [IsProduction, Snapshot, Delete]
When these policies are present, the stack creation fails with the following error:
Waiting for stack creation to complete...
📦 Creating CloudFormation stack...
An error occurred (AlreadyExistsException) when calling the CreateStack operation:
Stack [tap-stack-localstack] already exists
I verified that no stack with the same name exists in LocalStack before deployment.
If these two policies are present, the stack creation immediately fails, without waiting or providing any meaningful status or explanation.
When I comment out DeletionPolicy and UpdateReplacePolicy, the same YAML template works perfectly in LocalStack.
Expected Behavior
The stack should either deploy successfully or fail with a clear and descriptive error explaining the unsupported behavior.
How are you starting LocalStack?
Using a Docker setup.
Steps To Reproduce
How are you starting LocalStack?
docker run localstack/localstack
Client commands
awslocal s3 mb s3://mybucket
Environment
- OS:
- LocalStack:
- LocalStack version:
- LocalStack Docker image sha:
- LocalStack build date:
- LocalStack build git hash:
Anything else?
No response
Is there an existing issue for this?
Current Behavior
While using LocalStack, I observed an issue with a CloudFormation
template.yamlthat deploys correctly on AWS (verified), but fails when deployed to LocalStack.The issue occurs with
AWS::RDS::DBInstancewhen the following policies are used:When these policies are present, the stack creation fails with the following error:
I verified that no stack with the same name exists in LocalStack before deployment.
If these two policies are present, the stack creation immediately fails, without waiting or providing any meaningful status or explanation.
When I comment out
DeletionPolicyandUpdateReplacePolicy, the same YAML template works perfectly in LocalStack.Expected Behavior
The stack should either deploy successfully or fail with a clear and descriptive error explaining the unsupported behavior.
How are you starting LocalStack?
Using a Docker setup.
Steps To Reproduce
How are you starting LocalStack?
Client commands
Environment
Anything else?
No response