Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinchisholm/88bd7a3ea504010b3890c61aea777aed to your computer and use it in GitHub Desktop.
Save kevinchisholm/88bd7a3ea504010b3890c61aea777aed to your computer and use it in GitHub Desktop.
service: my-user-pool
provider:
name: aws
stage: ${opt:stage, "dev"}
custom:
COGNITO_USER_POOL: ${self:service.name}-${self:provider.stage}
COGNITO_CLIENT: ${self:service.name}-cognito-client-${self:provider.stage}
resources:
Resources:
CognitoUserPool:
Type: AWS::Cognito::UserPool
Properties:
UserPoolName: ${self:custom.COGNITO_USER_POOL}
AutoVerifiedAttributes:
- email
CognitoUserPoolClient:
Type: AWS::Cognito::UserPoolClient
Properties:
ClientName: ${self:custom.COGNITO_CLIENT}
UserPoolId:
Ref: CognitoUserPool
# export the user pool
Outputs:
UserPoolId:
Value:
Ref: CognitoUserPool
Export:
Name: UserPoolId-${self:service.name}-${self:provider.stage}
UserPoolClientId:
Value:
Ref: CognitoUserPoolClient
Export:
Name: UserPoolClientId-${self:service.name}-${self:provider.stage}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment