On this page you'll get an overview how to install, configure and use Sentry in your AWS Lambda functions. Once set up, our SDK will automatically report error and performance data from your Lambda Functions. Issues in Sentry will automatically include cloudwatch data, function details and execution time measurements.
InstallationDepending on your preferences, you can install Sentry in your Lambda functions using the Sentry AWS Lambda Layer (recommended) or the Sentry AWS NPM package.
Should I use the Lambda Layer or the NPM package?We generally recommend using the Lambda layer as it doesn't require you to deploy any Sentry dependency alongside your function. With the layer, you can achieve the same level of customization as with the NPM package. There are two reasons why you still might want to use the NPM package instead:
node_modules
with your function and you don't want to add a (or another) Lambda layer to your functions.After installing the SDK, you might want to configure some parameters. Besides the common SDK configuration, you can also configure Sentry's Lambda Function handler wrapper to optimize function runtime overhead and timeout warnings.
VerifyOnce set up, verify that Sentry is reporting errors correctly by throwing a sample error in one of your functions:
index.js
Copied
exports.handler = async (event, context) => {
throw new Error("This is a test error");
};
Help improve this content
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4