Hi everyone,
How configured the serverless-offline-aws-eventbridge
in an event-driven architecture. But I’m configurated “dead letters” Queue for my lambdas. Some one knows how can I do that? Following my template.yml:
app: serverless
service: serverless
provider:
name: aws
runtime: nodejs12.x
environment:
NODE_ENV: dev
custom:
serverless-offline-aws-eventbridge:
port: 4010 # port to run the eventbridge mock server on
debug: true # flag to show debug messages
account: '' # account id that gets passed to the event
dotenv:
basePath: infrastructure/config/
include:
- infrastructure/config/.env.dev
plugins:
- serverless-plugin-typescript
- serverless-offline
- serverless-dotenv-plugin
- serverless-offline-aws-eventbridge
package:
exclude:
- infrastructure/config/.env.stg
- infrastructure/config/.env.pro
include:
- infrastructure/config/.env.dev
functions:
create:
handler: services/payment-api/handler.create
events:
- eventBridge:
eventBus: payment
pattern:
source:
- james.pay
update:
handler: services/payment-api/handler.update
events:
- http:
path: payments/{id}
method: put
find:
handler: services/payment-api/handler.find
events:
- http:
path: payments
method: get
findOne:
handler: services/payment-api/handler.findOne
events:
- http:
path: payments/{id}
method: get
deleteOne:
handler: services/payment-api/handler.deleteOne
events:
- http:
path: payments/{id}
method: delete
publishEvent:
handler: services/payment-api/handler.publish
events:
- http:
path: publish
method: get