-
Notifications
You must be signed in to change notification settings - Fork 4
/
serverless.yml
47 lines (43 loc) · 921 Bytes
/
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
# Welcome to serverless. Read the docs
# https://serverless.com/framework/docs/
frameworkVersion: "3"
service: dwolla-webhook-example
useDotenv: true
provider:
name: aws
region: us-west-2
runtime: nodejs14.x
environment:
WEBHOOK_SECRET: ${env:WEBHOOK_SECRET}
iam:
role:
statements:
- Effect: Allow
Action:
- sqs:SendMessage
Resource:
Fn::GetAtt: [ webhookQueue, Arn ]
timeout: 15
functions:
queue-handler:
handler: src/handler.queueHandler
events:
- sqs:
arn:
Fn::GetAtt:
- webhookQueue
- Arn
webhook-receiver:
handler: src/handler.webhookReceiver
events:
- http:
path: /
method: POST
plugins:
- serverless-webpack
resources:
Resources:
webhookQueue:
Type: AWS::SQS::Queue
Properties:
QueueName: webhookQueue