Skip to content
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

Cannot find module 'aws-sdk' #1808

Open
kennyhyun opened this issue May 30, 2024 · 1 comment
Open

Cannot find module 'aws-sdk' #1808

kennyhyun opened this issue May 30, 2024 · 1 comment

Comments

@kennyhyun
Copy link
Contributor

kennyhyun commented May 30, 2024

This is a Feature Proposal

Description

I think new aws runtime does not support aws-sdk v2 any more for node.js v18 and higher

https://docs.aws.amazon.com/lambda/latest/dg/nodejs-package.html#nodejs-package-dependencies

I had the error message from the runtime below

INIT_START Runtime Version: nodejs:18.v29	Runtime Version ARN: arn:aws:lambda:ap-southeast-2::runtime:5c2d7f0b914a9dbb8b6a6e3117c7950fa2b7434331c349799226fadd052f19a9

It would be nice if the readme includes about the aws sdk versions and how to set the forceExclude option according to the lambda and sdk versions.

Similar or dependent issue(s):

Additional Data

  • Serverless-Webpack Version: 5.13.0
  • Webpack version: 4.44.0
  • Serverless Framework Version: 1.77.1
  • Operating System: Linux

Just removing forceExclude was also problematic, because I had some weird message like

Resource handler returned message: "Unzipped size must be smaller than 130091036 bytes (Service: Lambda, Status Code: 400, Request ID: 2b747230-9910-4363-b452-ae616b90c0d6)" (RequestToken: bc369ba5-0db0-00e9-fbd3-d3397fbbec6e, HandlerErrorCode: InvalidRequest)

although the limit is supposed to be 250MB unzipped.

@kennyhyun
Copy link
Contributor Author

kennyhyun commented May 30, 2024

I misread the doc, so sdk v3 is supposed to be included.
let me review this issue


done, now it's just for advice and readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant