-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
38 lines (36 loc) · 749 Bytes
/
serverless.yml
File metadata and controls
38 lines (36 loc) · 749 Bytes
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
service: serverless-go-aws-lambda
frameworkVersion: '3'
provider:
name: aws
runtime: go1.x
region: sa-east-1
memorySize: 256
iam:
role:
statements:
- Effect: "Allow"
Action:
- "s3:GetObject"
- "s3:PutObject"
Resource:
- "arn:aws:s3:::*"
package:
patterns:
- '!./**'
- ./bin/**
functions:
optimize:
handler: bin/optimize
events:
- s3:
bucket: jk-lambda-bucket
event: s3:ObjectCreated:*
rules:
- prefix: uploads/
- suffix: .jpg
- s3:
bucket: jk-lambda-bucket
event: s3:ObjectCreated:*
rules:
- prefix: uploads/
- suffix: .png