How to export Cognito User Pool settings to CloudFormation template?


I’ve created Cognito User Pool through AWS Console, but I want to automate creation of new Cognito User Pools through CloudFormation. Can I export my current User Pool configuration to CloudFormation template?


Its not possible to export. You would need the below 6 resources to automate the process.

  1. Cognito Authenticated role
  2. Cognito unAuthenticated role
  3. User pool
  4. User Pool Client
  5. Identity Pool
  6. Identity Pool Role attachment

You would need 3 outputs which you might need to use in your code. Below is the code for creating these

Leave a Reply