-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
81 lines (77 loc) · 1.57 KB
/
serverless.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
service: 'wallpost'
provider:
name: aws
runtime: nodejs10.x
stage: ${opt:stage, 'dev'}
region: ${opt:region, 'us-east-1'}
environment:
DB_HOSTNAME:
Fn::GetAtt:
- DBInstance
- Endpoint.Address
DB_PORT:
Fn::GetAtt:
- DBInstance
- Endpoint.Port
DB_NAME: '${self:service}_${self:provider.stage}_db'
DB_USERNAME: 'wallpost'
DB_PASSWORD: '123456789'
COGNITO_USER_POOL_ID:
Ref: UserPool
COGNITO_CLIENT_ID:
Ref: UserPoolClient
package:
individually: true
exclude:
- '*'
- '**/*'
functions:
signup:
handler: 'signup.handler'
package:
include:
- signup.js
events:
- http:
path: signup
method: post
signin:
handler: 'signin.handler'
package:
include:
- signin.js
events:
- http:
path: signin
method: post
getWall:
handler: 'getWall.handler'
package:
include:
- getWall.js
- node_modules/**
events:
- http:
path: getWall
method: get
authorizer:
type: COGNITO_USER_POOLS
authorizerId:
Ref: ApiGatewayAuthorizer
post:
handler: 'post.handler'
package:
include:
- post.js
- node_modules/**
events:
- http:
path: post
method: post
authorizer:
type: COGNITO_USER_POOLS
authorizerId:
Ref: ApiGatewayAuthorizer
resources:
- ${file(resources/cognito.yml)}
- ${file(resources/rds.yml)}