Skip to content

Instantly share code, notes, and snippets.

@DejanBelic
Created December 11, 2019 08:45
Show Gist options
  • Save DejanBelic/91fa87e1c1d1d608de3387eddfad7050 to your computer and use it in GitHub Desktop.
Save DejanBelic/91fa87e1c1d1d608de3387eddfad7050 to your computer and use it in GitHub Desktop.
Cognito cloudformation template
AWSTemplateFormatVersion: '2010-09-09'
Resources:
CognitoUserPool:
Type: "AWS::Cognito::UserPool"
Description: "A Cognito user pool for authenticating users"
Properties:
UserPoolName: "NgAppUserPool"
UsernameAttributes: [email, phone_number] # Allow both email or phone number to user can sign in / sign up
Schema:
- Name: name
AttributeDataType: String
Required: false
- Name: email
AttributeDataType: String
Required: true
Policies:
PasswordPolicy:
MinimumLength: 8
RequireLowercase: true
RequireUppercase: true
RequireSymbols: true
UserPoolClient:
Type: AWS::Cognito::UserPoolClient
Description: "App Client used by CognitoUserPool"
Properties:
UserPoolId: !Ref CognitoUserPool
GenerateSecret: false
ClientName: "ng-app-client"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment