The shared world
Humans in a society are independent, but they share a world: laws, ID systems, roads, hospitals, newspapers. A microservice society shares a platform — common capabilities every human uses, owned and run once.
Shared vs private
| Shared by the society (platform) | Private to each human |
|---|---|
| User identity (who the customers are) | Business data (memory) |
| The front door (API Gateway, domain names) | Business rules (brain) |
| The town square (event bus) and its rules | Inboxes (queues) |
| Monitoring, logging and alerting standards | Its own dashboards and alarms |
| Deployment pipeline templates | Its own deployment schedule |
| Security guardrails (accounts, SCPs, policies) | Its own IAM role (ID card) |
Share infrastructure and standards, never memory. A shared "common database" quietly turns a society back into one giant tangled body.
Identity: the society's ID office
Amazon Cognito user pools register and authenticate customers. Every human trusts the same tokens:
- The UI signs users in and receives a JWT.
- The gate (API Gateway JWT authorizer) checks the token before any human hears the request.
- Humans read the user's ID from the verified token claims — they never handle passwords.
Laws: guardrails
- Separate AWS accounts for environments (and sometimes for sensitive humans).
- Service control policies to forbid dangerous actions everywhere.
- Tagging standards (
service=waiter,team=front-of-house) for cost and ownership.
Hospitals and newspapers: shared observability
- Every human logs in the same structured format with a correlation ID.
- Traces flow across humans (X-Ray), so you can follow one order end to end.
- A society dashboard shows the customer journey; each human has its own.
The history books: analytics
Analysts want to know how the café is doing — orders per hour, popular dishes, payment failures. Don't let them query each human's memory. Instead:
Town square ──rule: all events──► Data Firehose ──► S3 data lake (partitioned, Parquet)
└─► Athena / QuickSight dashboards
Every announcement becomes history, analysable without disturbing anyone's work.
Configuration and secrets
- AWS AppConfig or Parameter Store for settings and feature flags.
- Secrets Manager for credentials, with access granted per human.
Shared DNA: platform constructs
Package common patterns as reusable CDK constructs — e.g. a ServiceFunction with standard runtime, tracing, logging and alarms baked in, or an Inbox construct that always comes with a dead-letter queue and alarm. New humans are then born healthy by default.
A good platform makes the right thing the easy thing: identity, gates, notice boards, monitoring and guardrails are provided once — so each human can focus on its one job.