-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
28 lines (25 loc) · 817 Bytes
/
serverless.yml
File metadata and controls
28 lines (25 loc) · 817 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
service: receipt-processor
custom:
config: ${file(env.yml):${opt:stage, self:provider.stage}}
provider:
name: aws
runtime: nodejs8.10
profile: receipt-processor
region: us-west-2
iamRoleStatements:
- Effect: Allow
Action:
- s3:GetObject
Resource: "arn:aws:s3:::${self:custom.config.bucket_name}/*"
functions:
receipt-processor:
handler: handler.processEvent
events:
- s3:
bucket: ${self:custom.config.bucket_name}
event: s3:ObjectCreated:*
environment:
google_client_email: ${self:custom.config.google_client_email}
google_private_key: ${self:custom.config.google_private_key}
google_email_to_impersonate: ${self:custom.config.google_email_to_impersonate}
receipt_folder_id: ${self:custom.config.receipt_folder_id}