# Code structuring on large API / generic serverless AWS beginner questions

**URL:** <https://forum.serverless.com/t/code-structuring-on-large-api-generic-serverless-aws-beginner-questions/3406>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [December 30, 2017, 8:47pm UTC](https://forum.serverless.com/t/code-structuring-on-large-api-generic-serverless-aws-beginner-questions/3406 "2017-12-30T20:47:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![gap](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@gap](https://forum.serverless.com/u/gap)\
**Post date:** [January 17, 2018, 7:56pm UTC](https://forum.serverless.com/t/code-structuring-on-large-api-generic-serverless-aws-beginner-questions/3406/2 "2018-01-17T19:56:28Z")

</div>

I have a little experience that may help. I designed an api that I did not consider large. It worked fine in development using the offline plugin. When I deployed it I ran into problems. See [Deploy error: number of resources greater than 200](http://forum.serverless.com/t/deploy-error-number-of-resources-greater-than-200/3422/4)

To address Question #1

I had to break my project into sub services which caused a lot of pain. I use a serverless.yaml at the top of my project for offline development. I have half a dozen sub-services with their own serverless.yaml for deployment. I use the serverless-domain-manager plugin to manage the api-gate, but it requires a prefix on the url, which makes my front end my complicated.

Question #3

I use nvm to manage node versions. I work in both node 6 and 8 without problem. I do not know about how the packaging works because it just works. Run npm (or yarn) to install your dependencies locally and they will be copied when deploying.

Question #5

I use the cli and have no problems. There is a project for deploy multiple [https://github.com/threadheap/serviceless](https://github.com/threadheap/serviceless) for deploying multiple project but I have not used it.

Question #6

I found if the database connection had to close or else the function would time out.

I hope this helps a bit.

---

_[View the full topic](https://forum.serverless.com/t/code-structuring-on-large-api-generic-serverless-aws-beginner-questions/3406)._
