---
title: "Comment by Aditya Mitra on \"How we reduced our NodeJs app size on AWS Lambda by over 80% 😮\" | Hashnode"
description: "I use serverless functions a lot and the tips you provided in this article are really helpful! Some of the tips will be really helpful in other serverless platf"
url: "https://hashnode.com/posts/how-we-reduced-our-nodejs-app-size-on-aws-lambda/613724b7ef28811d8bed6944/comment/61384b198b7ef170483a0483"
---

[Discussion](https://hashnode.com/posts/how-we-reduced-our-nodejs-app-size-on-aws-lambda/613724b7ef28811d8bed6944)

Comment [How we reduced our NodeJs app size on AWS Lambda by over 80% 😮](https://hashnode.com/posts/how-we-reduced-our-nodejs-app-size-on-aws-lambda/613724b7ef28811d8bed6944)

[Aditya Mitra](https://hashnode.com/@aditya-mitra)

[Sep 8, 2021](https://hashnode.com/posts/how-we-reduced-our-nodejs-app-size-on-aws-lambda/613724b7ef28811d8bed6944/comment/61384b198b7ef170483a0483)

I use serverless functions a lot and the tips you provided in this article are really helpful!

Some of the tips will be really helpful in other serverless platforms which have a strict runtime of 1s.

Just because to avoid installing unnecessary packages I prefer writing my own functions whenever possible.

[Aditya Mitra](https://hashnode.com/@aditya-mitra)

[Sep 8, 2021](https://hashnode.com/posts/how-we-reduced-our-nodejs-app-size-on-aws-lambda/613724b7ef28811d8bed6944/comment/61384b198b7ef170483a0483#reply-61384c8a83248670799c0430)

Another thing that I wanted to share:

The `npm install --production` if there is no build required. For example, if the project uses typescript, it would be added as a dev dependency and needs to be installed for the build.

For that reason, I do `npm ci` first for build and then do `npm prune --production` for checking if the application can boostrap.
