-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
47 lines (44 loc) · 1.4 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
service: test-updates
# You can pin your service to only deploy with a specific Serverless version
# Check out our docs for more details
frameworkVersion: '3.38.0'
configValidationMode: error
custom:
stage: ${file(config/stages/${self:provider.stage}.yml)}
# Add custom variables here. You can re-use variables defined in the stage yml
# customStageVar: ${self:custom.stage.customStageVar}
esbuild:
packager: 'npm'
sourcemap: true
bundle: true
minify: true
keepNames: true
exclude:
- '@aws-sdk'
plugins:
- serverless-esbuild
- serverless-deployment-bucket
package:
individually: true
provider:
name: aws
runtime: nodejs20.x
stage: ${opt:stage, 'dev'}
region: ${opt:region, self:custom.stage.region}
profile: ${self:custom.stage.profile}
memorySize: ${self:custom.stage.lambda.memorySize, '128'}
timeout: ${self:custom.stage.lambda.timeout, '10'}
logRetentionInDays: ${self:custom.stage.lambda.logRetention, 1}
iam: ${file(serverless.iam.yml)}
deploymentBucket:
name: com.serverless.${aws:accountId}.${aws:region}.deploys
blockPublicAccess: true
skipPolicySetup: true
serverSideEncryption: AES256
environment:
SERVERLESS_REGION: ${aws:region}
NODE_OPTIONS: '--enable-source-maps'
functions: ${file(helpers/main.js):getFunctions}
resources:
Resources: ${file(helpers/main.js):getResources}
# Outputs: ${file(helpers/main.js):getOutputs}