-
Notifications
You must be signed in to change notification settings - Fork 0
/
resources.yml
52 lines (48 loc) · 1.2 KB
/
resources.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
52
# Notes dynamodb table
notesTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: notes-${self:provider.stage}
BillingMode: PAY_PER_REQUEST
AttributeDefinitions:
- AttributeName: notesId
AttributeType: S
KeySchema:
- AttributeName: notesId
KeyType: HASH
# Cognito user pool
cognitoUserPool:
Type: AWS::Cognito::UserPool
Properties:
UserPoolName: MyNotesUP-${self:provider.stage}
# User pool web client
cognitoUserPoolWebclient:
Type: AWS::Cognito::UserPoolClient
Properties:
UserPoolId: !Ref cognitoUserPool
ClientName: web
AllowedOAuthFlowsUserPoolClient: true
SupportedIdentityProviders:
- COGNITO
AllowedOAuthScopes:
- phone
- email
- profile
- openid
AllowedOAuthFlows:
- implicit
CallbackURLs:
- http://localhost:3000
# User pool domain
cognitoUserPoolDoamin:
Type: AWS::Cognito::UserPoolDomain
Properties:
UserPoolId: !Ref cognitoUserPool
Domain: mynotescd-${self:provider.stage}
# Application parameters
userPoolArnParam:
Type: AWS::SSM::Parameter
Properties:
Name: /notes/${self:provider.stage}/userPoolArn
Type: String
Value: !GetAtt cognitoUserPool.Arn