Living Systems Handbook microservices as humans Bipin Singh
Anatomy of one human

Anatomy of one human

2 min readChapter 04 of 34By Bipin Singh

Before building anything, let's look at a whole "human" — one microservice — from head to toe. Every well-built service has the same body parts, whatever its job. Knowing the map lets you check any service for missing organs.

SensesAPI, events, queues, uploadsBrainbusiness logic (Lambda)Voiceresponses & published eventsHandscalls to other systemsSkincontract & validationMemoryown database (DynamoDB)ID cardIAM roleHeart & pulsehealth, metrics, alarmsImmune systemauth, permissions, encryptionDNAAWS CDK codeOne human = one microservice
Every microservice has the same body parts. A missing part — no immune system, no heart monitor, no clear skin — is a design flaw waiting to hurt.

The parts, one by one

Body part Module Its single responsibility Chapter
Senses Input adapters Receive stimuli from the outside: requests, events, messages, files, timers Senses
Skin Contract and validation Decide what may enter; reject malformed input early Senses
Brain Domain logic Make decisions and apply business rules Brain
Memory Data store Remember things reliably; nobody else reads it directly Memory
Voice Output adapters Answer callers; announce what happened Voice and hearing
Ears for others Subscriptions Listen to announcements from other humans Voice and hearing
Hands Integrations Act on the outside world safely Hands
Immune system Security Keep out what doesn't belong Immune system
ID card Service identity Prove who this human is to the rest of the world Immune system
Heart, pulse, diary Observability Show how the body is doing, record what happened Heartbeat and health
DNA Infrastructure as code Build an identical body every time CDK is DNA

A healthy human, a checklist

When you design or review a microservice, walk down the body:

Key idea

A microservice is not "a Lambda function". It's a whole body: inputs, logic, data, outputs, security, health and the code that builds it. The rest of this section looks at each organ in detail.

How the body is laid out in code

services/
  waiter/                      ← one human
    src/
      senses/                  ← Lambda handlers: API, events, queues (thin)
      skin/                    ← input schemas and validation
      brain/                   ← pure business logic (no AWS calls)
      memory/                  ← repository: reads/writes the service's table
      voice/                   ← event publishing
      hands/                   ← clients for other systems
    infra/
      waiter-dna.ts            ← CDK construct: the body's DNA
    test/

Names like senses/ and brain/ are deliberately playful for teaching — in a real codebase you might call them handlers/, domain/, repository/ and adapters/. The structure is what matters.

Bipin Singh
Written by Bipin Singh

Senior Full-Stack Engineer · AI & AWS. I design and build serverless systems on AWS — and love explaining them simply.

Work with me