Instead of creating /plugins and then having POST, GET, etc. below it, we made {resource} and {id} part of the URL params that would be passed to Lambda. This meant that a request to GET /plugins/1 would be translated as “resource=plugins; id=1” which could then be used by Lambda to locate the correct controller (“plugins” shown above).
We Made the Whole Company “Serverless”

Very good article! I thoroughly enjoyed the read. You guys have done a great job :)

I guess one of the problems with this approach as you have detailed is the fact that you have to write this complex code to decode the context. Moreover, you can be “hit” on any random endpoint and lose out on automatic documentation generation via Swagger.

Would consider rewriting this part and maybe using something like Terraform/Ansible/Serverless framework to automatically deploy Lambdas and configure the API Gateway endpoints?

Also would love to have more details about how much money you are likely to save with Lambda.

Thanks for sharing your journey with the community!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.