Fakecloud: Local AWS cloud emulator for integration tests
Thread
Unofficial Hacker News client; not affiliated with Y Combinator.
Fakecloud: Local AWS cloud emulator for integration tests
Unofficial Hacker News client; not affiliated with Y Combinator.
waterTanuki · · focus · HN ↗
You should be writing everything in a sans-IO pattern: define your core, the interfaces, and your own types, (even if it seems redundant) and never, ever import a single dependency from a cloud provider in that core. Make two implementations of the interfaces: one in-memory that can be spun up quickly for testing and one that uses the actual cloud provider APIs. Now instead of hoping fakecloud or localstack update their mocks to be inline with AWS, all you have to do is update your dependencies and the implementation code and the core can be left alone for a long time.
This is also why I avoid lambda and other "serverless" compute like the plague because it's designed from the ground up to lock you in.
utopiah · · focus · HN ↗
doesn't it boil down to not using unique services?
If nobody provides an alternative today that could switch as quickly as changing an endpoint and token then you are coupled.
It's not a technical decision as much admitting in the strategy that we are cutting corners because it's cheaper/faster today but some hypothetical day in the future when we'll magically have more resource we won't?