By using AWS re:Post, you agree to the Terms of Use

How to correctly deploy a NodeJS Lambda Function from Visual Studio 2022

0

Hello, I've been using AWS Lambda function for a while, using VS2022 as IDE, but only today I've realized that the published packages contains a lot of useless node_modules. I've created the project using the VS Template and selecting AWS Lambda Function (Node.js). My lambda function in this particular example only wtites data using AWS.DynamoDB.DocumentClient(); but when it's uploaded it's 10 MB, that's almost the size of the zipped folder.. The npm installed are the default ones that I've when creating a project, so the zip package can just contain the js file.

Any suggestion?

asked 7 months ago52 views