-
Notifications
You must be signed in to change notification settings - Fork 5
/
serverless.yml
53 lines (46 loc) · 1.22 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
useDotenv: true
service: poprox-default-recommender
frameworkVersion: "3"
provider:
name: aws
runtime: python3.11
versionFunctions: false
region: ${opt:region, "us-east-1"}
stage: ${opt:stage, "local"}
memorySize: 2048 # 2gb
timeout: 25
architecture: x86_64
iam:
role:
# Add statements to the IAM role to give permissions to Lambda functions
statements:
- Effect: Allow
Action:
- "logs:*"
Resource: "*"
ecr:
# In this section you can define images that will be built locally and uploaded to ECR
images:
poprox-recommender:
path: "./"
platform: linux/amd64
plugins:
- serverless-offline
custom:
"offline:true": # offline enabled parameters
enabled: true
filePrefix: "offline."
"offline:false": # offline disabled parameters
enabled: false
filePrefix: ""
offline: ${self:custom.offline:${strToBool(${env:IS_OFFLINE, false})}}
package:
patterns:
- "!venv/**"
- "!models/**"
- "!node_modules/**"
- "!tests/**"
- "**.py"
- "**.html"
# if offline mode enabled filePrefix = 'offline.' else filePrefix = ''
functions: ${file(./serverless/${self:custom.offline.filePrefix}functions.yaml):functions}