# Serverless deploy function is taking a very long time

**URL:** <https://forum.serverless.com/t/serverless-deploy-function-is-taking-a-very-long-time/16116>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [October 19, 2021, 8:00am UTC](https://forum.serverless.com/t/serverless-deploy-function-is-taking-a-very-long-time/16116 "2021-10-19T08:00:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![akshayh](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@akshayh](https://forum.serverless.com/u/akshayh)\
**Post date:** [October 19, 2021, 8:00am UTC](https://forum.serverless.com/t/serverless-deploy-function-is-taking-a-very-long-time/16116/1 "2021-10-19T08:00:51Z")

</div>

Hi,  
I ran `serverless deploy function -s dev -f <func-name>` on my system and it seems to be getting stuck on the ‘Excluding development dependencies’ portion of the process. Sometimes it even hangs my system and I need to restart it.

I’m on a linux ( Ubuntu v18.04 )

I’ve seen a few posts regarding similar issues and was wondering if there is a work around or a solution to this problem?

PS. - The serverless.yml file in our project does not have a ‘package’ section

---

<div class="post-metadata">

**Author:** ![TomC](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/tomc/32/4002_2.png) [@TomC](https://forum.serverless.com/u/TomC)\
**Post date:** [October 19, 2021, 9:12am UTC](https://forum.serverless.com/t/serverless-deploy-function-is-taking-a-very-long-time/16116/2 "2021-10-19T09:12:39Z")

</div>

> [@akshayh](#):
>
> 18.04

I’m on 20.04 here, and never seen this issue. If you check `iotop` or something, is it hammering a (slow) disk ?

---

<div class="post-metadata">

**Author:** ![akshayh](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@akshayh](https://forum.serverless.com/u/akshayh)\
**Post date:** [October 23, 2021, 10:00pm UTC](https://forum.serverless.com/t/serverless-deploy-function-is-taking-a-very-long-time/16116/3 "2021-10-23T22:00:22Z")

</div>

Hi,  
sorry it turned out it was taking time because i had the aws sam build from earlier in the directory, which was making the package extremely massive and essentially hanging my system when the packaging was going on.

Just a thought to keep in mind if anyone faces a similar issue
