-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
65 lines (56 loc) · 1.38 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
service: create-typescript-lambda-orchestrator
frameworkVersion: '3'
useDotenv: true
plugins:
- serverless-offline-sqs
- serverless-offline
- serverless-offline-aws-eventbridge
provider:
name: aws
region: ${env:REGION}
stage: ${env:STAGE}
runtime: nodejs14.x
lambdaHashingVersion: 20201221
custom:
serverless-offline:
noPrependStageInUrl: true
lambdaPort: 3001
httpPort: 3011
serverless-offline-sqs:
autoCreate: true
endpoint: ${env:LOCALSTACK_EDGE_ENDPOINT}
region: ${env:REGION}
skipCacheInvalidation: false
serverless-offline-aws-eventbridge:
port: 5201 # send events to this port
debug: true
account: ${env:STAGE}
pubSubPort: 4011
functions:
eventHandler:
handler: dist/index.handler
events:
- sqs:
arn: ${env:OFFLINE_QUEUE_ARN}
eventBridgeToSQS:
handler: ./local/event.sendToSQS
events:
- eventBridge:
eventBus: ${env:OFFLINE_EVENT_BUS_NAME}
pattern:
source:
- ${env:OFFLINE_EVENT_SOURCE}
eventLogger:
handler: ./local/event.eventBridgeLogger
events:
- eventBridge:
eventBus: ${env:OFFLINE_EVENT_BUS_NAME}
pattern:
source:
- ${env:OFFLINE_EVENT_SOURCE}
resources:
Resources:
Queue:
Type: AWS::SQS::Queue
Properties:
QueueName: ${env:OFFLINE_QUEUE_NAME}