its intended function correctly over a period. Fraction of time a system can serve requests. Ability to continue providing an acceptable service despite component faults. f Reliability
recover to an acceptable state. Ability to infer internal behavior from logs, metrics, and traces. Ease of controlling inputs and observing outcomes during verification. f Resilience
No AWS SDK is required in domain code. public final class TemperatureService { private final ResultStorage storage; private final EventPublisher publisher; public TemperatureService(ResultStorage storage, EventPublisher publisher) { this.storage = storage; this.publisher = publisher; } } 13
S3ResultStorage and SnsEventPublisher invoke AWS services. Stores results in a Map; no network or credentials. Throws predictable exceptions on selected attempts.
healthy while one downstream service is unavailable. • A timeout does not prove the remote operation failed. • One successful write does not imply that all writes succeeded. • Recovery may repeat operations: duplicate effects become possible. • Failure handling must be specified as part of the API contract.
processing when a required operation fails. Simple, but may leave partial state. Attempt independent effects and report which succeeded or failed. Persist an event before asynchronous delivery (e.g., outbox pattern). More robust, more complex.
all downstream effects occurred. • Lambda Errors counts invocation failures—not every business-level error. • Define required versus optional side effects before coding. • Use a request ID / UUID to correlate processing, storage, and events. • Return a truthful result: complete, partial, or failed.
2026 Copyright Notice. These slides are provided exclusively for educational use in CSC 5100 within the California State University system. Redistribution or use for any other purpose is prohibited without prior written permission.