-
Notifications
You must be signed in to change notification settings - Fork 3
/
serverless.yml
78 lines (70 loc) · 2.28 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
service: ${self:custom.env.serviceName, 'unknown'}-service
variablesResolutionMode: 20210326
provider:
name: aws
runtime: nodejs14.x
memorySize: ${self:custom.env.memorySize}
stage: ${env:ENV, 'unstaged'}
region: ${opt:region, 'us-east-1'}
stackName: ${self:service}-${self:provider.stage}
profile: ${self:custom.profiles.${self:provider.stage}}
logRetentionInDays: ${self:custom.env.lambdaLogsRotation}
lambdaHashingVersion: ${self:custom.env.lambdaHashingVersion}
apiGateway:
usagePlan:
quota:
limit: 5000
offset: 0
period: DAY
iam:
role: ${self:custom.env.role}
environment:
REGION: ${self:provider.region}
SERVICE_NAME: ${self:service}
STAGE: ${self:provider.stage}
OMS_SNS_TOPIC_ARN: ${self:custom.omsSnsTopicArn}
OMS_RESERVE_ORDER_EVENTS_QUEUE_URL: ${self:custom.omsReserveOrderEventsQueueUrl}
CT_UPDATE_ORDER_EVENTS_QUEUE_URL: ${self:custom.ctUpdateOrderEventsQueueUrl}
CTP_PROJECT_KEY: ${self:custom.secret.CTP_PROJECT_KEY}
CTP_CLIENT_SECRET: ${self:custom.secret.CTP_CLIENT_SECRET}
CTP_CLIENT_ID: ${self:custom.secret.CTP_CLIENT_ID}
CTP_AUTH_URL: ${self:custom.secret.CTP_AUTH_URL}
CTP_API_URL: ${self:custom.secret.CTP_API_URL}
CTP_SCOPES: ${self:custom.secret.CTP_SCOPES}
custom:
secret: ${file(./sls/.env-secret.yml)}
profiles: ${file(./sls/profiles.yml)}
deploymentBuckets: ${file(./sls/deployment-buckets.yml)}
accountId: "#{AWS::AccountId}"
namePrefix: ${self:service}-${self:provider.stage}-${self:provider.region}
webpack:
packager: "yarn"
keepOutputDirectory: true
omsSnsTopicArn: { "Ref": omsSnsTopic }
omsReserveOrderEventsQueueUrl: !Ref omsReserveOrderEventsQueue
ctUpdateOrderEventsQueueUrl: !Ref ctUpdateOrderEventsQueue
env: ${file(./sls/env.yml)}
package:
individually: true
excludeDevDependencies: true
patterns:
- "!.git"
- "!.gitignore"
- "!.editorconfig"
- "!.eslintignore"
- "!.eslintrc.js"
- "!sls/**"
- "!README.md"
- "!serverless.yml"
- "!jest.config.js"
- "!tsconfig.json"
- "!webpack.config.json"
plugins:
- serverless-webpack
- serverless-pseudo-parameters
- serverless-deployment-bucket
- serverless-uuid
functions:
- ${file(./sls/functions.yml)}
resources:
- ${file(./sls/resources.yml)}