Search code examples
aws-cloudformationamazon-cognito

AWS Cognito: user pool delete protection?


Is there a way to prevent a cloud formation update from deleting or recreating a Cognito user pool resource? I'd like to remove the possibility of this from ever happening. Is there a way?


Solution

  • I found the answer. Use DeletionPolicy. Works for any Cloud Formation resource:

    MyPool:
      Type: AWS::Cognito::UserPool
      DeletionPolicy: Retain