Repository navigation
Expand file tree
/
Copy pathpool_cloudformation.yaml
More file actions
59 lines (58 loc) · 1.5 KB
/
Copy pathpool_cloudformation.yaml
File metadata and controls
59 lines (58 loc) · 1.5 KB
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
52
53
54
55
56
57
58
59
AWSTemplateFormatVersion: '2010-09-09'
Description: Cognito Stack
Parameters:
AuthName:
Type: String
Description: Unique Auth Name for Cognito Resources
Stage:
Type: String
Description: Unique Auth Name for Cognito Resources
Resources:
UserPool:
Type: "AWS::Cognito::UserPool"
Properties:
MfaConfiguration: "OFF"
UsernameConfiguration:
CaseSensitive: false
UserPoolName: !Sub ${AuthName}-${Stage}
AdminCreateUserConfig:
AllowAdminCreateUserOnly: false
UnusedAccountValidityDays: 1
AutoVerifiedAttributes:
- email
UsernameAttributes:
- email
Schema:
- Name: email
Mutable: true
Required: true
- Name: name
Mutable: true
- Name: authChallenge
AttributeDataType: String
Mutable: true
NumberAttributeConstraints:
MinValue: 1
MaxValue: 6
Policies:
PasswordPolicy:
MinimumLength: 8
RequireLowercase: True
RequireNumbers: True
RequireSymbols: True
RequireUppercase: True
UserPoolClient:
Type: "AWS::Cognito::UserPoolClient"
Properties:
ClientName: !Sub ${AuthName}-client
UserPoolId:
Ref: UserPool
ExplicitAuthFlows:
- CUSTOM_AUTH_FLOW_ONLY
PreventUserExistenceErrors: ENABLED
GenerateSecret: true
Outputs:
UserPoolId:
Value: !Ref UserPool
UserPoolClientId:
Value: !Ref UserPoolClient