AWS Lambda Layer (Node)
You can also install Sentry using a Lambda Layer instead of adding @sentry/serverless
with npm
or yarn
. Import Sentry as usual:
Copied
const Sentry = require("@sentry/serverless");
This installation method will not work if you are using Webpack.
Then add the Sentry Layer by navigating to your Lambda function. Select Layers, then Add a Layer.
Specify an ARN tab as illustrated:
Finally, set the region and copy the provided ARN value into the input.
Select Region
- Package:
- npm:@sentry/node
- Version:
- 8.24.0
- Repository:
- https://github.com/getsentry/sentry-javascript