-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
50 lines (45 loc) · 1.05 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
service: qr-code-event-bridge-serverless
frameworkVersion: '3'
provider:
name: aws
runtime: nodejs12.x
stage: dev
region: us-east-1
iam:
role:
statements:
- Effect: Allow
Action: events:PutEvents
Resource: !GetAtt EventBus.Arn
custom:
apiGatewayServiceProxies:
- eventbridge:
path: /eventbridge
method: post
source: 'fuel-app'
detailType: 'user-signup'
eventBusName: { Ref: EventBus }
cors: true
functions:
generateEvent:
handler: functions/generateEvent.handler
environment:
EVENT_BUS_NAME: !Ref EventBus
events:
- http:
path: /generate-qr-code
method: post
processEventsLambda:
handler: functions/processBatchEvent.handler
events:
- sqs:
arn: !GetAtt TargetSQS.Arn
batchSize: 10
functionResponseType: 'ReportBatchItemFailures'
resources:
Resources: ${file(resources.yml)}
Outputs:
EventBusName:
Value: !Ref EventBus
plugins:
- serverless-apigateway-service-proxy