-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
55 lines (49 loc) · 1.07 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
service: aws-projeto-02
frameworkVersion: '3'
provider:
name: aws
runtime: python3.11
profile: auto-curso
region: us-east-1
stage: dev
iam:
role:
statements:
- Effect: Allow
Action:
- ses:SendEmail
Resource:
- arn:aws:ses:${self:provider.region}:*:identity/*
- Effect: Allow
Action:
- s3:GetObject
Resource:
- arn:aws:s3:::${self:custom.bucketName}/*
- Effect: Allow
Action:
- s3:ListBucket
Resource:
- arn:aws:s3:::${self:custom.bucketName}/
functions:
envio-email:
handler: handler.envio_email
events:
- s3:
bucket: ${self:custom.bucketName}
event: s3:ObjectCreated:Put
rules:
- suffix: .csv
custom:
bucketName: envio-email-projeto2
serverless-s3-cleaner:
prompt: false
buckets:
- ${self:custom.bucketName}
plugins:
- serverless-s3-cleaner
package:
patterns:
- "!node_modules/**"
- "!.env/**"
- "!.csv"
- "!.json"