不要在CloudFormation中创建堆栈删除快照

时间:2017-12-02 13:04:18

标签: amazon-web-services amazon-cloudformation amazon-rds-aurora

删除CloudFormation堆栈时,如何禁用快照创建?

我在我的堆栈中创建了一个Aurora数据库集群,当我尝试删除它时,我经常会遇到此错误而无法完全删除堆栈:

  

CREATE_FAILED AWS :: RDS :: DBClusterSnapshot无法创建超过100个手动快照

我根本不想要快照。

2 个答案:

答案 0 :(得分:6)

在CFT中为您的RDSDBCluster资源设置"DeletionPolicy" : "Delete"

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

答案 1 :(得分:1)

为“ AWS :: RDS :: DBInstance”设置“ DeletionPolicy”:

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

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