-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using v8 lambda layer #12012
Comments
Hi, sorry that you are running into this. I think this is a documentation issue. Can you try pointing it to |
Tell us if the suggestion from @lforst worked for you. If this doesn't work, we'll add a fix which will be added in an upcoming version. |
Hi! Same issue:
|
FYI, I also tried as documented here: With |
We already merged #12021 to fix this and we'll release it tomorrow with version 8.1.0. Thanks for reporting though! So hopefully, with 8.1.0, any of these two options should work:
|
Hey @igorlamos I just tested the layer in our E2E tests and I believe the structure is correct for CommonJS (CJS) apps.
Are you running your lambdas in ESM mode? If so, the lambda layer does not support ESM mode and it's questionalbe when we'll be able to do so due to some limitations with OpenTelemetry and bundling code like we do in the CJS layer. In this case, you'll need to install the SDK manually with NPM. I'm currently working on this (tracked in #12409) along with some better documentation to point this out more clearly. |
Hey @Lms24 – that makes sense. Thanks for the clarification.
Yes – I'm running my lambdas in ESM, therefore the problem. I was not able to find in the Docs that the Layer doesn't support ESM. So that's OK now. I was just a little confused as I'm also not aware of the consequences/limitations with OpenTelemetry, so in case that's the reason – that's fine too 👍 I was able to easily overcome the "issue" on my end by building my own layer and sharing that among all of the accounts where I need it. Thanks again! |
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.0.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
I imported (actually just switched) from one layer (version 235 -> version 240) which changes from @sentry/serverless 7.113.0 to @sentry/aws-serverless 8.0.0.
I updated the NODE_OPTIONS from
-r @sentry/serverless/dist/awslambda-auto
to-r @sentry/aws-serverless/dist/awslambda-auto
I also updated calls to the SDK, but it doesn't get that far.
Expected Result
The SDK is loaded and initialized as expected
Actual Result
The text was updated successfully, but these errors were encountered: