Re:Ask HN: Does anyone else find the AWS Lambda developer ex...
by jmb12686 on Sunday April 18, 2021 @04:28PM
(#26856010)
That can be true if you are using tightly coupled event sources (like s3, SNS, etc) where you need to inspect the incoming object. If you are doing a HTTP / REST API, try to decouple the code as much as possible from the API Gateway invocation by using ExpressJS / aws-serverless-express to aid in local testing and debugging. Then testing and debugging locally becomes much easier.
[ Parent
| on HN ]
Re:Ask HN: Does anyone else find the AWS Lambda developer ex...
by rezonant on Monday April 19, 2021 @04:14AM
(#26860216)
This is my preferred style, and since an express app is technically just a function that accepts req/res, you can pass a whole express app in as the function when running in the cloud, so you have multiple path routes, middleware, the whole nine. You can actually host a fairly complex API in a single function subject to the package size/dependency count restrictions of your FaaS of choice