A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.sentry.io/platforms/javascript/guides/aws-lambda/ below:

AWS Lambda | Sentry for AWS Lambda

AWS Lambda AWS Lambda is a serverless compute service offered as part of Amazon Web Services. Learn how to set it up with Sentry.

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.

Installation

Depending 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:

  1. You want to minimize lambda function size and tree-shake parts of the SDK code that you don't need. A related reason might be because you're transpiling your code and want to transpile your dependencies as well.
  2. You already use NPM packages and deploy node_modules with your function and you don't want to add a (or another) Lambda layer to your functions.
Configuration

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.

Verify

Once 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
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").

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