fakecloud vs aws-sdk-client-mock

How fakecloud compares to aws-sdk-client-mock. In-process Node mocks vs a real HTTP AWS emulator; when each fits.

aws-sdk-client-mock is an in-process mocking library for AWS SDK v3 in Node.js. You declare what responses each SDK call should return, and the library intercepts calls at the client level.

fakecloud is a real HTTP server that your SDK talks to.

Architectural split

aws-sdk-client-mock is in-process. Your test process imports it, sets expectations, and the library patches SDK behavior. Never touches the network. Returns the exact shapes you scripted.

fakecloud is a separate process on port 4566, speaking the AWS wire protocol. Your SDK serializes a real HTTP request; fakecloud parses it, runs the emulated service behavior, and returns a real HTTP response. Cross-service wiring runs server-side.

When to pick aws-sdk-client-mock

aws-sdk-client-mock excels at this. Don't drop it if it already works for your unit tests.

When to pick fakecloud

Complementary

Most Node teams use both:

Both tools, different tiers of the test pyramid.

Feature-level comparison

fakecloudaws-sdk-client-mock
LanguageAny (HTTP)Node.js only
RuntimeExternal processIn-process
Real Lambda executionYesNo (stubbed)
Real cross-service wiringYesNo
Works with Terraform/CDKYesNo
Failure-path specificityMedium (via normal AWS error codes)High (script any response)
Test isolation/_fakecloud/reset or unique resource namesPer-test by default