-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
41 lines (37 loc) · 856 Bytes
/
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
service:
name: aws-nodejs
# Add the serverless-webpack plugin
plugins:
- serverless-webpack
- serverless-offline
provider:
name: aws
runtime: nodejs12.x
memorySize: 256
region: ap-southeast-2
logRetentionInDays: 14 # Set the default RetentionInDays for a CloudWatch LogGroup
environment:
API_KEY: "1234"
package:
exclude:
- "**/**.test.*"
functions:
index:
handler: index.post
events:
- http:
method: post
path: index
cors:
origin: "*"
# origins:
# - http://localhost:*
# - https://test.com
headers:
- X-Serverless-Warmup
- Content-Type
- X-Amz-Date
- Authorization
- X-Api-Key
- X-Amz-Security-Token
- X-Amz-User-Agent