-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathserverless.yml
50 lines (45 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
50
service: Production-Ready-Serverless-NestJS
frameworkVersion: '>=3'
plugins:
- serverless-ssm-fetch
- serverless-offline
package:
exclude:
- './**'
include:
- 'dist/**' # only package the webpack 'dist' folder
custom:
serverlessSsmFetch:
DATABASE_URL: '/dev/database/url~true'
serverless-offline:
httpPort: 3001
location: . # this is important to make serverless-offline use the current directory
functions:
main:
handler: local.handler # use the local entry point for serverless-offline
webpack:
includeModules: true
packager: 'yarn'
excludeFiles: test/**/
provider:
name: aws
runtime: nodejs18.x
architecture: arm64
memorySize: 1024
timeout: 15
region: us-east-1
logRetentionInDays: 14
functions:
main:
handler: dist/main.handler # the output of webpack. requires 'yarn build'
environment:
NODE_ENV: production
# https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-reusing-connections.html
AWS_NODEJS_CONNECTION_REUSE_ENABLED: 1
events:
- http:
method: ANY
path: /
- http:
method: ANY
path: '{proxy+}'