Code structuring on large API / generic serverless AWS beginner questions

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

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 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.

1 Like