sashoalm
sashoalm

Reputation: 79585

Don't create snapshot on stack deletion in CloudFormation

How can I disable snapshot creation when I delete a CloudFormation stack?

I create an Aurora DB Cluster in my stack, and when I try to delete it I often get this error and I can't completely delete the stack:

CREATE_FAILED AWS::RDS::DBClusterSnapshot Cannot create more than 100 manual snapshots

I don't want a snapshot at all.

Upvotes: 3

Views: 2123

Answers (2)

Łukasz Koniecki
Łukasz Koniecki

Reputation: 574

Set "DeletionPolicy" for "AWS::RDS::DBInstance":

DbInstance:
  Type: AWS::RDS::DBInstance
  DeletionPolicy: Delete
  Properties:
    Engine: aurora-postgresql

See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html

Upvotes: 2

Asdfg
Asdfg

Reputation: 12213

Set "DeletionPolicy" : "Delete" for your RDSDBCluster resource in CFT.

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html

Upvotes: 9

Related Questions