Closed allanchua101 closed 5 years ago
@allanchua101 we have worked around this by using AWS::DynamoDB::Table directly in our SAM templates or via a nested stack if you wish to keep your DB definitions in a separate template.
@allanchua101 RetentionPolicy
is not a valid CloudFormation resource attribute. You should use DeletionPolicy with a value of Retain
to keep a resource after stack deletion. SAM does support adding DeletionPolicy
to AWS::Serverless::SimpleTable
resource types.
@allanchua101
RetentionPolicy
is not a valid CloudFormation resource attribute. You should use DeletionPolicy with a value ofRetain
to keep a resource after stack deletion. SAM does support addingDeletionPolicy
toAWS::Serverless::SimpleTable
resource types.
Why? IMHO, It's very useful based from what I saw from the other forums.
In order to protect data stored in DynamoDB, we need a mechanism to retain it after decommissioning a CF stack. This is currently possible on Cloud Formation but not in SAM. I am getting the exception below:
Failed to create the changeset: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state Status: FAILED. Reason: Transform AWS::Serverless-2016-10-31 failed with: Invalid Serverless Applica tion Specification document. Number of errors found: 1. Resource with id [WatchHistory] is invalid. property RetentionPolicy not defined for resource of type AWS::Serverless::SimpleTable