-
Notifications
You must be signed in to change notification settings - Fork 2
/
serverless.yml
52 lines (50 loc) · 1.28 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
service:
name: metadata-python-example
custom:
bucket: test-bucket-for-csvs
provider:
name: aws
runtime: python3.6
memorySize: 128
timeout: 10
stage: production
region: us-east-1
iamRoleStatements:
- Effect: Allow
Action:
- s3:GetObject
Resource: arn:aws:s3:::${self:custom.bucket}/*
functions:
getCurrentOCLCNumbers:
handler: handler.getCurrentOCLCNumbers
events:
- s3:
bucket: ${self:custom.bucket}
event: s3:ObjectCreated:*
rules:
- prefix: checkCurrentOCN/
- suffix: .csv
setHoldings:
handler: handler.setHoldingsbyOCLCNumber
events:
- s3:
bucket: ${self:custom.bucket}
event: s3:ObjectCreated:*
rules:
- prefix: setHoldings/
- suffix: .csv
removeHoldings:
handler: handler.deleteHoldingsbyOCLCNumber
events:
- s3:
bucket: ${self:custom.bucket}
event: s3:ObjectCreated:*
rules:
- prefix: removeHoldings/
- suffix: .csv
resources:
Resources:
CSVBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:custom.bucket}