'AWS CloudFormation template to use Cognito

I have been trying to add a User Pool using AWS cloud formation template but it fails on the Deploy executechange set stage.

CognitoUsers:
Type: AWS::Cognito::UserPool
Properties:
  UserPoolName: MoreLinksUsers-pool
  UsernameConfiguration:
    CaseSensitive: false
  AdminCreateUserConfig:
    AllowAdminCreateUserOnly: true
  Policies:
    PasswordPolicy:
      MinimumLength: 8
      RequireLowercase: true
      RequireSymbols: true
      RequireUppercase: true
      TemporaryPasswordValidityDays: 1
  UsernameAttributes:
    - email
  MfaConfiguration: "OFF"
  Schema:
    - AttributeDataType: String
      DeveloperOnlyAttribute: false
      Mutable: true
      Name: email

 ClientAppClient:
  Type: AWS::Cognito::UserPoolClient
  Properties:
    UserPoolId: !Ref CognitoUsers
    ClientName: ClientApp
    GenerateSecret: false
    RefreshTokenValidity: 30
    AllowedOAuthFlows:
      - code
      - implicit
    ExplicitAuthFlows:
      - ALLOW_USER_SRP_AUTH
      - ALLOW_REFRESH_TOKEN_AUTH
    # CallbackURLs: !Ref AllowedCallbacks
    AllowedOAuthScopes:
      - email
      - openid
      - profile
      - aws.cognito.signin.user.admin
    AllowedOAuthFlowsUserPoolClient: true
    PreventUserExistenceErrors: ENABLED
    SupportedIdentityProviders:
      - COGNITO

Any attribute that I'm missing? Any advice would be greatly appreciated. Thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source