Hello,
I have an AWS Lambda that utilizes the “serverless-http” approach for handling requests to my site. The serverless.yml sets a single (catch-all) function that allows the Express side to handle all the routes.
My single serverless.yml function:
functions:
app:
handler: module/index.handler
events:
- http:
path: /
method: ANY
cors: true
- http:
method: ANY
path: '{proxy+}'
cors: true
I have looked at the Sentry documentation for Express and AWS Lambda and neither are displaying results in my Sentry dashboard. I have a feeling it’s due to the way that the “serverless-http” wraps around the API:
module.exports = {
handler: serverless(app, {
callbackWaitsForEmptyEventLoop: false,
logGroupName: '/api/' + configs.APPNAME,
logStreamName: moment().format('YYYY-MM-DD'),
})
};
The serverless(app, …) part is probably what I’m configuring wrong.
I’ve seen the “serverless-sentry-plugin” project, but I’m wondering if Sentry has a solution for how to wrap its architecture around my API.
Has anyone successfully used Sentry on an AWS Lambda that uses “serverless-http”?
Thanks