-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
74 lines (64 loc) · 1.5 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
service: openai-serverless
provider:
name: aws
runtime: python3.8
stage: ${opt:stage, "prod"}
region: ${opt:region, env:AWS_REGION, "us-west-2"}
profile: ${env:AWS_PROFILE, "x-tech"}
lambdaHashingVersion: 20201221
memorySize: 256
timeout: 30
iam:
role: lambdaRole
variablesResolutionMode: 20210326
useDotenv: true
package:
individually: false
patterns:
- '!**'
- './functions/**/*'
- '!./functions/**/__pycache__/*'
- '!./functions/__pycache__/*'
functions:
- ${file(./resources/authorizer_function.yml)}
- ${file(./resources/openai_functions.yml)}
resources:
- ${file(./resources/iam.yml)}
custom:
prefix: ${self:service}-${self:provider.stage}
additionalStacks:
dynamodb: ${file(./resources/dynamodb.yml):stack}
s3: ${file(./resources/s3.yml):stack}
pythonRequirements:
dockerizePip: non-linux
usePipenv: true
zip: false
noDeploy:
# unnecessary openai dependencies
- openpyxl
- et-xmlfile
- pandas
- numpy
- python-dateutil
- six
- pytz
- pandas-stubs
- tqdm
# boto3 dependencies
- boto3
- botocore
- jmespath
- s3transfer
# jwcrypto deps
- cryptography
# pydantic deps
- pydantic
- typing-extensions
customDomains:
domainName: ${env:DOMAIN_NAME}
certificateArn: ${env:ACM_ARN}
plugins:
- serverless-python-requirements
- serverless-offline
- serverless-domain-manager
- serverless-plugin-additional-stacks