-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
49 lines (43 loc) · 1.16 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
service: sls
frameworkVersion: '2'
useDotenv: true
package:
individually: true
plugins:
- serverless-bundle # Package our functions with Webpack
- serverless-offline
provider:
name: aws
runtime: nodejs12.x
region: us-east-1
lambdaHashingVersion: 20201221
# environment:
# MONGODB_URL: ${env:MONGODB_URL}
# JWT_SECRET: ${env:JWT_SECRET}
# JWT_ISSUER: ${env:JWT_ISSUER}
# JWT_AUDIENCE: ${env:JWT_AUDIENCE}
# apiGateway:
# restApiId:
# 'Fn::ImportValue': ${self:custom.stage, 'dev'}-ApiGatewayRestApiId
# restApiRootResourceId:
# 'Fn::ImportValue': ${self:custom.stage, 'dev'}-ApiGatewayRestApiRootResourceId
functions:
main:
handler: handler.handle
events:
- http:
path: /sessions
method: post
cors:
true
# origin:
# - 'origin1'
# - 'origin2'
# headers: # <-- Specify allowed headers
# - Content-Type
# - X-Amz-Date
# - Authorization
# - X-Api-Key
# - X-Amz-Security-Token
# - X-Amz-User-Agent
# allowCredentials: false