-
Notifications
You must be signed in to change notification settings - Fork 0
/
cognito-user-pool.yml
51 lines (51 loc) · 2.13 KB
/
cognito-user-pool.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Resources:
CognitoUserPool:
Type: AWS::Cognito::UserPool
Properties:
UserPoolName: ${self:provider.stackTags.name}-v1-user-pool
UsernameAttributes:
- email
AutoVerifiedAttributes:
- email
LambdaConfig:
# use this to confgure custom actions within cognito actions
# PreSignUp: !GetAtt V1DashcognitoDashpreDashsignDashupLambdaFunction.Arn
# PostConfirmation: !GetAtt V1DashcognitoDashpostDashsignDashupLambdaFunction.Arn
Policies:
PasswordPolicy:
MinimumLength: 8
RequireLowercase: true
RequireNumbers: true
RequireSymbols: true
RequireUppercase: true
MfaConfiguration: OFF
UserPoolAddOns:
AdvancedSecurityMode: OFF
# EmailConfiguration:
# From: "[email protected]"
# ReplyToEmailAddress: "[email protected]"
CognitioDomainConfig:
Type: AWS::Cognito::UserPoolDomain
Properties:
UserPoolId: !Ref CognitoUserPool
Domain: syn-auth
PreSignUpLambdaInvokePermission:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:*
Principal: cognito-idp.amazonaws.com
FunctionName: !GetAtt V1DashcognitoDashpreDashsignDashupLambdaFunction.Arn
SourceArn: !GetAtt CognitoUserPool.Arn
PostSignUpLambdaInvokePermission:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:*
Principal: cognito-idp.amazonaws.com
FunctionName: !GetAtt V1DashcognitoDashpostDashsignDashupLambdaFunction.Arn
SourceArn: !GetAtt CognitoUserPool.Arn
# We will need to also include IdentityProvider here https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolidentityprovider.html
# Print out the Id of the User Pool that is created
Outputs:
UserPoolId:
Value:
Ref: CognitoUserPool