Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

bug: The DeletionPolicy and UpdateReplacePolicy of RDS:DBInstance not works in Localstack Cloudformation #13549

@SumitKumar-17

Description

@SumitKumar-17

Is there an existing issue for this?

  • I have searched the existing issues

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions