-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathserverless.yml
More file actions
47 lines (42 loc) · 853 Bytes
/
serverless.yml
File metadata and controls
47 lines (42 loc) · 853 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
service: fully-sick-cat-bot
# Add the serverless-webpack plugin
plugins:
- serverless-webpack
- serverless-offline
- serverless-dotenv-plugin
- serverless-pseudo-parameters
provider:
name: aws
runtime: nodejs8.10
timeout: 10
iamRoleStatements:
- Effect: 'Allow'
Action:
- "sns:Publish"
Resource:
- ${self:custom.snsEvent}
environment:
snsEvent: ${self:custom.snsEvent}
custom:
webpackIncludeModules: true
snsEvent:
Fn::Join:
- ":"
- - arn
- aws
- sns
- Ref: AWS::Region
- Ref: AWS::AccountId
- snsEvent
functions:
slackBot:
handler: handler.slackBot
events:
- http:
path: bot
method: post
integration: lambda
dispatcher:
handler: handler.dispatch
events:
- sns: snsEvent