# Cloud Formation Template Error

**URL:** <https://forum.serverless.com/t/cloud-formation-template-error/4058>\
**Category:** Serverless Architectures\
**Tags:** aws\
**Created:** [March 21, 2018, 3:35am UTC](https://forum.serverless.com/t/cloud-formation-template-error/4058 "2018-03-21T03:35:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnWai](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@JohnWai](https://forum.serverless.com/u/JohnWai)\
**Post date:** [March 21, 2018, 3:35am UTC](https://forum.serverless.com/t/cloud-formation-template-error/4058/1 "2018-03-21T03:35:53Z")

</div>

I got this error “The CloudFormation template is invalid: Template format error: Number of resources, 203, is greater than maximum allowed, 200” when I deploy it. What should I do? I have removed unused package from local and package.json file.

Many thanks,  
Kind Regards,  
John

---

<div class="post-metadata">

**Author:** ![bill](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/bill/32/1072_2.png) [@bill](https://forum.serverless.com/u/bill)\
**Post date:** [March 21, 2018, 5:07am UTC](https://forum.serverless.com/t/cloud-formation-template-error/4058/2 "2018-03-21T05:07:06Z")

</div>

Add below lines in your `serverless.yml`

```
plugins:
  - serverless-plugin-split-stacks

```

For detail discussion about this limits, check this url:

> <https://github.com/serverless/serverless/issues/3976#issuecomment-317337835>
>
> Hello.
> 
> I had strange issue with quantity of lablda functions:
> 
> \`\`\`
> Error -…-------------------------------------------------
>  
> The CloudFormation template is invalid: Template format error: Number of resources, 208, is greater than maximum allowed, 200
>  
> For debugging logs, run again after setting the "SLS\_DEBUG=\*" environment variable.
> \`\`\`
> 
> Someone has in idea how I can handle this out.
> 
> \_Note\* If I comment out several functions from yml file its starts to deploy so its for sure with count of functions that I have. \_

---

<div class="post-metadata">

**Author:** ![JohnWai](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@JohnWai](https://forum.serverless.com/u/JohnWai)\
**Post date:** [March 21, 2018, 6:31am UTC](https://forum.serverless.com/t/cloud-formation-template-error/4058/3 "2018-03-21T06:31:28Z")

</div>

Thank you so much bill. It works. You save my day.  
Cheers,  
John
