SIGN IN SIGN UP

feat(aws-serverless): Add lambda extension to npm package (#20133)

This PR adds the Lambda Extension as a build output to the npm package.
It was previously only available through our Lambda layer but is useful
for users that do not use the layer but would still like to use our
extension.

To use the extension with container image lambdas, copy the extension
files to your Docker image and set the `tunnel` option in your
application. This requires the installation of `@sentry/aws-serverless`,
regardless of which other Sentry SDK is used in your application.

```dockerfile
RUN mkdir -p /opt/sentry-extension
COPY node_modules/@sentry/aws-serverless/build/lambda-extension/sentry-extension
/opt/extensions/sentry-extension
COPY node_modules/@sentry/aws-serverless/build/lambda-extension/index.mjs
/opt/sentry-extension/index.mjs
RUN chmod +x /opt/extensions/sentry-extension /opt/sentry-extension/index.mjs
```

```js
Sentry.init({
  dsn: '__DSN__',
  tunnel: 'http://localhost:9000/envelope',
});
```

Closes: #20114
A
Andrei committed
4c14d7824bd8e0bba9f31a45a856dcef64bdd031
Parent: 9aaa191
Committed by GitHub <noreply@github.com> on 4/9/2026, 11:36:56 AM