Sentry with AWS Lambda & Express

Hey Guys,

I’ve successfully integrated Sentry.io with my Express app on my local and I got it to report any issue. Also, I’ve created an endpoint which calls an undefined function just for the sake of testing.
However, when I deployed my App on AWS Lambda, using aws-serverless-express module my App stopped working except the testing endpoint, any other endpoint doesn’t send any response.

Here is my aws/express wrapper

const server = awsServerlessExpress.createServer(app)

exports.handler = (event, context) => {
  context.callbackWaitsForEmptyEventLoop = false;
  awsServerlessExpress.proxy(server, event, context)
}

Am I missing anything here?

Thanks in advncce,

Did you ever figure this out? We’ve run into this same problem.

import serverlessExpress from '@vendia/serverless-express'
import Sentry from '@sentry/serverless'
import express from 'express'

Sentry.AWSLambda.init({
  dsn: 'https://<key>@sentry.io/<project>',
})
const app = express()
// Configure your Express server...

exports.handler = Sentry.AWSLambda.wrapHandler(serverlessExpress({ app }).handler)