-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
49 lines (46 loc) · 1.18 KB
/
serverless.yml
File metadata and controls
49 lines (46 loc) · 1.18 KB
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
# "org" ensures this Service is used with the correct Serverless Framework Access Key.
org: justhangingaround
# "service" is the name of this project. This will also be added to your AWS resource names.
service: rankly-lambda
provider:
name: aws
runtime: nodejs20.x
stage: prod
apiGateway:
binaryMediaTypes:
- image/jpeg
- image/png
- image/gif
- image/avif
- image/webp
- application/octet-stream # General binary data
- image/svg+xml # Optional, for SVG images
environment:
BUCKET_NAME: smart-brain-profile-picture
iamRoleStatements:
- Effect: Allow
Action:
- s3:PutObject
- s3:PutObjectAcl
- s3:ListBucket
Resource:
- arn:aws:s3:::smart-brain-profile-picture
- arn:aws:s3:::smart-brain-profile-picture/*
functions:
rank:
handler: handler.rank
events:
- http:
path: rank
method: get
uploadProfilePicture:
handler: uploadHandler.uploadProfilePicture
events:
- http:
path: upload
method: post
cors:
origin: '*'
headers:
- Content-Type
- Authorization