DEV Community

Discussion on: Why local development for serverless is an anti-pattern

Collapse
 
lxxyx profile image
Lxxyx

In fact, we develop and test locally precisely because the tools in the cloud are not yet perfect. Especially for special scenarios like debugging.

So I think local development is going to be the dominant approach for a long time.

Collapse
 
garethmcc profile image
Gareth McCumskey

There is a lot more to my blog than just that. You may be able to execute code locally but it doesn't make it accurate compared to the environment it will eventually run inj. We have had this problem for years; I have never had a local development environment even 10 years ago I relied upon to give me accurate results. I always had to remote test to be sure. With the easy of Serverless deployments and them being 100% accurate to production means that issue no longer exists ... if I test in the cloud instead.

Collapse
 
jayair_20 profile image
Jay

Yeah debugging Lambda functions can be really painful. It's one of the reasons why we created SST (github.com/serverless-stack/server...). It hot reloads your functions while testing against the resources that've been deployed to AWS. This allows you to set breakpoints in VS Code. Here's a short clip of it in action — youtube.com/watch?v=2w4A06IsBlU