Skip to content

Instantly share code, notes, and snippets.

@adrianhall
Created April 13, 2018 22:02
Show Gist options
  • Save adrianhall/79a01799a579bbd59feb14f880800042 to your computer and use it in GitHub Desktop.
Save adrianhall/79a01799a579bbd59feb14f880800042 to your computer and use it in GitHub Desktop.
Some resources to generate a CloudFormation template for Amazon Cognito user pools
UserPool:
Type: "AWS::Cognito::UserPool"
Description: "A Cognito user pool for authenticating users"
Properties:
UserPoolName: !Sub ${APIName}-user-pool
AutoVerifiedAttributes:
- phone_number
MfaConfiguration: "ON"
SmsConfiguration:
ExternalId: !Sub ${APIName}-external
SnsCallerArn: !GetAtt SNSRole.Arn
Schema:
- Name: name
AttributeDataType: String
Mutable: true
Required: true
- Name: email
AttributeDataType: String
Mutable: false
Required: true
- Name: phone_number
AttributeDataType: String
Mutable: false
Required: true
UserPoolClient:
Type: "AWS::Cognito::UserPoolClient"
Description: "App Client used by AWS AppSync"
Properties:
ClientName: !Sub ${APIName}-appsync-client
GenerateSecret: false
UserPoolId: !Ref UserPool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment