BattlefyBlogHistoryOpen menu
Close menuHistory

LocalStack is great but shouldn't exist

Ronald Chen May 30th 2022

LocalStack is a set of fake implementations of Amazon web services. LocalStack gets us one step closer to being able to write and test code on a beach.

Without LocalStack, the only sane way for developers to actually build and test their code is to provision an AWS account for each developer (which is separate from production accounts). This is a minor cost in the grand scheme of things and probably what most teams should do, but it introduces a requirement that everybody must have be online in order to get anything done.

But these are all consequences of the lack of first party fake implementations from Amazon themselves. LocalStack shouldn't exist. If Amazon valued developer experience more, they could easily produce offline fake implementations of all their services more easily than external projects like LocalStack.

I can't believe you've done this

We could guess on why Amazon hasn't offered fake implementations, and the most toxic take would be that Amazon is making money by not offering fake implementations as the alternative described previously has each developer have their own development AWS account to increase billable usage. Or another toxic take would be Amazon is afraid people would simply run the fake implementations in production and not pay AWS anything at all.

If either are true, Amazon is shortsighted. A better developer experience would increase the mindshare and usage of AWS. What AWS offers isn't the functionality which the fake implementation replicates, but the assurance of a properly running production system at scale. The fake implementation should only ever be concerned with correctness but not performance nor scalability.

Look a gift horse in the mouth

LocalStack isn't completely free. Some fake implementations are free, but some require a license. The pricing model also includes CI credits that run LocalStack in the cloud, which is pretty silly in my opinion. Their value proposition is "Hey pay us less to test your AWS integration but at the risk our fake implementation isn't perfect". One would need the CI to test the real AWS services anyways, so what's the point of introducing this additional cost? I understand simply good will won't put food on the table for LocalStack; it just sucks to be the developer stuck in the middle.

Meanwhile in similar circumstances...

All this is to say, fake implementations are extremely valuable. In fact all implementation that one builds, ought to offer a fake implementation to all consumers, including things built in-house.

Implemented business logic in a service backed by a database which other services depend on? Offer an in-memory fake implementation to speed up the test of your consumers. Implemented a microservice? Offer an in-process fake implementation that doesn't require a network.

These fake implementations should always have an integration test that ensures the fake implementation can be substituted for the real thing. This proves by transitivity that using the fake service is effectively the same as the real service.

Do you want to offer an amazing developer experience? You're in luck, Battlefy is hiring.

Edit: The initial post incorrectly stated that LocalStack is owned by Atlassian. Atlassian has contributed to LocalStack but does not own it. I apologize for the error.

2024

  • MLBB Custom Lobby Feature
    Stefan Wilson - April 16th 2024

2023

2022

Powered by
BATTLEFY