This repository has been archived by the owner on Jun 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
serverless.yml
108 lines (102 loc) · 2.63 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
service: channel-status-notifier
custom:
serverless-offline-sns:
port: 4002 # a free port for the sns server to run on
debug: false
mySnsTopic: "${self:service}-${self:provider.stage}-sns-consume"
emojiReactionSns: "${self:service}-${self:provider.stage}-emoji-reaction-consume"
mySnsTopicArn:
local: "arn:aws:sns:us-east-1:123456789012:${self:custom.mySnsTopic}"
dev:
{
"Fn::Join":
[
"",
[
"arn:aws:sns:${self:provider.region}:",
{ "Ref": "AWS::AccountId" },
":${self:custom.mySnsTopic}",
],
],
}
prod:
{
"Fn::Join":
[
"",
[
"arn:aws:sns:${self:provider.region}:",
{ "Ref": "AWS::AccountId" },
":${self:custom.mySnsTopic}",
],
],
}
emojiReactionSnsArn:
local: "arn:aws:sns:us-east-1:123456789012:${self:custom.emojiReactionSns}"
dev:
{
"Fn::Join":
[
"",
[
"arn:aws:sns:${self:provider.region}:",
{ "Ref": "AWS::AccountId" },
":${self:custom.emojiReactionSns}",
],
],
}
prod:
{
"Fn::Join":
[
"",
[
"arn:aws:sns:${self:provider.region}:",
{ "Ref": "AWS::AccountId" },
":${self:custom.emojiReactionSns}",
],
],
}
provider:
name: aws
role: arn:aws:iam::807711422928:role/FTApplicationRoleFor_channel-status-notifier
runtime: nodejs12.x
timeout: 29
memorySize: 3008
profile: csn
stage: ${opt:stage, 'dev'}
region: eu-west-1
stackTags:
teamDL: [email protected]
environment: p
systemCode: channel-status-notifier
environment:
NODE_ENV: "${file(./serverless.env.yml):NODE_ENV}"
SLACK_TOKEN: "${file(./serverless.env.yml):SLACK_TOKEN}"
APP_ID: "${file(./serverless.env.yml):APP_ID}"
plugins:
- serverless-offline
- serverless-step-functions
- serverless-offline-sns
tags:
teamDL: [email protected]
environment: p
systemCode: channel-status-notifier
functions:
post:
handler: post.post
events:
- sns: ${self:custom.mySnsTopic}
emojiReact:
handler: emojiReact.emojiReact
events:
- sns: ${self:custom.emojiReactionSns}
trigger:
handler: trigger.trigger
events:
- http:
path: handler
method: any
environment:
mySnsTopicArn: ${self:custom.mySnsTopicArn.${self:provider.stage}}
emojiReactionSnsArn: ${self:custom.emojiReactionSnsArn.${self:provider.stage}}