AWS in 1 Min · Episode 183

Loose coupling on AWS: change one part without breaking the rest

Change one part, not all. Watch the one-minute video, then read the details.

David Gomez1:11 video · 2 min read

"Splitting an app into services makes it resilient." Not if they're tightly coupled. If the order service calls payments, which calls fraud checks, which calls a ledger, and each one waits for the next, you haven't built microservices. You've built a distributed monolith: one slow service stalls the whole chain, and one changed API breaks its callers.

What loose coupling means

In a loosely coupled system, each component depends only on another's published, versioned interface: not on its internal code, its database, or the assumption that it answers right now. AWS lists this as a Well-Architected reliability best practice (REL04-BP02, Implement loosely coupled dependencies), with a high risk level if you ignore it. The payoff:

  • Failure isolation: a problem in one component doesn't spread to the others.
  • Independent scaling: each part scales on its own load.
  • Independent change: teams ship without coordinating every release.

The queue: the classic decoupler

Put a queue between two services. The order service drops a message into Amazon SQS and moves on; the payment service reads it when it's ready.

  • If payments is down, messages wait in the queue instead of failing the customer's order.
  • If orders spike, the queue absorbs the burst and payments works through it at its own pace.
  • Messages that keep failing go to a dead-letter queue for inspection.

This works for any interaction that doesn't need an immediate answer, where "we received your request" is enough.

Other connectors

  • Load balancers hide how many servers sit behind them, and which are healthy.
  • Amazon EventBridge lets producers announce events without knowing the consumers (EventBridge explained).
  • Amazon SNS fans one message out to many subscribers (SNS + SQS fan-out).
  • AWS Step Functions coordinates multi-step workflows with retries, so services don't call each other in chains (Step Functions).

Hidden coupling

The most common mistake is coupling you can't see on the diagram. Two services that share one database are still tied together: a schema change in one breaks the other, and a heavy query in one slows both. Other hidden ties: shared libraries that force joint releases, and synchronous calls hidden inside "asynchronous" code. Give each service its own data and expose it through an API or events. Also watch for back pressure: a consumer needs a way to slow producers down, or queues just grow forever.

Where AI fits

Treat the model as a dependency too. If your code is written against one provider's request format, changing models means a rewrite. Put the model behind one interface instead. Amazon Bedrock's Converse API gives a consistent request and response shape for all Bedrock models that support messages, including tool use, so moving to a newer, cheaper or faster model is mostly a change of model ID, with model-specific parameters passed separately when needed. "Mostly" matters: models behave differently, so keep an evaluation set of prompts and rerun it before you switch.

Quick recap

  • Depend on interfaces, not on another service's internals, database or timing.
  • Queues absorb failures and spikes; events, SNS and workflows decouple too.
  • Keep models behind one API so swapping one is a setting plus a test, not a rewrite.
AWS in 1 Min #183 · 1:11

Need an AWS expert on your team?

I'm David, an AWS expert and fractional cloud consultant. I work alongside your team to run your cloud and infrastructure: architecture, security, cost and day-to-day operations. You get senior AWS experience when you need it, without the cost of a full-time hire.

  • Architecture reviews and a clear plan for what to fix first
  • Security hardening: IAM, networking, audits
  • Lower AWS bills without slowing your team down
  • Hands-on help with AI workloads on AWS