-
Notifications
You must be signed in to change notification settings - Fork 2
/
serverless.yml
65 lines (60 loc) · 1.2 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
service: your_service_name
provider:
name: aws
runtime: python3.7
profile: your_profile_name
region: us-east-1
timeout: 60
iamRoleStatements:
- Effect: Allow
Action:
- s3:getObject
Resource: arn:aws:s3:::bucketname/* #replace this with your bucket name
- Effect: Allow
Action:
- "lambda:InvokeFunction"
Resource: "*"
custom:
pythonRequirements:
dockerizePip: true
zip: true
slim: true
strip: false
noDeploy:
- docutils
- jmespath
- pip
- python-dateutil
- setuptools
- six
- tensorboard
useStaticCache: true
useDownloadCache: true
cacheLocation: "./cache"
package:
individually: false
exclude:
- package.json
- package-log.json
- node_modules/**
- cache/**
- test/**
- __pycache__/**
- .pytest_cache/**
- model/pytorch_model.bin
- raw/**
- .vscode/**
- .ipynb_checkpoints/**
- venv/**
functions:
transformImage:
handler: src/handler.lambda_handler
memorySize: 3008
timeout: 300
events:
- http:
path: transform
method: post
cors: true
plugins:
- serverless-python-requirements