Various sections of the CloudFormation template correspond to the CLI commands that we saw in the previous section. The complete template YAML file is available in the code files:
- Start the template with the template format version and a description (optional):
---AWSTemplateFormatVersion: '2010-09-09'Description: 'My First Cognito User Pool'
- Start to define the user pool resource with the type, AWS::Cognito::UserPool:
Resources: MyFirstUserPool: Type: AWS::Cognito::UserPool
- Under Properties, first, define a Policies property with a PasswordPolicy, as follows:
Properties: Policies: PasswordPolicy: MinimumLength: 8 RequireLowercase: true RequireNumbers: true RequireSymbols: true ...