# Decrease size of deployment package

**URL:** <https://community.forestadmin.com/t/decrease-size-of-deployment-package/6771>\
**Category:** Help me!\
**Tags:** howtos\
**Created:** [October 23, 2023, 5:20pm UTC](https://community.forestadmin.com/t/decrease-size-of-deployment-package/6771 "2023-10-23T17:20:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![emirc](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/emirc/32/4075_2.png) [@emirc](https://community.forestadmin.com/u/emirc)\
**Post date:** [October 23, 2023, 5:20pm UTC](https://community.forestadmin.com/t/decrease-size-of-deployment-package/6771/1 "2023-10-23T17:20:45Z")

</div>

Hello FA,  
Which tool do you recommend to decrease the size of the deployment package when using Forest Admin in a serverless/AWS Lambda environment?  
What do you suggest to skip the 250 MB (unzipped) Lambda limit ?

Thank you in advance

## Context

- Project name: Elyps
- Team name: Elyps
- Environment name: dev-cli
- Agent (forest package) name & version: …
- Database type: MySQL (sequelize)
- Recent changes made on your end if any: Upgrade from v6 to v7

---

<div class="post-metadata">

**Author:** ![Alban\_Bertolini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alban_bertolini/32/1077_2.png) [@Alban\_Bertolini](https://community.forestadmin.com/u/Alban_Bertolini)\
**Post date:** [October 24, 2023, 8:11am UTC](https://community.forestadmin.com/t/decrease-size-of-deployment-package/6771/2 "2023-10-24T08:11:51Z")

</div>

Hello,  
Forestadmin “instand setup” (cloud) uses the lambda environment to deploy the customer agent. We are using [the new agent nodejs](https://github.com/ForestAdmin/agent-nodejs). The agent `forest-express-sequelize` does not support the lambda environment.

However, If you want to user the agent nodejs, there are several points to note:

1. Schema will be computed every time you start the lambda. The lambda will reply after this configuration, which can take a long time.
2. Lambda does not support http requests. On our side, we have a gateway in front of our agents that forwards http requests to Lambda via a hand-crafted protocol.

If you have any questions, please don’t hesitate to contact us.

---

<div class="post-metadata">

**Author:** ![emirc](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/emirc/32/4075_2.png) [@emirc](https://community.forestadmin.com/u/emirc)\
**Post date:** [October 24, 2023, 8:29am UTC](https://community.forestadmin.com/t/decrease-size-of-deployment-package/6771/3 "2023-10-24T08:29:59Z")

</div>

Hi Alban,  
Thank you for your answer!

We are already using Forest Admin v6, when we upgrade to v7 we can’t deploy anymore to our remote stage because we are hitting the 250 MB Lambda limit.  
So we want to decrease the size of the unzipped folder and asking for your suggestions… which tool should we use with Forest Admin for that ?

---

<div class="post-metadata">

**Author:** ![Alban\_Bertolini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alban_bertolini/32/1077_2.png) [@Alban\_Bertolini](https://community.forestadmin.com/u/Alban_Bertolini)\
**Post date:** [October 24, 2023, 8:42am UTC](https://community.forestadmin.com/t/decrease-size-of-deployment-package/6771/4 "2023-10-24T08:42:32Z")

</div>

Sorry, we don’t have any recommendations about this type of tools. Have you tried a specific tool?

---

<div class="post-metadata">

**Author:** ![emirc](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/emirc/32/4075_2.png) [@emirc](https://community.forestadmin.com/u/emirc)\
**Post date:** [October 24, 2023, 9:08am UTC](https://community.forestadmin.com/t/decrease-size-of-deployment-package/6771/5 "2023-10-24T09:08:11Z")

</div>

I tried using Webpack, but I saw this comment [Webpack using forest-express-mongoose - #8 by Arnaud\_Moncel](https://community.forestadmin.com/t/webpack-using-forest-express-mongoose/4211/8) so I thought it’s not a good idea to use it with Forest Admin.  
Do you see any issues with Webpack ?

---

<div class="post-metadata">

**Author:** ![Alban\_Bertolini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alban_bertolini/32/1077_2.png) [@Alban\_Bertolini](https://community.forestadmin.com/u/Alban_Bertolini)\
**Post date:** [October 24, 2023, 9:35am UTC](https://community.forestadmin.com/t/decrease-size-of-deployment-package/6771/6 "2023-10-24T09:35:13Z")

</div>

What tools do you currently use to build your project?  
Sorry, as arnaud said, we’ve never tried Webpack with FA admin.

---

<div class="post-metadata">

**Author:** ![emirc](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/emirc/32/4075_2.png) [@emirc](https://community.forestadmin.com/u/emirc)\
**Post date:** [October 24, 2023, 10:48am UTC](https://community.forestadmin.com/t/decrease-size-of-deployment-package/6771/7 "2023-10-24T10:48:58Z")

</div>

We use Serverless for building & running the project

---

<div class="post-metadata">

**Author:** ![Alban\_Bertolini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alban_bertolini/32/1077_2.png) [@Alban\_Bertolini](https://community.forestadmin.com/u/Alban_Bertolini)\
**Post date:** [October 24, 2023, 12:46pm UTC](https://community.forestadmin.com/t/decrease-size-of-deployment-package/6771/8 "2023-10-24T12:46:11Z")

</div>

I encourage you to try webpack but we have no customer feedback or experience to share with you 😕  
In v7, what is your package size?

---

<div class="post-metadata">

**Author:** ![emirc](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/emirc/32/4075_2.png) [@emirc](https://community.forestadmin.com/u/emirc)\
**Post date:** [October 25, 2023, 10:42am UTC](https://community.forestadmin.com/t/decrease-size-of-deployment-package/6771/9 "2023-10-25T10:42:47Z")

</div>

The plugin serverless-plugin-include-dependencies was the solution to decrease the size

> **[Serverless Framework: Plugins](https://www.serverless.com/plugins/serverless-plugin-include-dependencies)**
>
> The Serverless Framework Plugin Registry. Search thousands of Serverless Framework plugins.

Thanks
