Elijah
Software developer. I enjoy building stuff.

For the last six months I’ve been developing a platform completely serverless using AWS services. One tool that I’m using for the API is aws-serverless-express, which allows you to use express.js together with AWS lambda.

One thing that I couldn’t find was how to correctly use Sentry, the monitoring platform, with this kind of setup. After doing some research and diving into AWS’s code, I arrived to this code:

The important part that you may struggle with if you have been working with AWS serverless express is that you need to specify ‘PROMISE’ as the type of return you want in order to be able to handle errors with Sentry.

Elijah

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store