‹ BackHN Continuity

Thread

Fakecloud: Local AWS cloud emulator for integration tests

154 points · 78 comments · theanonymousone

  1. waterTanuki · · focus · HN ↗
    Alot of mock services have come out of the woodwork now due to genAI, but I don't think these are the solution from decoupling your services from cloud providers, because they have to keep up with schema updates for every single service which isn't practical even with genAI.

    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.

    1. utopiah · · focus · HN ↗
      > decoupling your services from cloud providers

      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?

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.