-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
51 lines (44 loc) · 976 Bytes
/
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
service: aws-python-image-converter
frameworkVersion: '3'
provider:
name: aws
runtime: python3.9
environment:
BUCKET: !Ref Bucket
iam:
role:
managedPolicies:
- arn:aws:iam::aws:policy/AmazonS3FullAccess
functions:
get_upload_url:
handler: functions/handlers/upload.handler
events:
- httpApi:
path: /upload_url
method: get
download:
handler: functions/handlers/download.handler
events:
- httpApi:
path: /{file_name}
method: get
convert:
handler: functions/handlers/convert.handler
events:
- s3:
bucket: !Ref Bucket
event: s3:ObjectCreated:*
existing: true
plugins:
- serverless-offline
- serverless-python-requirements
custom:
pythonRequirements:
dockerizePip: non-linux
resources:
Resources:
Bucket:
Type: AWS::S3::Bucket
DeletionPolicy: Delete
Properties:
AccessControl: Private