The Beauty of Cloud-Based Development
How I tried to hold on to local development until I saw the light and never looked back
If you haven’t had a chance to listen to my conversation with Paul Swail on our brand new podcast, you should check it out. Paul has an enormous amount of experience with serverless and I particularly enjoy his practical common sense, and his ability to get past the nonsense.
Towards the end of our conversation (at around minute 14) Paul makes this fascinating statement:
“Some people say that you should always prefer a local workflow, but what I would say is that they are conflating local development with isolation and speed. Isolation and speed are very important and local [development] has always meant that; but does it have to be local? [...] It’s not local [development] that you need! It’s just that local [development] has always been the best way to do that, but it may not always be” ~ Paul Swail, interview on The Serverless Mindset podcast
One of the great things about serverless is that it is a very different paradigm from anything we’ve done before. This allows us (some might say, forces us) to rethink common assumptions, models, and processes.
Cloud-based development, for example, is something that would have been almost unthinkable before serverless. Deploying my code to the cloud as I go? Surely, a good engineer would want to run and test everything on their local machine first!
How I Fought Against It
Back a few years ago, in the early days of my serverless journey, I remember feeling distinctly uncomfortable with being unable to test the application locally. I could run a few unit tests at best, but I knew that doing just that could not possibly give me enough confidence to ship my Lambda to production.
I also remember spending days trying to get some semblance of local setup working (using tools like Dynamo Local). That worked until it didn’t because, inevitably, there would be at least a service behaving differently in the cloud than its local equivalent.
Then, it hit me: I was doing it all wrong! What exactly was I trying to solve by running everything locally? As it turns out, I was making the exact mistake that Paul calls out as quoted above: I was conflating local development with the need to test and verify my changes quickly and in isolation. In doing so, I was making my development workflow more cumbersome, and as a result, I was feeling more, not less, nervous about what I was shipping.
The Liberating Feeling of Running (Almost) Nothing on My Machine
The absence of proper local development tools and workflows in serverless is not a bug; it’s a feature. More than that: it’s a blessing!
Cloud-based development means that everything is running on the cloud. It means, among other things, that you no longer need to spend day 1 of your new job onboarding figuring out how to get the system up and running on your local machine. It means that your dev environment (in the cloud) behaves just like production. It means that you can work from anywhere using any machine (however powerful) you want.
What It Looks Like in Practice
Here are 3 fundamentals of my day-to-day, cloud-based development workflow:
Keep reading with a 7-day free trial
Subscribe to The Serverless Mindset to keep reading this post and get 7 days of free access to the full post archives.