2

I am using AWS event bridge as event bus for my applications running in AWS. Most of the services are in Lambda.

I am writing some integration test and I don't know how I can test events have been sent to event bridge. My integration tests are running in CI which is a docker container. How can I let eventbridge trigger an event to my nodejs application running in CI or local environment? If not, can I query events from event bridge? I have looked at the API reference https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/EventBridge.html but I can't find any API I can use.

Or is there a way for me to view all events passed through event bridge?

Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523
  • You can have SNS trigger with http endpoint. The endpoint could be your local application if it can expose any http path to be called by sns. – Marcin Sep 08 '20 at 01:29
  • I don't expose any server from my local which is unfortunate. Is there a way for me to view all events pass through eventbridge? – Joey Yi Zhao Sep 08 '20 at 06:03
  • I'm not aware of such out-of-the box functionality. You could create a simple lambda function which would store all events in DynamoDB. Then on your local tests you could query the database. – Marcin Sep 08 '20 at 06:12

0 Answers0