-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
61 lines (59 loc) · 1.52 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
56
57
58
59
60
61
service:
name: identity-management-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:
getUsers:
handler: handler.getUsers
events:
- s3:
bucket: ${self:custom.bucket}
event: s3:ObjectCreated:*
rules:
- prefix: idm_events/
- suffix: getUsers.csv
createUsers:
handler: handler.createUsers
events:
- s3:
bucket: ${self:custom.bucket}
event: s3:ObjectCreated:*
rules:
- prefix: idm_events/
- suffix: createUsers.csv
deleteUsers:
handler: handler.deleteUsers
events:
- s3:
bucket: ${self:custom.bucket}
event: s3:ObjectCreated:*
rules:
- prefix: idm_events/
- suffix: deleteUsers.csv
findUsers:
handler: handler.findUsers
events:
- s3:
bucket: ${self:custom.bucket}
event: s3:ObjectCreated:*
rules:
- prefix: idm_events/
- suffix: findUsers.csv
resources:
Resources:
CSVBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:custom.bucket}