Skip to content

Incorrect v8 (241) lambda layer dependencies #12074

Closed

Description

@JoaquinFernandez

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/aws-serverless

SDK Version

8.1.0

Framework Version

No response

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

  1. Load the lambda layer 241 and initialize as documented -r @sentry/aws-serverless/awslambda-auto

Apparently, although the dependencies are correctly stated in the package.json of the @sentry/aws-serverless package, the lambda layer bundle only contains the @sentry/aws-serverless package with no dependencies from it.

Expected Result

The lambda is initialized and instrumented correctly

Actual Result


node:internal/modules/cjs/loader:1031
--
throw err;
^
Error: Cannot find module '@sentry/node'
Require stack:
- /opt/nodejs/node_modules/@sentry/aws-serverless/build/npm/cjs/awslambda-auto.js
- internal/preload
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
at Function.Module._load (node:internal/modules/cjs/loader:873:27)
at Module.require (node:internal/modules/cjs/loader:1100:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/opt/nodejs/node_modules/@sentry/aws-serverless/build/npm/cjs/awslambda-auto.js:1:14)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at internalRequire (node:internal/modules/cjs/loader:169:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/opt/nodejs/node_modules/@sentry/aws-serverless/build/npm/cjs/awslambda-auto.js',
'internal/preload'
]
}

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on May 16, 2024
  2. Lms24 commented on May 16, 2024

    @Lms24
    Member

    Hey @JoaquinFernandez thanks for writing in and reporting! We identified and fixed the issue in #12083. We're releasing 8.2.0 right now but will right after that release 8.2.1 which will include this fix.

    Sorry for the inconvenience!

    Your issue btw also served as a reminder that we need to isolate future v7 layer releases to not release under the same AWS lambda layer name. Otherwise we'd break v8 users. We'll also follow up with this a bit later.

  3. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions