Open maximelebastard opened 4 years ago
This enhancement should also be extended to S3 and Cognito User Pools.
Any updates about this?
I just released a custom GraphQL directive for Amplify to set the deletion policy of generated DynamoDB tables to Retain
. Like this it won't be deleted anymore when you change the name of a type or remove a type entirely!
In the end you can just add @retain
directive to your schema like this:
type Todo @model @retain {
id: ID!
title: String!
description: String
}
Check out the full installation instructions: https://github.com/flogy/graphql-retain-transformer
And please leave a ⭐️ if you like it! 😊 Thanks!
This is related to: aws-amplify/amplify-category-api#235
Is your feature request related to a problem? Please describe. I'm using Amplify in production for critical client data. I know I can't fully rely on Amplify to not delete my production data in the case of a mistake (Renaming a model by mistake for example). I can only rely on PITR Backups, but restoring them can take too long as we have to contact support if the Table has already been deleted.
Describe the solution you'd like I'd like to be able to use the Deletion Policy Retain in the stack generated for DynamoDB tables. This would ensure me that even if the stack is deleted, the production data is safe.
Describe alternatives you've considered I'm denying the table deletion to the Amplify Role. But it creates many issues and it's absolutely not comfortable to use. I also enabled PITR recovery, but it only limits the damages it doesn't prevent any incident.