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 2 years ago104 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions