-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
41 lines (36 loc) · 907 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
service: sesreceiver
provider:
name: aws
runtime: nodejs12.x
region: eu-west-1
profile: # Your aws iam profile
iamRoleStatements:
- Effect: Allow
Action:
- s3:*
Resource: "*"
custom:
bucket: contactmails
functions:
postProcess:
handler: handler.postProcess
resources:
Resources:
S3EMailBucketPermissions:
Type: AWS::S3::BucketPolicy
Properties:
Bucket:
Ref: # Your bucket ref
PolicyDocument:
Statement:
- Principal:
Service: "ses.amazonaws.com"
Action:
- s3:PutObject
Effect: Allow
Sid: "AllowSESPuts"
Resource:
Fn::Join: ['', ['arn:aws:s3:::', Ref: "contatctmails", '/*'] ]
Condition:
StringEquals:
"aws:Referer": { Ref: AWS::AccountId }