forked from ColinEberhardt/applause-button-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
59 lines (56 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
service: applause-button
provider:
name: aws
runtime: nodejs8.10
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:BatchGetItem
Resource: "arn:aws:dynamodb:${opt:region, self:provider.region}:*:table/Applause"
- Effect: Allow
Action:
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:BatchGetItem
- dynamodb:Scan
Resource: "arn:aws:dynamodb:${opt:region, self:provider.region}:*:table/OpenService"
functions:
update-claps:
handler: src/updateClaps.fn
events:
- http:
path: update-claps
method: post
cors: true
get-claps:
handler: src/getClaps.fn
events:
- http:
path: get-claps
method: get
cors: true
get-multiple:
handler: src/getMultiple.fn
events:
- http:
path: get-multiple
method: post
cors: true
get-cost-attribution:
handler: src/getCostAttribution.fn
events:
- http:
path: get-cost-attribution
method: get
cors: true
invoke-webhooks:
handler: src/invokeWebhooks.fn
timeout: 200
environment:
WEBHOOK_URLS: '[{"user": "blog.scottlogic.com", "url": "https://kdngqixohc.execute-api.us-east-1.amazonaws.com/dev/claps-updated"}]'
events:
- stream: arn:aws:dynamodb:us-east-1:462989979267:table/Applause/stream/2018-06-01T07:43:12.629