-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
101 lines (91 loc) · 2.08 KB
/
serverless.yml
File metadata and controls
101 lines (91 loc) · 2.08 KB
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
service: parser
provider:
name: aws
runtime: nodejs12.x
stage: ${opt:stage, 'prod'}
region: eu-west-1
apiGateway:
shouldStartNameWithService: true
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:*
Resource:
- ${ssm:/echo/ddb/podcasts/arn}
- ${ssm:/echo/ddb/episodes/arn}
- ${ssm:/echo/ddb/locks/arn}
- ${ssm:/echo/ddb/websub/arn}
- Effect: 'Allow'
Action:
- 'sns:Publish'
Resource:
- ${ssm:/echo/sns/resize/arn}
- ${ssm:/echo/sns/clientpush/arn}
- Effect: 'Allow'
Action:
- 'lambda:InvokeFunction'
Resource:
- 'arn:aws:lambda:*'
environment:
stage: ${self:provider.stage}
PI_API_KEY: ${ssm:/echo/pi/key}
PI_API_SECRET: ${ssm:/echo/pi/secret~true}
RESIZE_SNS: ${ssm:/echo/sns/resize/arn}
NOTIFY_SNS: ${ssm:/echo/sns/clientpush/arn}
PARSER_AUTH: ${ssm:/parser/auth~true}
functions:
graph:
handler: src/core/server.handler
memorySize: 512
timeout: 60
parsePodcast:
handler: src/parser/api.parsePodcast
memorySize: 128
timeout: 60
events:
- sns:
arn: ${ssm:/echo/sns/parser/arn}
httpWrap:
handler: src/parser/api.httpWrap
timeout: 30
events:
- http:
path: /parse
method: post
websubDB:
handler: src/websub/handler.dbUpdate
memorySize: 128
events:
- stream:
type: dynamodb
arn: ${ssm:/echo/ddb/websub/streamarn}
websubChallenge:
handler: src/websub/handler.challenge
memorySize: 128
events:
- http:
path: /{id}
method: get
websubPush:
handler: src/websub/push.handler
memorySize: 128
events:
- http:
path: /{id}
method: post
package:
individually: true
plugins:
- serverless-webpack
- serverless-offline
custom:
serverless-offline:
httpPort: 9000
lambdaPort: 3003
noPrependStageInUrl: true
webpack:
webpackConfig: 'webpack.config.js'
packager: 'npm'
includeModules:
forceExclude:
- aws-sdk