-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
56 lines (52 loc) · 1.69 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
# "org" ensures this Service is used with the correct Serverless Framework Access Key.
org: ${self:custom.stage.org}
service: ${self:custom.stage.service}
# You can pin your service to only deploy with a specific Serverless version
# Check out our docs for more details
configValidationMode: error
frameworkVersion: '>=4.4.12 <5'
build:
esbuild:
bundle: true
minify: false
buildConcurrency: 3
sourcemap:
type: linked
setNodeOptions: true
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}
plugins:
- serverless-deployment-bucket
package:
individually: true
provider:
name: aws
runtime: nodejs22.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)}
logs:
lambda:
logFormat: JSON
applicationLogLevel: DEBUG
systemLogLevel: WARN
deploymentBucket:
name: com.serverless.${aws:accountId}.${aws:region}.deploys
blockPublicAccess: true
skipPolicySetup: true
serverSideEncryption: AES256
environment:
SERVERLESS_REGION: ${aws:region}
POWERTOOLS_SERVICE_NAME: ${self:service}
POWERTOOLS_LOG_LEVEL: DEBUG
POWERTOOLS_LOGGER_LOG_EVENT: 'true'
functions: ${file(helpers/main.js):getFunctions}
resources:
Resources: ${file(helpers/main.js):getResources}
# Outputs: ${file(helpers/main.js):getOutputs}