-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserverless.yaml
52 lines (47 loc) · 1019 Bytes
/
serverless.yaml
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
service: FastAPI-Lambda-Function
package:
individually: true
provider:
name: aws
profile: ${opt:aws-profile, "default"}
region: ${opt:region}
stage: ${opt:stage, "dev"}
runtime: python3.8
memorySize: 128
timeout: 30
iam:
role: ${opt:iamrole}
plugins:
- serverless-python-requirements
custom:
pythonRequirements:
dockerizePip: true
layer:
name: FastAPI-Lambda-Function
path: .
description: FastAPI-Lambda-Function Layer
compatibleRuntimes:
- python3.8
functions:
app:
package:
patterns:
- 'src/**'
- '!requirements.txt'
- '!package.json'
- '!package-lock.json'
- '!.serverless/**'
- '!venv/**'
- '!node_modules/**'
handler: main.handler
environment:
STAGE: ${self:provider.stage}
layers:
- { Ref: PythonRequirementsLambdaLayer }
events:
- http:
method: get
path: /
- http:
method: any
path: /{proxy+}