AWS Certified Solutions Architect - Professional (SAP-C03) Course
Design complex AWS architectures for SAP-C03: security and governance, cost, resilience, migration and automation, in short lessons with diagram exercises.
Inside this course
Exercises you will solve
Services with the most lessons
- Amazon S3
- Amazon Bedrock
- Amazon CloudWatch
- AWS Identity and Access Management (IAM)
- Amazon Elastic Container Service (Amazon ECS)
- AWS Organizations
- Amazon DynamoDB
Try a lesson
Restore the ordering boundary and state guard
Fill the two slots: one must provide FIFO receive-and-delete work distribution by orderId; the other must atomically update an order item only when its stored version matches the expected predecessor.
Amazon Elastic Container Service (Amazon ECS)
AWS LambdaHow a lesson works
- ExplanationOrder is an end-to-end contract
- Complete the diagramRestore the ordering boundary and state guardThe exercise you just tried
- ExplanationQueue groups and stream shards are different scopes
- Sort the statementsSeparate group mechanics from log mechanics
- ExplanationRecover the predecessor before advancing
- Trace a requestFollow the repaired predecessor
- ExplanationScale independent sequences, not one sequence
- Build the diagramReassemble the end-to-end contract
- ExplanationWhat to remember
- 5 to 10 short steps, one at a time.
- Feedback at once: an exercise says what was wrong as soon as you answer.
- No videos: you read and solve at your own pace.
Course scope
The course follows the official SAP-C03 exam guide and covers all 5 domains and 21 tasks.
Design architectures built for the cloud1 free96 lessons
At-least-once delivery is a promise within a particular delivery boundary, not proof that a business operation finished. A successful SNS Publish response confirms acceptance by SNS. Successful delivery from SNS to SQS establishes a second boundary: SQS now retains the message independently of the worker.
A stable operation key names one intended business action, not one execution attempt. For a balance adjustment, a key could be tenant/account/adjustment-id. Concurrent deliveries and delayed replays of that adjustment must preserve the same key. A genuinely new adjustment needs a new identifier, even when its amount is identical.
At-least-once delivery concerns attempts to deliver an accepted message across a defined transport boundary. Repeated delivery is permitted. The contract depends on the transport's retention, retry, and failure-handling rules; it does not promise that downstream business work succeeds.
Business order must survive publication, delivery, processing, and state commit. Use the smallest entity that needs serialization: an orderId, not one group for every order. Independent orders can then progress concurrently, while a single busy order remains inherently serial.
Message ordering answers a sequence question: in what relative order must distinct messages be delivered or processed? At-least-once delivery answers a delivery question: how does the system pursue delivery despite failures, allowing repeated attempts? Neither guarantee supplies the other.
Idempotency concerns repeating one logical operation: applying it again does not change its intended effect. Ordering concerns the relative sequence of distinct operations. For a state transformation f, idempotency means f(f(s)) = f(s). That says nothing about whether another transformation may safely run before or after it.
Standard queues provide at-least-once delivery and make a best-effort attempt to preserve send order. Duplicate deliveries and occasional out-of-order arrivals are valid behavior. Their nearly unlimited API call throughput does not strengthen either guarantee.
An SNS FIFO topic preserves ordering within each message group, not across the whole topic. The publisher supplies a MessageGroupId: messages in that group follow the order in which SNS receives them. Different groups can progress independently, with no ordering guarantee between them.
A FIFO subscriber on a Custom Event Bus delivers events in publication order within an event group. The publisher assigns that group using SystemMetadata.EventGroupId on each publish entry. The ordering contract is within a group, not across all publications.
Amazon Kinesis Data Streams separates retained records from consumer progress. Reading a record does not remove it. Separate consumers can process the same records at different speeds and revisit them while they remain within retention.
Amazon SNS distributes a publication to independent subscriptions. Each matching subscription is a separate delivery destination, not a worker competing for ownership of the publication. Subscription filters can select different subsets; without filters, each subscription is eligible for every publication.
EventBridge separates event classification from destination selection. In its rule-and-target event bus model, producers emit events and independently configured rules match fields such as source, detail-type, and nested detail. Every matching rule can invoke its configured targets; matching is not a first-match decision.
Amazon EventBridge event-bus rules answer “Which destinations should receive this event?” A producer publishes a fact, and matching rules select targets. Destination selection can change without making the producer address each handler.
Amazon SQS represents pending work. Consumers of the same queue compete for messages; they do not each receive an independent copy of every message. Receiving a message temporarily hides it through the visibility timeout. After successful processing, the consumer deletes it. A receive is not a permanent transfer of ownership, so applications must tolerate redelivery.
Statelessness means that processing a request correctly does not depend on an earlier request reaching the same instance. Each request carries authentication material, a resource identifier, operation inputs, and a stable retry key. The instance validates identity and authorization; identifiers supplied by a caller are not proof of permission.
An authoritative state store defines the application's durable record. When DynamoDB has that role, losing a cached copy must not erase the underlying business state. Externalizing this state lets application instances remain replaceable; putting state outside a process does not, by itself, establish its durability or correctness.
For shared application state, separate freshness from isolation. DynamoDB provides read-committed isolation: reads return committed item values, never values from writes that ultimately failed. However, the default eventually consistent read can omit a recently completed successful write.
Putting authoritative application state in Amazon S3 lets replacement compute instances recover it without relying on another instance's memory or disk. This lesson uses object API requests against a general purpose bucket. Local copies are disposable; S3 holds the shared state.
Query caching reuses database results rather than executing the same query on every read. It suits frequently accessed, relatively static data, especially expensive non-indexed lookups, aggregations, and joins. Under high read concurrency, reuse reduces database CPU pressure and improves throughput.
Externalizing application state makes its failure behavior depend on the state store. For ElastiCache, distinguish availability—restoring access through a working primary—from durability—preserving data for recovery. Replica promotion answers the first question; it is not, by itself, a statement about which writes survive.
ETL describes data integration: extract source data, transform it into an intended representation, and load the prepared result into a target. Its contract concerns the meaning, quality, and structure of the target data. These are logical responsibilities, not necessarily separate programs.
Extract, transform, and load are responsibilities, not a requirement to use exactly three programs. Divide work where its execution model, scaling limit, or recovery unit changes. Extraction should leave a reproducible input, transformation should produce validated output, and loading should apply that output safely to the intended destination.
A recoverable consumer pipeline separates retained input from consumer progress. Here, Amazon Kinesis Data Streams supplies two AWS Lambda consumers through separate event source mappings. Each mapping tracks its own progress through the shards; one consumer succeeding does not acknowledge records for the other or remove them from the stream.
For centralized logging, the decisive distinction is managed destination delivery versus retained records for consumers. Amazon Data Firehose accepts records and manages their delivery to a configured destination. When that destination is Amazon S3, Firehose handles buffering and writing objects rather than requiring you to operate an archive writer.
This lesson covers Lambda Event Functions using standard Lambda execution environments, not Managed Instances or Web Functions. Concurrency is the number of invocations executing at the same time. For steady traffic, average concurrency is approximately requests per second multiplied by average execution duration in seconds. If dependencies slow down, concurrency demand rises even when the arrival rate stays constant.
An S3 prefix is part of an object key, not a directory with table semantics. Separate raw arrivals from curated tables so ingestion files can be retained independently of analytical rewrites. A path such as curated/events/event_date=2026-01-01/ expresses an organization convention; it does not itself enforce a schema or transaction boundary.
The AWS Glue Data Catalog indexes data locations, schemas, properties, and runtime metrics. It organizes metadata into databases and tables; it is not the underlying data store. Accessing a catalog table therefore means accessing a description of data, not moving that data into the catalog.
Amazon AppFlow manages configured transfers between supported SaaS applications and destinations. Choose it when its connector, transfer direction and built-in mappings, filters and validations satisfy the integration. You configure a flow rather than implement an extraction job, but the source application's API permissions and limits still apply.
Amazon EMR and AWS Glue both support large-scale distributed processing. Data volume alone does not distinguish them, and neither does a simple batch-versus-streaming split. The useful starting point is whether the workload fits a managed data-integration runtime or needs broader framework and environment choices.
AWS Glue jobs execute data preparation programs: they read sources, apply transformations, and write outputs. The Glue Data Catalog is a different capability: it stores table definitions, locations, and other technical metadata. Using catalog metadata does not mean that a Glue ETL job executes.
A recurring ETL pipeline has two separate decisions: which activity runs next and which data that activity processes. AWS Glue workflows handle execution dependencies; job bookmarks maintain processing state between ETL runs. Repeating a workflow does not, by itself, make its jobs incremental.
AWS Glue streaming ETL jobs run continuously, consuming Amazon Kinesis Data Streams, Apache Kafka, or Amazon MSK data. They cleanse and transform records and load results into S3 data lakes or JDBC data stores. Producing output to Kinesis Data Streams is also supported, but only through AWS Glue scripts.
Amazon Redshift makes lake data part of a warehouse SQL workload. A query can combine tables stored in Redshift with external tables in Amazon S3 without first loading all the lake data into warehouse storage. The important advantage is warehouse integration: existing SQL applications can join warehouse data and lake data through the Redshift endpoint.
Athena transformations start with cataloged S3 data. The objects contain the data; the AWS Glue Data Catalog stores metadata such as table and column names. A catalog table gives SQL a schema through which to address the S3 dataset.
Durable execution separates a workflow's lifetime from the lifetime of any one compute invocation. Persistent execution state records progress so that a wait or failure does not require the entire business process to start again. It is not a snapshot of a running process's memory.
A durable checkpoint records enough workflow state to continue after the worker disappears. It normally identifies the execution, the next workflow node, completed results, pending actions, and any data needed by later steps. A transcript or a worker's local memory is not necessarily enough: neither reliably says which operation should run next.
A durable execution can span multiple Lambda invocations, including invocations after suspension or failure recovery. Enable durable execution when creating the function; it cannot be added to an existing function.
Standard follows an exactly-once execution model: tasks and states do not run more than once unless you specify Retry behavior in Amazon States Language. That exception matters: Standard does not suppress repetition explicitly requested by your workflow definition.
A task's integration pattern determines what Step Functions considers completion. With Request Response, specifying the service resource alone makes the workflow wait for the service's HTTP response and then advance. That response does not mean that a submitted job has finished.
A Task state's TimeoutSeconds bounds how long the task can take to complete. If it exceeds that timeout, the task fails with States.Timeout. For a Request Response task, leaving the timeout unspecified does not allow an indefinite wait: Step Functions applies a default timeout.
Lambda durable execution puts workflow control flow in a function's application code. Native branches and loops, combined with durable SDK operations, define the logical execution. Checkpoints and replay preserve progress across invocations; the workflow does not require one continuously running invocation.
An event pattern describes the event structure and field values a rule matches. When an incoming event meets those criteria, EventBridge sends it to the rule’s configured targets. The pattern decides which events qualify; the target configuration decides what EventBridge invokes.
Cross-account publication to an Amazon EventBridge event bus requires authorization from both the caller's account and the bus owner's account. The sender's identity policy allows events:PutEvents on the destination bus ARN. The destination bus's resource policy allows publication by that external principal, directly or through a grant to its account.
For Custom Event Bus - Classic, the sender creates a rule whose target is the receiving bus; the receiver creates rules matching incoming events. Cross-account routing works within the same Region in all Regions, and across Regions when the destination is a supported cross-Region destination.
An Amazon EventBridge event pattern determines whether a rule matches an event; the rule's configured targets determine where it goes. Envelope fields such as account, region, source, and detail-type constrain the event context. Fields nested under detail constrain business content. A payload value such as market = EU does not discover a destination: a rule must explicitly target the intended bus.
Reconciliation repeatedly compares declared intent with observed state and takes corrective action. For a continuously running microservice, intent includes its workload specification and replica count. A failed replica creates a difference to repair; it does not normally require changing the declared count. Reconciliation is asynchronous, so desired count and available count can differ during recovery.
Amazon EKS exposes the Kubernetes API through an AWS-managed Kubernetes control plane. You declare objects such as Deployments, Pods, and Services. Kubernetes controllers reconcile desired state with observed state: for example, a Deployment controller manages ReplicaSets that maintain the requested Pods.
Amazon ECS is the orchestration layer: it interprets task definitions, schedules tasks, and manages their lifecycle. An ECS service expresses a desired population of tasks and manages deployments and replacement. AWS Fargate supplies managed compute on which those tasks execute. Choosing Fargate does not replace the ECS service, scheduler, or task definition.
Replatforming an existing application to Amazon ECS means expressing how its containers should run, rather than reproducing the server that previously hosted them. A task definition describes the containers and their runtime settings, including images, commands, environment variables, and resource requirements. A task is a running instance of that definition.
Service Connect builds service discovery and a service mesh through ECS configuration. It only interconnects services, using automatic discovery through short names and standard ports. Its AWS Cloud Map namespace logically groups communicating tasks; the Cloud Map namespace type does not affect Service Connect.
An ECS service scheduler maintains a specified number of simultaneous instances of a task definition. When a task fails or stops, the scheduler launches a replacement. Task placement strategies and constraints customize how it places and terminates tasks.
Service Auto Scaling uses Application Auto Scaling to change an ECS service's desired task count. ECS publishes service-average CPU and memory usage to CloudWatch. A suitable utilization metric changes when demand changes at fixed capacity; at fixed demand, doubling tasks should halve the metric. Choose the resource that depletes first, not simply whichever metric is easiest to obtain.
For an EKS microservice, compute capacity must match the workload rather than merely add nodes. Karpenter provisions compute according to workload compute, storage, acceleration, and scheduling requirements. A capacity decision therefore includes what kind of node satisfies the workload, not just how many nodes exist.
Service discovery maps a logical service name to connection information: instance addresses, a proxy listener, or a stable intermediary. A DNS answer or an API response supplies information used to choose a destination. It does not, by itself, participate in the subsequent application request.
The control plane manages the configuration that communication should follow; the data plane handles the requests themselves. With ECS Service Connect, ECS manages a proxy inside each participating task. The application calls a configured service name, and the proxies handle the connection between tasks. ECS is not an inline hop for each request.
A proxy selects from its local endpoint set, not directly from the workloads that exist right now. Keeping those two views aligned requires a lifecycle: observe an instance, establish readiness, publish its endpoint, propagate the change, and eventually withdraw it. Registration records identity and location; it does not prove that the application can serve requests.
AWS Cloud Map separates a service's identity from its current endpoints. A namespace groups service names and establishes available discovery mechanisms. A service defines discovery settings and health configuration. Each registered instance represents one resource, identified within that service and described by attributes.
A structured log record describes an event using explicit fields: for example, event=payment_retry, attempt=2, and trace_id=T. Structure makes events filterable and comparable. It does not require the record to identify an enclosing operation, its parent, or its duration.
CloudWatch metrics describe measured behavior over time: request counts, error rates, resource use, and latency distributions. A metric is a time series, not a request history. Its dimensions identify the population being measured; an aggregate latency increase does not identify the downstream call responsible for one slow request.
Trace continuity requires both a request path that carries context and a telemetry path that delivers spans. This example follows one HTTP call from Service A through Service B's inbound Envoy sidecar to Service B. It deliberately shows only this direction of the call, not responses or other mesh hops.
AWS Distro for OpenTelemetry (ADOT) is an AWS-supported distribution of OpenTelemetry. Its instrumentation libraries generate telemetry from application activity; its Collector receives, processes, and exports telemetry. These are distinct responsibilities: deploying a Collector does not, by itself, instrument application code.
X-Ray assembles traces from reported data; it does not intercept every application call. In this architecture, an instrumented frontend calls an instrumented backend. Each independently sends recorded spans to one shared collector.
Amazon ECR basic scanning checks supported operating-system packages. Enhanced scanning integrates Amazon Inspector to assess supported operating-system packages and programming-language packages. Neither mode guarantees that every dependency or image format is supported.
ECR basic scanning supports two ways to start a scan: configure repositories to scan on push, or perform manual scans. These describe how basic scans are initiated.
Basic scanning uses AWS native technology and operating-system vulnerability data feeds to produce common vulnerabilities and exposures (CVE) findings across supported operating systems. For CVE severity, ECR uses the upstream distribution's severity when available; otherwise, it uses the Common Vulnerability Scoring System (CVSS) score.
Amazon Inspector's CI/CD integration uses the SBOM Generator and Scan API to produce container-image vulnerability reports. In the plugin integration, a build step runs the generator on the supplied image, then submits the generated software bill of materials, or SBOM, to the API.
An Amazon ECR lifecycle policy manages images in a private repository. A rule selects images, checks retention criteria, and specifies an action. expire deletes images; transition moves them to archive storage. The only supported transition destination is archive.
For standard AWS Lambda execution, concurrency is the number of invocations running at the same time. Scaling out supplies more execution environments for overlapping invocations; it does not make an individual invocation faster. Time spent waiting for a database or API still occupies an invocation.
Request rate measures arrivals per second; concurrency measures invocations still being processed. For a stable workload, estimate average concurrency with C = λ × D: arrival rate multiplied by average duration in seconds, measured across the same processing boundary.
Container scaling on EC2 has two control loops. Replica scaling changes the desired number of tasks or Pods. Cluster scaling changes the compute capacity on which those replicas can run. Increasing the desired count does not create room for those replicas: the scheduler must still find suitable capacity.
Application Auto Scaling adjusts a resource’s scalable capacity. For an ECS service, that capacity is its desired task count; for Lambda, it is provisioned concurrency on a function version or alias. These are separate scalable targets with separate policies, not one shared capacity pool.
TLS termination ends a TLS connection and makes its application data available inside the terminating endpoint. Port 443 alone tells you neither where TLS ends nor whether HTTP inspection is possible. Read the listener protocol first, then the backend protocol.
An Application Load Balancer (ALB) makes HTTP request-routing decisions. An HTTPS listener terminates TLS, then evaluates rules in priority order, using the first matching rule or the default action. Host, path, header, and other request conditions can select target groups. A path condition selects a destination; it does not, by itself, remove the matched path prefix.
REST API and HTTP API are API Gateway product choices, not descriptions of whether a backend speaks HTTP. Start with the API-management and ingress features the API must expose.
A REST API can expose a client-facing contract that differs from a legacy backend's interface. The integration choice determines where that difference is handled. With HTTP proxy integration, API Gateway passes the request to the HTTP endpoint and its response back to the client, without requiring you to configure integration requests and responses. With HTTP custom integration, you configure both sides: method request to integration request, then integration response to method response.
API Gateway is preferable when the public boundary must enforce an API contract independently of the application: authorization, route-level throttling, and supported request mediation. Select features by API type: HTTP APIs offer native JWT authorization; REST APIs add capabilities such as usage plans and request validation. An endpoint carrying JSON does not, by itself, need API Gateway.
A WebSocket API separates a long-lived connection from the route invocations that process its messages. This diagram uses Lambda integrations and an application-owned connection registry; its arrows show logical operations, not every response.
Both services manage WebSocket infrastructure. The important difference is who owns publish–subscribe membership and fan-out. With AppSync, a publisher submits an update through a supported API contract, and the service distributes it to matching, authorized subscribers. Your application does not enumerate WebSocket connection IDs for each publication.
Edge computing changes where selected computation runs relative to users or data sources. It can shorten the network path to a decision, but the decision still executes. Caching changes whether computation or retrieval must happen again: a usable stored result replaces repeated work.
A CloudFront cache key identifies the cached response a request can reuse. Selecting request attributes for that key is a correctness decision before it is a performance decision: requests that need different content must not share an indistinguishable cached response. Adding attributes that do not change content instead creates unnecessary entries, reducing opportunities for reuse and increasing origin traffic.
Start with cache identity, not cache duration. A cache policy controls which query strings, HTTP headers, and cookies participate in the cache key. Including a varying value separates requests into different cached variants; excluding an unnecessary distinction lets more requests reuse the same variant.
Lambda@Edge runs Lambda code at CloudFront lifecycle events. You create the source function in us-east-1, publish a numbered version, and associate that version with a distribution's cache behavior and event type. AWS replicates it to managed execution locations; the source Region is not where every request executes.
Execution placement determines which requests pay for edge processing. A viewer-request handler runs before CloudFront checks its cache. A Lambda@Edge origin-request handler runs when CloudFront must forward a request to an origin, not when a cached response satisfies it.
Execution location determines which network journeys processing can avoid. CloudFront Functions runs lightweight JavaScript at CloudFront edge locations. Lambda@Edge runs in CloudFront regional edge locations, not necessarily at the viewer’s nearest edge location. Regional compute runs in your selected AWS Region. None guarantees an end-to-end latency target merely by being distributed.
A real-time fan-out path needs two decisions: which branches match an event, and which live connections inside those branches may receive it. Here, an existing producer publishes through the Amazon SNS Publish API to a topic ARN. SNS subscription filters select delivery branches; separate SQS standard queues retain each matching branch's copy. Workers sharing one queue divide work rather than each receiving a copy.
Subscription-aware fan-out first selects eligible recipients, then schedules an independent delivery for each. Here an application on Amazon ECS receives published events and queries a DynamoDB table for authorized topic-to-connection memberships. API Gateway supplies the WebSocket transport; it does not automatically maintain this application's topic subscriptions.
Fan-out describes a one-to-many distribution topology: one input causes work at multiple downstream destinations. It says that work branches, but not how those destinations were chosen. Explicit calls, parallel workflow branches, and subscription-based delivery can all produce fan-out.
A persistent WebSocket connection is a delivery address, not a subscription. API Gateway holds the socket; short-lived handlers maintain application state. A connection registry associates a connection ID with its principal, tenant, endpoint, and lifetime. A subscription mapping associates an authorized topic with connection IDs.
AppSync GraphQL subscriptions deliver results from linked GraphQL mutations. AppSync Events delivers publications to channel subscribers through a separate Event API, without a GraphQL schema or mutation. Both manage WebSocket connections and routing; neither makes a live connection a durable event log.
Silo placement gives each tenant dedicated resources, such as an application deployment, database, or AWS account. The boundary is the resource allocation: another tenant does not share that particular resource. Dedicated resources do not necessarily mean dedicated physical hardware, and application authorization is still required.
A noisy neighbor consumes enough shared capacity to degrade another tenant’s work. Start with the actual contention boundary: CPU scheduling, memory, database connections, locks, storage I/O, or a downstream service quota. Separate application processes do not isolate a database they still share.
In a multi-tenant application, a shared user pool provides one point of entry for user administration. This remains true even when user profiles are unique to their tenants. Tenant-specific profiles do not turn the shared pool into independently administered directories.
An identity pool stores user identifiers linked to external identity providers and provides temporary AWS credentials. User-pool authentication is separate: obtaining a sign-in token does not itself grant AWS credentials. An authenticated user presents a token; enabled guest access provides a unique identifier and credentials without authenticating with an identity provider. Authenticated users and guests can assume different IAM roles.
A tenant identifier in a URL is a requested context, not authority. Validate the Cognito token's signature, issuer, expiry, and intended audience or client as appropriate to its type. Then authorize the selected tenant against administrator-controlled membership. A valid identity can belong to several tenants; each operation still needs one authorized tenant.
Row-level security (RLS) adds row authorization to ordinary table privileges. Consider PostgreSQL, including Aurora PostgreSQL, with a shared orders table and a non-null UUID tenant_id. Enable enforcement with ALTER TABLE orders ENABLE ROW LEVEL SECURITY. For roles subject to RLS, an enabled table with no applicable policy defaults to denying rows; granting table access alone does not make rows accessible.
A tenant-bound envelope has two key levels: a tenant-specific key-encryption key (KEK) and independently generated data encryption keys (DEKs) beneath it. In this design, each tenant has a separate symmetric AWS KMS key, and each object gets a fresh DEK. The application encrypts the payload locally with authenticated encryption; KMS protects the DEK, not the bulk payload.
Integrate AI and ML services into architectures31 lessons
Amazon Bedrock provides managed access to foundation models. For managed model inference, you select a supported model and invocation options; AWS operates its serving infrastructure. You do not select the underlying serving instances or replace the model’s inference container. Capacity planning still exists: your application must handle quotas, throttling, and the limits of its selected inference option.
Amazon Bedrock AgentCore provides framework-independent infrastructure for agent applications. AgentCore Runtime runs your packaged agent code and dependencies in managed, isolated execution environments. Your code or chosen framework still defines the reasoning loop: which model to call, how to interpret its response, which tools to invoke, and when to stop. Hosting an agent does not transfer those decisions to Runtime.
A role's trust policy controls who may assume it; its permissions policies control what the resulting session may do. For cross-account role assumption, the caller needs an identity-policy allow for sts:AssumeRole on the target role, and the target trust policy must allow that caller. Applicable explicit denies still win. The source role's resource permissions do not transfer into the target session.
A vector-backed Knowledge Base turns documents into searchable representations through parsing, chunking, embedding generation, and vector-store indexing. The indexed chunks retain a mapping to the original document. Retrieval can therefore return source material rather than just an untraceable vector match.
An action group exposes application operations to a managed Amazon Bedrock agent. Define those operations using an OpenAPI schema or function details, including names, descriptions, parameters, and required inputs. During orchestration, the agent uses this contract and the conversation to select an operation and assemble its arguments. Distinct descriptions and narrowly scoped operations reduce ambiguous selection.
Input checks decide what may reach inference; output checks decide what may reach the user. They enforce separate boundaries: an acceptable request can produce a prohibited answer, and checking an answer cannot undo sensitive data already sent to a model.
Sensitive information filters examine input prompts and model responses. Built-in personally identifiable information (PII) detection uses context-dependent, probabilistic machine learning. A value's surrounding text matters; a pass is not proof that no sensitive information exists.
Response streaming preserves incremental output only when every layer passes it onward before completion. For a supported Bedrock model, use ConverseStream or InvokeModelWithResponseStream. Their SDK event streams are not browser-ready server-sent events: an application must interpret the events and produce its own delivery protocol.
An Amazon Bedrock evaluation job measures responses against selected criteria on a dataset. A model comparison changes the model while keeping prompts and other relevant conditions comparable. An application comparison measures the complete response-producing configuration, including prompts, retrieval, and orchestration. A stronger model score does not by itself prove that an application change improves user outcomes.
Amazon Bedrock offers four inference service tiers: Reserved, Priority, Standard, and Flex. For Reserved tier, you allocate input and output tokens-per-minute capacities separately. This lets the allocation reflect the workload’s input/output balance rather than treating all tokens as one interchangeable capacity pool.
A cross-account application needs an authorized identity for its Bedrock calls. One pattern is to assume an invocation role in another account through AWS STS, then use its temporary credentials to call Bedrock. That account boundary is separate from the Region boundary: assuming a role does not select where inference runs.
IAM principal attribution automatically captures the calling IAM user or role without changes to inference API calls. Identity-attributed costs flow to AWS Cost Explorer and CUR 2.0. Principal tags add organizational dimensions, but identity capture does not require tags. The finest cost grain is usage type per day, not per request.
Tool calling separates a model's proposal from an application's authority to act. The runtime supplies tool definitions and receives a tool name, arguments, and a call identifier. It treats these as untrusted input, not executable instructions.
An MCP host is the AI application that controls model context and tool use. Within it, an MCP client maintains a connection to a particular MCP server. The server exposes capabilities backed by external systems. A host can maintain several such connections, each with its own negotiated capabilities and trust decisions.
Tool calling is a model interaction pattern: the application supplies tool definitions, and the model produces a structured request naming a tool and its arguments. That output is a request for execution, not execution itself. Its representation belongs to the model API, not automatically to MCP.
Caller authentication determines who may enter an AgentCore Runtime. IAM SigV4 is the default authentication and authorization mechanism and needs no additional authentication configuration. Alternatively, configure an authorizer during agent creation to accept JWT bearer tokens. A Runtime supports either SigV4 or JWT inbound authentication, not both simultaneously.
AgentCore Gateway presents supported backends as tools through an MCP endpoint. A target binds backend configuration to the tool definitions Gateway exposes. One target can expose multiple tools; a target is not necessarily one operation. The agent needs an MCP client, but the Lambda function or schema-defined API does not need to implement an MCP server.
Gateway supports interceptors for custom access-control logic and resource-based policies for standard AWS-style access control. A REQUEST interceptor executes before Gateway calls its target. Tool-level authorization uses interceptor logic to validate permissions before tool execution, so custom checks belong before the operation they protect.
A coordinator decomposes a goal and proposes assignments to specialists. It should not gain unrestricted authority merely because it selects the work. In this design, coordinator output is a proposed plan: deterministic controller code checks allowed roles, dependencies, and budgets before dispatch. The coordinator decides what work is useful; the execution controller decides whether a transition is permitted.
Execution mode determines when the caller receives a result and where work waits. Measure the full latency budget: upload and serialization, admission and queueing, preprocessing, model execution, postprocessing, and result delivery. A fast model cannot rescue a request whose transfer or queueing time already exceeds its deadline.
The defining distinction is the server-side response contract: what a successful invocation response promises, and where the prediction will arrive. With real-time inference, the prediction ordinarily returns within the original request-response exchange. With asynchronous inference, submission returns an acknowledgment, and the prediction becomes available separately after processing.
A latency budget covers the entire request, not just model execution. For an illustrative 200 ms application target, allocate 70 ms to transport and application work, 100 ms to the endpoint call, and 30 ms to uncertainty and response handling. Validate the allocation with end-to-end measurements: adding independently measured p99 values does not calculate the end-to-end p99.
A provisioned SageMaker AI real-time endpoint runs model-serving instances even when no requests arrive. For an instance-based production variant, instance sizing chooses the hardware; horizontal scaling changes the instance count. Neither choice automatically fixes the other: more replicas cannot make an oversized model fit into one replica's memory.
Serverless Inference automatically provisions inference compute and can scale on-demand capacity to zero when idle. You select memory rather than serving instances. The allocation must hold the loaded model, framework, and working data—not merely the model artifact on disk. Serverless Inference is CPU-based; a model requiring GPU execution is not a fit.
A prediction request is accepted only after its work envelope is durably queued—not when the submission handler merely starts. Here, the input already exists at an immutable S3 location. The handler submits its location, logical request ID, model version, and processing options, then acknowledges only after SQS confirms the send. A lost acknowledgment can cause resubmission, so acceptance is not an exactly-once boundary.
Asynchronous Inference accepts individual requests for a deployed SageMaker AI endpoint, queues them, and stores results in Amazon S3. The submission response is an acknowledgement with output-location information, not the prediction. It suits requests that arrive independently and can tolerate waiting.
A RAG pipeline can only retrieve what ingestion preserves. Parse documents into meaningful sections before choosing chunk boundaries: a table separated from its headings or a rule separated from its exceptions can produce misleading evidence. Smaller chunks offer precise matches but lose context; larger chunks preserve context but mix topics. Overlap reduces boundary loss while increasing duplication and index size.
Vector search ranks items by proximity to a query vector under a chosen similarity measure. Its output is typically identifiers, scores, and associated content—not a generated answer. It can serve semantic search, recommendations, or duplicate detection without any generative model.
Document chunking partitions source content into retrievable passages; it is not summarization. Choose boundaries around the smallest passage that supports a claim with its conditions intact. A repair command and its safety warning may be one evidence unit even when they occupy separate paragraphs. A table row needs its column headers, units, and applicable footnotes. A page break is a layout boundary, not necessarily an evidence boundary.
A retrieval pipeline needs an embedding contract: compatible document and query encoders, model revision, input preprocessing, vector dimensions, normalization, and distance metric. Equal dimensions do not establish compatibility. Some models require different document and query instructions; follow the model's paired encoding procedure rather than sending identical input formats blindly.
An OpenSearch vector index stores an embedding alongside its chunk text and metadata. A knn_vector mapping declares the vector dimension and search configuration. The dimension must match the embedding output; the distance space must suit the model's similarity convention. Document and query embeddings must come from a compatible embedding model, using its intended document and query modes. Equal dimensions alone do not make vectors comparable.
Design hybrid cloud integration patterns38 lessons
AWS Site-to-Site VPN provides an IPsec connection between networks. In its usual internet-based deployment, IPsec encrypts packets across a public transport whose routing and congestion you do not control. VPN describes the protected overlay, not an inherently private physical path.
Path diversity is independence from specified failures, not simply a count of connections. Start with a failure set: a customer router, access circuit, conduit, Direct Connect location, or entire site. Two paths can survive a router failure yet fail together when their shared building entrance is damaged.
BGP advertisements describe reachable destination prefixes, not complete bidirectional connections. An advertisement is useful only if the receiver accepts it, can resolve its next hop, and can install a usable route. Import and export filters therefore determine which paths can compete before preference attributes matter.
A connection count does not establish resilience. For maximum resiliency, separate Direct Connect connections terminate on separate AWS devices in more than one location. The important question is which connections a single failure can remove together.
For private and transit virtual interfaces, active-passive routing depends on the routes AWS selects. Calling one interface “active” and another “standby” does not establish that preference: the advertisements must lead AWS to select the intended path.
A Site-to-Site VPN connection provides two IPsec tunnels terminating on separate AWS endpoints. Configure both, including a BGP session inside each tunnel. Both still depend on the same customer gateway device: surviving that device's failure requires another device, another customer gateway resource, and another VPN connection.
A hybrid design needs more than two connections. Direct Connect and Site-to-Site VPN provide alternative paths, while the Direct Connect gateway association and transit gateway route tables determine what those paths can reach.
Eventual convergence means that, after writes stop, both copies eventually agree if delivery, application, and conflict resolution succeed. An asynchronous hybrid connection alone provides none of those guarantees. A locally committed change can remain absent from the other copy while synchronization is pending.
Incremental synchronization needs a trustworthy definition of change, not just a smaller transfer. Metadata scans can miss edits when timestamps are preserved; checksums detect content differences but require reading data. This custom reference design instead assumes the source supplies a consistent snapshot and a retained, committed, ordered journal identifying immutable source versions and deletions. That is an application contract, not a property of every file system.
A consistent snapshot supplies the replica's starting state; the change stream supplies its continuation. They must meet at an engine-supported snapshot boundary, S. In the simple model used here, the snapshot represents committed state through S, and replay applies committed transactions after S. An ordinary table scan plus a wall-clock timestamp does not establish this relationship.
Change Data Capture (CDC) concerns which database changes are captured; incremental transfer concerns moving differences rather than the whole dataset. They are not mutually exclusive: captured database events can be transferred incrementally. The important distinction is between capturing an operation history and extracting changed current state.
Change data capture (CDC) reads ongoing source changes through engine-specific APIs that access the source engine’s transaction logs. It is a different operation from copying the existing contents of tables.
A DataSync agent is a virtual machine appliance that reads and writes storage during a transfer. Deploy it in the storage environment on VMware ESXi, Linux KVM, Nutanix AHV using the KVM image, or Microsoft Hyper-V. For storage in an AWS VPC, an agent can instead run on Amazon EC2.
A DataSync task has separate controls for which data to select and which differences to transfer. A manifest specifies an exact list of files or objects to transfer. Filters include or exclude particular types of data. These answer different selection needs: an explicit list versus inclusion or exclusion rules.
S3 File Gateway exposes an NFS or SMB share backed by S3 objects. Clients send file operations to the gateway and receive file content from it. Writes enter the local cache before asynchronous upload publishes them to S3: a successful client write does not prove that an S3 reader can see the new object.
A VPC-hosted server endpoint accepts connections initiated by existing file-transfer clients. An SFTP connector does the opposite: Transfer Family initiates a connection to an existing SFTP server. Both can connect on-premises workflows to Amazon S3 without exposing the SFTP listener to the public internet.
AWS DataSync moves files and objects between supported storage locations. Its unit of work is stored content and supported metadata. A database backup export is a file to DataSync: the service does not interpret its rows, transactions, or restore instructions.
AWS DataSync performs transfers between storage locations through discrete task executions. A task can run on demand or on a schedule. Applications can continue using an existing file server while DataSync refreshes a separate AWS copy; applications do not mount DataSync as their storage.
AWS DataSync owns a storage-copy operation. You configure supported source and destination locations, then execute a task manually, on a schedule, or through an API. The service coordinates discovery, transfer, and integrity verification. Choose it when the requirement is to move a defined storage dataset without making individual clients perform the copy.
A boundary adapter lets callers depend on a business contract rather than a legacy record layout. Here, an existing v1 API accepts amountMinor, currency, and submissionId. The adapter converts these into legacy XML, including an exact decimal amount and legacy field names. It owns these translations; callers do not import the legacy schema. This one-way diagram shows submission and work delivery, not responses, acknowledgments, authentication, or network connectivity.
An adapter implements the interface an application expects using an interface a legacy system already provides. The stable contract covers operations, data meanings, results, and failures—not just an endpoint address. This example exposes reserveFunds(accountId, amount, currency, requestId) while keeping legacy SOAP details outside application code.
A data contract defines field meaning as well as representation: names, units, types, character encoding, presence rules, and version. A translation is correct when the consumer recovers the intended values under that contract. Valid JSON alone proves neither correct units nor compatible types.
Amazon MQ manages the setup, operation, and maintenance of message brokers for Apache ActiveMQ Classic and RabbitMQ. It provides a migration path that can retain existing messaging interfaces rather than require a rewrite of messaging code.
An Amazon MQ event source mapping is a Lambda resource that reads broker messages and invokes a function synchronously. The mapping handles delivery; the function processes the delivered batch to perform the transformation.
A private hosted zone supplies DNS records within its associated VPCs. Before reasoning about which namespace wins, establish that the client can use this private DNS view: both enableDnsSupport and enableDnsHostnames must be true.
A default inbound endpoint provides an external path to VPC Resolver without changing its resolution behavior. Configure on-premises resolvers to forward applicable domains to the endpoint IP addresses. Its security group must allow inbound TCP and UDP port 53.
Conditional forwarding selects a DNS destination from the queried name. In this architecture, an EC2 workload asks VPC Resolver; associated rules determine whether Resolver sends the query through a Resolver outbound endpoint to corporate DNS servers. The diagram shows queries, not returning answers or application traffic.
Bidirectional hybrid DNS means configuring two independent query paths. Corporate DNS forwards aws.example.com to Resolver inbound endpoint IP addresses. AWS workloads use their VPC Resolver, which forwards corp.example.com through an outbound endpoint. Neither endpoint creates the other direction.
Split-horizon DNS, also called split-view DNS, uses separate public and private views of the same namespace. Both zones can be named example.com, while api.example.com has different answers in each. Those answers can lead to different content or authentication requirements. The public zone can also be hosted by another DNS provider.
Compare the mechanisms by holding the DNS question constant: the queried name and record type, such as api.engineering.example.com A. Conditional forwarding maps a matching suffix to destination DNS servers. Split-horizon DNS makes the answer to that same question depend on the resolution context. These are different policy inputs and outputs, even when one deployment uses both.
Conditional forwarding chooses an upstream resolver from the queried name. Within a resolver’s configuration, a domain rule directs matching queries to designated DNS servers. Its output is a query destination, not the address ultimately returned to the application.
AWS Local Zones place selected AWS services in AWS-operated locations closer to a geographic population or workload center. You choose among available Local Zones; you do not have Local Zone hardware installed in your facility. A Local Zone extends a parent AWS Region rather than acting as an independent Region.
A Local Zone subnet belongs to a VPC in its parent Region, but places supported resources at the Local Zone location. The same VPC can contain subnets in parent-Region Availability Zones and in Local Zones. This is not another VPC, so connecting these subnets does not require VPC peering.
The service link connects an Outpost with its AWS Region. Outposts is designed for a constant and consistent connection, so this connection is an operating dependency, not merely a deployment-time requirement.
AWS Outposts places AWS compute and storage capacity at a customer site for local processing and lower latency, using the same programming interfaces as AWS Regions. Local placement does not mean independent management: AWS operates, monitors, and manages that capacity as part of a Region. Each Outpost extends a specific Availability Zone.
ECS Anywhere extends a regional, AWS-operated ECS control plane to customer-managed hosts. EKS Anywhere provides tooling for customer-operated Kubernetes clusters whose control planes run locally. The important boundary is where desired state is reconciled, not just where containers execute.
ECS Anywhere registers customer-managed machines as external container instances in a regional ECS cluster. The regional ECS control plane selects eligible instances and manages desired task state; the host's ECS agent and container runtime carry out that state locally. This deployment uses ECR images and CloudWatch Logs, which are choices rather than requirements for every deployment.
Amazon EKS Anywhere supplies tooling to create and operate customer-managed Kubernetes clusters. Each cluster's Kubernetes API server, scheduler, controllers, and etcd run on customer-operated infrastructure. AWS connectivity is not required for these local control-plane functions.
Design network architectures41 lessons
Amazon VPC IP Address Manager (IPAM) separates address planning into scopes, pools, and allocations. A scope represents an address-management domain; separate private scopes allow intentional reuse for networks that are isolated from one another. Within a scope, provision address space into a top-level pool, then provision portions into child pools. For example, 10.0.0.0/8 can contain a regional pool 10.64.0.0/12, which contains a production pool 10.64.0.0/16.
VPC peering connects two VPCs using private IPv4 addresses, including VPCs in different accounts or Regions. Traffic never traverses the public internet. Peering uses existing VPC infrastructure: it requires no gateway, Site-to-Site VPN connection, or additional physical hardware.
VPC peering preserves private source and destination addresses; it does not translate overlapping networks. AWS rejects peering if any IPv4 CIDR block in one VPC overlaps any IPv4 CIDR block in the other. Check secondary CIDR blocks as well as primary blocks. Choosing nonoverlapping workload subnets does not bypass a VPC-level overlap.
AWS VPC peering connects its two participating VPCs. If A peers with B and B peers with C, A can communicate with B and B can communicate with C, subject to routing and traffic controls. Those two relationships do not establish A-to-C connectivity.
A peering star connects each spoke VPC directly to a central VPC. A spoke can reach private endpoints hosted in that central VPC when routes and traffic controls permit. The central VPC is the destination network, not an intermediate network on that path.
Transitive routing requires a supported forwarding service and a usable route at every hop. Here, two VPCs in separate accounts attach to one AWS Transit Gateway, and a corporate network connects through an AWS Site-to-Site VPN attachment. The diagram shows logical forwarding adjacencies in both directions, not individual tunnel or subnet interfaces.
The transit gateway owner shares its regional gateway through AWS Resource Access Manager (AWS RAM). A participant account can then attach its own VPC in the same Region, subject to its IAM permissions. Sharing does not transfer the gateway, give the owner control of the participant's VPC, or let the participant administer the gateway's route tables.
This design lets production and development reach the corporate network in both directions while preventing direct production-to-development routing. Each VPC has an attachment to a regional AWS Transit Gateway; a Site-to-Site VPN attachment connects the corporate network. The arrows show routed traffic between adjacent components, not permission for every spoke to reach every other spoke.
The provider creates an endpoint service associated with a Network Load Balancer (NLB). The consumer creates an interface endpoint referencing that service. AWS places endpoint network interfaces with private addresses in the consumer's selected subnets. Clients connect to those addresses rather than routing to provider subnet addresses.
AWS PrivateLink and AWS Transit Gateway solve different reachability problems. For the interface-endpoint pattern covered here, PrivateLink exposes a particular service through private endpoint addresses. It does not connect the consumer to the provider's entire network.
Classless Inter-Domain Routing (CIDR) uses explicit prefix lengths to describe address ranges, allocate them, and represent them in routing. It replaces the old assumption that an address's class determines its network boundary. In IPv4, 10.20.4.0/23 fixes the first 23 of 32 bits; the remaining 9 bits vary. The block therefore contains 2^9 = 512 addresses.
A durable IPv4 plan assigns parent pools to organizational boundaries, then allocates smaller blocks to VPCs and subnets. For example, reserve 10.64.0.0/12, covering 10.64.0.0–10.79.255.255, for a cloud estate. Allocate 10.64.0.0/16 to VPC A and 10.65.0.0/16 to VPC B. Parent–child containment is intentional; overlap between independently allocated siblings is not.
Use Amazon VPC IP Address Manager (IPAM) to allocate addresses through a hierarchy: organization space, regional pools, then VPC CIDRs. For example, provision 10.0.0.0/8 into a top-level pool, delegate 10.64.0.0/12 to a regional pool, and allocate 10.64.0.0/18 to a VPC. Provision a child pool from its parent before allocating from that child; each allocation consumes space unavailable to its siblings.
Subnetting answers “Which address range contains this interface?” Network segmentation answers “Which communications may this workload initiate or receive?” Subnetting partitions addresses into nonoverlapping ranges; segmentation establishes communication privileges between systems. A subnet can help implement a segment, but the two are not equivalent.
Implement three boundaries together: routing supplies a path, security groups permit workload relationships, and network ACLs constrain traffic crossing subnet boundaries. A route is not permission. Retaining the VPC's local routes means that removing a database subnet's internet route does not prevent another tier from reaching its private address.
A client opens TCP from local port 51000 to a peer's port 443. Its security group must allow that outbound connection. For a tracked flow, the response is automatically allowed inbound, even without an inbound rule permitting port 51000. This does not permit the peer to initiate an unrelated connection.
Stateless filtering evaluates each packet independently using fields such as addresses, ports, and transport protocol. Stateful filtering adds memory: a connection table associates packets with an existing exchange, typically using a five-tuple and protocol-specific state or timeouts. That association provides connection context, not an interpretation of application content.
Asymmetric routing occurs when a conversation's forward and return paths differ. Each routing decision uses the current packet's destination and the applicable route table; it does not automatically reverse the path taken by an earlier packet. A more-specific return route can therefore bypass the firewall used by the request.
An inline DPI engine can enforce a content rule only when the traffic actually crosses it. This design shows the request path for a trusted TLS reverse proxy forwarding HTTP to a backend. It is one Availability Zone slice, not a complete high-availability deployment. Responses must retrace the inspected backend connection, although response arrows are omitted.
In a Classic firewall policy, the stateless engine inspects a packet first. Stateful inspection is a possible next stage, not an automatic second inspection for every packet.
A firewall endpoint inspects traffic that VPC routing sends through it. Creating the endpoint does not put every workload behind it. An endpoint cannot inspect traffic entering or leaving its own subnet, so reserve a dedicated firewall subnet and keep workloads in separate subnets.
Gateway Load Balancer (GWLB) distributes IP traffic across inspection appliances without becoming the application's destination. A Gateway Load Balancer endpoint (GWLBe) is a zonal VPC endpoint powered by AWS PrivateLink. Route tables steer traffic to it; creating an endpoint alone does not insert inspection.
Resource association determines where a web ACL applies: AWS WAF uses the associated policy to inspect HTTP(S) requests for one or more protected web application resources. Association and request handling are separate design decisions. A well-written rule does not protect a resource unless its web ACL is associated with that resource.
AWS Network Firewall inspects network traffic that is steered through it. Its controls can use addresses, ports, protocols, connection state, and supported application-protocol inspection. It can filter non-HTTP traffic as well as HTTP traffic; describing it as only a Layer 3/4 firewall understates its scope.
AWS Firewall Manager centrally administers security policies across resources and accounts in an AWS organization. For Network Firewall protections, its job is to apply the intended configuration to the intended scope and identify resources that do not comply. It operates in the management plane, not in the packet path.
AWS Firewall Manager turns centrally defined security policies into managed protections across AWS accounts. Its organization-wide reach depends on AWS Organizations with all features enabled; consolidated billing alone is insufficient. The Organizations management account establishes the Firewall Manager administrator and the required trusted access. A dedicated member account can serve as the delegated administrator.
Independent layers make different decisions: boundary inspection evaluates network flows, workload segmentation limits reachable destinations, and application-layer protection evaluates HTTP requests. This design uses a regional Application Load Balancer (ALB), private application instances, and an isolated database tier. The resource security groups are shown in the resource labels.
Dual-stack networking runs IPv4 and IPv6 alongside each other. A dual-stack client reaches an IPv4 destination using IPv4 and an IPv6 destination using IPv6. Each native connection uses one common address family; dual stack does not translate packets between families. Both paths still need working routes, listeners, and security policy.
Dual-stack migration is additive: retain the existing IPv4 CIDRs and addresses while introducing IPv6. IPv4 and IPv6 communication are independent. There is no migration path from an IPv4-only subnet to an IPv6-only subnet; adding IPv6 to an existing IPv4 subnet produces a dual-stack subnet, not an IPv6-only subnet.
DNS64 supplies an IPv6 destination for an IPv4-only dependency. Enable DNS64 on the workload subnet to use Route 53 Resolver synthesis: when a name has an A record but no AAAA record, the resolver embeds the IPv4 address beneath 64:ff9b::/96. AWS NAT64 can also work with your own DNS64 server.
Dual stack introduces IPv6 alongside the existing IPv4 path. Associate an IPv6 CIDR block with the VPC, then associate IPv6 address space with the participating subnets. VPC address sources include Amazon-provided space, BYOIP, and an IPv6 CIDR allocated from an IPAM pool. A subnet can receive a /64 from the VPC's associated range.
Dual-stack adoption is a gated release, not a single network change. Retain the working IPv4 path while preparing IPv6 without advertising it to general production clients. First inventory listeners, dependencies, address literals, proxies, inspection devices, hybrid links, and tools that parse or store addresses. Check support for the actual service endpoint and configuration: an IPv6-capable network does not make every attached service IPv6-capable.
Weighted routing selects among records with the same name and type using their relative weights. Assuming all records are eligible and have positive weights, a record’s selection probability is its weight divided by the sum of the weights. Weights of 3 and 1 therefore mean expected DNS-selection shares of three quarters and one quarter—not guaranteed shares in each small sample.
An endpoint health check evaluates a specific response contract. For HTTP and HTTPS, Route 53 must establish a TCP connection within four seconds, then receive an HTTP 2xx or 3xx status within two seconds after connecting. HTTPS checks do not validate SSL/TLS certificates: an invalid or expired certificate does not itself fail the check. A TCP-only check instead requires a connection within ten seconds.
Geolocation routing maps named geographic areas to DNS records. Route 53 normally locates the recursive resolver's source address; with supported EDNS Client Subnet, it can instead use a supplied client network prefix. Neither identifies a person's exact location. Corporate forwarding, VPNs, and IP geolocation errors can change the apparent location.
Route 53 latency-based routing chooses among records associated with AWS Regions using AWS latency measurements. It does not time each application request. Selection uses the querying resolver's location or, when available, client-network information from EDNS Client Subnet; a centralized resolver can therefore distort the estimate for distant users.
Geographic routing asks, “Which destination did we assign to this location?” Latency-based routing asks, “Which configured destination is expected to have the lowest network delay?” Both can use location-related information, but they use it for different decisions. Here, geographic routing means explicit location assignments, such as Route 53 geolocation routing, not geoproximity routing.
A Route 53 decision tree can use latency alias records to select a Region, then weighted records to select resources within that Region. Set Evaluate Target Health to Yes on both Regional latency aliases. Route 53 then checks whether a Region has healthy resources before selecting it; if none are healthy, it can choose a healthy resource in the other Region. A healthy-looking parent must not conceal failed leaves.
Route 53 health-based DNS failover is enough when an observed failure should automatically change DNS answers and the alternate application is already safe to serve. Configure failover records and meaningful health signals. A responding web endpoint alone does not prove that its database is current, writable, or adequately provisioned.
AWS Global Accelerator provides fixed static IP addresses as client entry points. Those addresses are associated with Regional endpoints in one or more AWS Regions. A fixed entry point does not, by itself, tell you how the destination is selected: that depends on the accelerator's routing mode.
Amazon Route 53 selects DNS answers. After resolving a name, a client connects to the returned destination; application traffic does not pass through Route 53. Health-based changes affect subsequent DNS answers, not addresses already held by resolvers or applications.
Design data, storage, and database architectures50 lessons
AWS Glue Data Catalog stores technical metadata: databases, table schemas, partitions, and storage locations. AWS Lake Formation governs access to catalog resources and supported access to their underlying data. Lake Formation uses the Glue Data Catalog; it does not introduce a second, competing table catalog.
For registered Amazon S3 data, distinguish storage registration from a reader’s authorization. Registration supplies an IAM role that Lake Formation can use to access the location; it does not grant every principal permission to read its tables. A reader using an integrated query service still needs the applicable IAM permissions, including lakeformation:GetDataAccess, and the Lake Formation permissions enforced for that reader and resource.
When a producer grants Lake Formation permissions on a Data Catalog resource to an external account or an external IAM principal, Lake Formation uses AWS RAM to share it. Within the same organization, the shared resource is available immediately. Outside that organization, the recipient's data lake administrator must accept the RAM invitation using the RAM console or AWS CLI before the resource becomes available.
An Iceberg snapshot describes a committed table state through a manifest list, manifests, and references to data and delete files. Table metadata identifies the current snapshot and other table state. Writers create new objects rather than modifying files that existing snapshots still reference; unchanged files can be shared across snapshots.
A lakehouse schema change crosses three boundaries: the physical schema in stored files, the table metadata and catalog definition, and the reader contract in queries and jobs. Updating a catalog does not rewrite Parquet files or update application code. A successful metadata operation proves neither that historical files remain readable nor that running consumers still work.
Partition pruning skips a partition only when its partition values or boundaries prove that it cannot contain a matching row. The selected partitions must form a safe superset: they may contain extra rows, but must not exclude any possible match. A residual row filter removes nonmatching rows after selection.
Redshift Spectrum lets a Redshift query reference external tables in S3 alongside local warehouse tables. An external schema maps a Redshift schema name to an external catalog database; it does not copy the lake's rows into Redshift. For example, CREATE EXTERNAL SCHEMA lake FROM DATA CATALOG DATABASE 'lake_db' IAM_ROLE 'arn:aws:iam::123456789012:role/RedshiftLakeRead'; makes catalog tables addressable as lake.table_name.
An AppFlow trigger determines when a transfer starts; its extraction settings determine which source records qualify. Available triggers depend on the connector. On-demand execution starts a transfer explicitly, scheduled execution polls periodically, and event-triggered execution requires connector support for the relevant source events. Salesforce supports event-triggered flows, but that does not make every Salesforce object or event an interchangeable change stream.
For Amazon EMR on EC2, first decide when the cluster should stop. A transient cluster automatically shuts down after processing its job flow and suits periodic batch processing. A persistent cluster runs until you shut it down. Continuously running streaming work needs a continuing cluster lifetime rather than shutdown after a finite job flow.
Amazon MSK runs Apache Kafka as a managed service. A Kafka topic is a set of partition logs: reading a record does not remove it. Separate analytics applications can therefore read the same events at different speeds, provided the records remain within retention.
COPY brings a bounded batch into a Redshift table. Streaming ingestion brings stream records into a materialized view through refreshes. The diagram shows logical data movement, not query traffic; its two Redshift cards represent objects in the same cluster.
OLTP means many concurrent, short operations over small sets of records: look up an order, reserve inventory, or record payment. Tail latency and transaction boundaries matter. OLAP means broad scans, joins, and aggregations: calculate revenue by region across years. A read is not automatically analytical; an indexed order lookup is transactional work.
Strong consistency makes successful write completion a visibility boundary. A read started after that boundary must reflect the completed write or a later write within the covered scope. The guarantee applies to other clients too, not just the client that performed the write.
Strong consistency is a guarantee about an operation within a defined scope. If a write completes successfully before a read begins, the read must reflect that write or a later write. This real-time ordering is commonly expressed as linearizability: operations behave as though they occurred atomically in one order that respects completion times. The guarantee applies to other clients, not just the writer.
Amazon RDS manages relational databases. The relational model uses a well-defined schema, with data normalized into tables, rows, and columns. Relationships between those tables are part of the model, rather than merely documents stored next to one another.
A Multi-AZ DB instance deployment has a primary and a synchronous standby that RDS automatically provisions and maintains in another Availability Zone. The standby is available for failover, but cannot serve read traffic. Its extra instance provides availability, not extra readable capacity.
Read replicas scale read-heavy workloads by taking application queries away from the primary DB instance. Applications route those queries to replicas; the replication relationship carries database changes, not application queries.
A conventional Aurora MySQL or Aurora PostgreSQL cluster has one writer and optional read-only Aurora Replicas. Its instances share a distributed cluster volume within one Region. Adding replicas adds read compute and promotion candidates—not independent writers. This topology is distinct from Aurora PostgreSQL Limitless Database and Aurora DSQL.
Amazon Aurora is part of Amazon RDS. Here, standard RDS means RDS for MySQL or RDS for PostgreSQL, not Aurora. Both choices manage infrastructure, backups, and maintenance; neither gives unrestricted operating-system or database-superuser control. The useful comparison is their engine and storage architecture, not whether AWS operates them.
Aurora Serverless v2 adjusts each serverless instance's compute capacity within a configured range and bills for the capacity consumed over time. Provisioned Aurora uses a selected DB instance class: while it runs, you pay for that class even when the workload leaves resources idle. Both are managed Aurora; serverless does not uniquely provide patching or backups.
Access-pattern-driven modeling starts with the requests an application must serve: which values it knows, which items it needs, their order, and how much data it returns. For each request, identify a table or index key that selects the relevant data directly. An attribute being stored does not, by itself, make that attribute an efficient lookup path.
Provisioned mode separates the capacity you buy from the capacity you consume. You set read and write capacity for expected application needs and pay for the hourly capacity provisioned, even when some is unused. On-demand mode uses pay-per-request read and write billing without requiring an expected throughput specification.
Global tables support multi-active, multi-Region state: an item change made at any replica is automatically replicated to every other replica. The default mode, multi-Region eventual consistency (MREC), replicates asynchronously, typically within a second or less. That typical delay is not a guarantee that another Region already has an acknowledged write.
DynamoDB Accelerator (DAX) serves repeated, eventually consistent reads from a cache. The application specifies the cluster endpoint; DAX client software uses it for intelligent load balancing and request routing. DAX runs in a VPC, where security groups control cluster access. The client routes requests; the DAX nodes hold cached data; the DynamoDB table remains the underlying data store.
Data replication maintains another copy of application state. Failover transfers responsibility for serving work to another destination. A replicated database can exist without any mechanism to promote it, start the recovery application, or reconnect clients. Conversely, traffic can move successfully to a destination that lacks usable application data.
The useful question about synchronous replication is what must happen before the caller receives success. For DynamoDB multi-Region strong consistency (MRSC), an item change is synchronously replicated to at least one other Region before the write returns a successful response. Replication beyond the receiving Region is therefore part of the success condition, not work deferred until after success.
Read/write splitting is an application routing decision, not simply a database endpoint choice. This design uses an ECS application, an RDS for PostgreSQL writer, and one asynchronous read replica. Separate writer and reader pools keep operations on the intended database connection; arrows show logical operations and telemetry, not response packets.
Read/write splitting chooses where database work runs. Writer failover restores the writable role after failure. This example combines them using Aurora and RDS Proxy, but serving reads successfully does not prove that writes can recover.
Sequential I/O accesses consecutive logical locations in order. Random I/O accesses nonconsecutive locations; it does not require statistically random choices. Both terms apply to reads and writes. A database can stream a log sequentially while accessing scattered data pages randomly.
Storage sizing starts with a workload envelope, not an advertised IOPS figure. Record request-size distributions, read/write mix, sustained and burst IOPS, outstanding requests, working-set size, and latency percentiles. Include background work such as checkpoints and compaction: these can compete with foreground random reads even when average demand looks modest.
For a sequential transfer, throughput equals completed operations per second multiplied by mean bytes per operation, provided both measurements describe the same layer. For example, 1,000 completed operations/s carrying 256 KiB each deliver 250 MiB/s. Application calls are not necessarily storage operations: buffering can combine calls, while a storage stack can split large requests. Use the request sizes and operation counts at the layer whose limit you are evaluating.
Amazon EBS exposes a block device: software reads and writes ranges of logical blocks. A file system or database maps its own structures onto those blocks. Updating one database page therefore does not require replacing the entire database file, although the file system or database may generate additional journal, log, or metadata writes.
Amazon EBS presents a block device to EC2. The operating system can put a file system on it, or an application can use raw blocks. EBS does not interpret directories, file locks, or file-system metadata: the host software owns those structures. Amazon EFS presents a managed file system over NFS, so clients operate on a shared namespace rather than formatting a device.
Amazon S3 object APIs and Amazon EFS file operations expose different contracts. In an S3 general purpose bucket, an application addresses an object by bucket and key, then issues requests such as GET and PUT. A key such as jobs/42/result.csv is an object name: its slashes do not create real parent directories. This lesson compares that object interface with EFS, not a separate file-access layer over S3.
Amazon EFS provides shared file access over NFSv4.0 and NFSv4.1 for Linux workloads. It is a strong starting point when applications need a shared NFS namespace without requiring a particular storage vendor’s file system. It does not provide a native SMB endpoint.
Capacity, IOPS, throughput, and latency are separate requirements. SSD-backed volumes suit frequent small transactional reads and writes and deliver consistent performance for random and sequential I/O. HDD-backed st1 and sc1 target throughput from large sequential streams; small random requests do not obtain that streaming performance.
General Purpose is the default EFS performance mode and provides the lowest per-operation latency. One Zone file systems always use General Purpose; this constraint does not mean General Purpose is restricted to One Zone.
Amazon FSx is a family of different file systems, not one engine with interchangeable protocols. First identify the application's protocol, authentication, permissions, locking, and file-system feature requirements. A faster configuration cannot repair incompatible semantics.
Concurrency lets a client access more aggregate S3 bandwidth: issue multiple requests concurrently and spread them over separate connections. Amazon S3 does not limit the number of connections to a bucket. The performance technique is to distribute work across connections, rather than depend on one request to achieve the desired throughput.
Access frequency and retrieval deadline are separate requirements. Rarely read data can still require immediate access. Some archive classes provide immediate access; others require a restore operation and a wait. Exclude placements that cannot meet the required retrieval behavior before comparing costs.
S3 Standard is assigned when an upload does not specify a storage class. For latency-sensitive applications, S3 Express One Zone provides consistent, single-digit millisecond access. It stores data redundantly on multiple devices within one Availability Zone: device redundancy is not the same as placement across zones.
S3 Glacier storage classes and the archive tiers inside S3 Intelligent-Tiering both keep objects in Amazon S3 buckets. Neither model requires exporting objects into the separate, vault-based Glacier service. Applications still identify an object by its S3 bucket and key.
EFS Standard uses SSD storage for frequently accessed files. It provides first-byte latency as low as 1 millisecond for reads and 2.7 milliseconds for writes. These are low-end latency figures, not guarantees for every operation.
Cache-aside populates a cache when a read misses. Write-through populates it synchronously during a write, before acknowledging full success. These are population policies, not necessarily different network topologies; one application can implement both.
A freshness contract says which old answers remain acceptable, to whom, and for how long. Read-your-writes for the writer is weaker than requiring every read started after a successful write to see that write. For strict reads, use an authoritative read with the required consistency, or a protocol that validates the cached version against authoritative state.
With cache-aside, application code owns cache population. It checks the cache; when an entry is missing or expired, it reads the database and writes the returned value to the cache. The database remains authoritative. This lazy loading uses cache capacity for requested data rather than filling it with data nobody reads.
Write-through populates or updates the cache whenever data is written to the database. In this application-coordinated design, the application commits the database change, writes the committed value to the cache, and only then acknowledges full success. Database-first ordering avoids caching a transaction that later fails; it does not make the two updates atomic.
An AWS RAM resource share associates resources, principals, and managed permissions. Only the owner can share a resource; a consumer cannot reshare it. Sharing externally does not change permissions or quotas within the owning account. Resource associations and principal associations have separate, nonadjustable per-share limits; referencing an entire organization uses only one principal association.
AWS Clean Rooms lets partners analyze collective datasets without revealing their underlying data to one another. Participants create a collaboration and invite AWS accounts, or create a membership to accept an existing invitation. Membership establishes participation; it is not a grant of general-purpose access to another participant’s source dataset.
In a data mesh, a domain owns a data product's meaning, quality, freshness, supported interface, and change policy. Publishing a payments table means naming its owner, explaining currency and settlement semantics, documenting access requests, and maintaining those commitments—not merely exposing files. Shared platform templates make this repeatable without transferring product ownership to the platform team.
Design identity security architectures1 free42 lessons
Federation trust starts with configuration, not with an incoming token. A relying party trusts a particular issuer and its signing keys. SAML commonly establishes this through exchanged metadata containing an entity ID and signing certificates. OIDC uses an issuer identifier, provider metadata, and a published JSON Web Key Set. Never let an untrusted token choose an arbitrary trusted issuer or key source.
In direct IAM SAML federation, the corporate identity provider authenticates the user; AWS accepts that identity only through previously configured trust. Administrators import trusted IdP metadata into an IAM SAML provider and create a role whose trust policy names that provider and permits sts:AssumeRoleWithSAML.
OpenID Connect (OIDC) lets a relying application establish identity from an ID token, but decoding a JWT proves nothing. Configure the expected issuer independently of the incoming token. Discovery metadata must identify that issuer, and signing keys must come from its trusted JWKS endpoint. Do not let an unverified token choose an arbitrary discovery endpoint or key URL.
OpenID Connect (OIDC) adds authentication to OAuth 2.0. Its identity artifact is an ID token: a JWT carrying claims about an authenticated subject for an intended client. An OAuth access token serves a different purpose—access to a resource—and is not interchangeable with an ID token.
Federation answers a sign-in question: what evidence should a relying party accept that this identity authenticated? SAML assertions and OpenID Connect ID tokens carry authentication evidence. They do not, by themselves, maintain the destination's user directory. Federation also does not require copying the user's password into that directory.
SAML 2.0 carries an authentication result from an identity provider, or IdP, to a service provider. After validating the assertion, the destination can establish a session. The assertion is evidence used at sign-in, not a continuing connection through which the destination learns every later directory change.
IAM Identity Center permits only one identity source per AWS organization. Select an external identity provider when users are managed in a system such as Okta or Microsoft Entra ID. Alternatively, connect an on-premises or AWS managed Active Directory. IAM Identity Center can also use its own identity store.
IAM Identity Center adds centralized workforce access management above account-local IAM roles. With an organization instance, administrators assign users or groups to AWS accounts through permission sets. Identity Center provisions and manages corresponding IAM roles in those accounts. An account instance supports supported applications, but does not manage AWS account access.
SCIM synchronization carries identity changes from an external identity provider (IdP) into AWS IAM Identity Center. Enable automatic provisioning in IAM Identity Center, obtain its SCIM endpoint, and create a bearer token. Configure the provisioning connection in the IdP using that endpoint and token.
OpenID Connect (OIDC) specifies how OAuth 2.0 is used for authentication. IAM Identity Center supports authorization flows that let applications running on public clients retrieve temporary credentials for programmatic access to AWS accounts and services on behalf of users.
Amazon Cognito user pools manage application users and issue tokens that describe an authenticated subject and delegated API access. A user-pool user is not an IAM user. Signing up a customer does not create an AWS principal, and putting that customer in a user-pool group does not attach an IAM policy to them.
IAM manages the durable definitions: a role, its trust policy, and its permission policies. The trust policy governs who can assume the role; permission policies describe what its sessions may do, subject to other applicable controls. A role has no long-term access keys of its own.
Effective permissions are the result for a particular principal, action, resource, and request context. A statement applies only when its action, resource, principal where required, and conditions match. An explicit deny in an applicable policy overrides an allow; an implicit deny means the required permission was never granted.
OAuth 2.0 is an authorization framework: it defines roles and exchanges through which a client obtains an access token for a protected resource. In delegated access, a resource owner authorizes a client, an authorization server issues the token, and a resource server accepts it for permitted access. The client can act without collecting the resource owner's password.
Choose a grant using two independent questions: whose authority is needed, and can this client protect credentials? User delegation calls for authorization code with PKCE, whether the client is public or confidential. Client credentials is for a confidential client acting under its own authorization, without user delegation. A secret embedded in browser code or a distributed mobile app does not make that client confidential.
Managed login, direct user pools API authentication, and federation are combinable approaches, not mutually exclusive architectures. They authenticate against the same user pool and produce the same token types. Choosing an interface does not, however, make every token-acquisition flow or scope equivalent.
An API must distinguish decoding a JWT from accepting its claims. A signed JWT contains an encoded header, payload, and signature; decoding reveals data, not trustworthy assertions. Its signature protects integrity, not confidentiality. Even a mathematically valid signature establishes trust only when the verification key belongs to an authority the API has chosen to trust.
A signed JWT is acceptable only under a resource server's configured trust policy. Decoding its header and payload proves nothing. Configure the trusted issuer, its trusted HTTPS JWKS location, and permitted signing algorithms independently of the incoming token. Amazon Cognito user-pool tokens use RS256; a validator must not let the token select an otherwise forbidden algorithm.
A resource server accepts an access token only under an explicit validation policy. For a JWT, verify the signature using keys associated with a configured, trusted issuer; restrict algorithms; and check issuer, expiration, applicable time constraints, and the expected audience or provider-defined client binding. Never let an untrusted token choose an arbitrary issuer or key endpoint. Decoding claims is not validation, and a valid signature alone does not establish that the token belongs at this API.
Amazon Verified Permissions evaluates a principal, action, resource, and optional context against a specified policy store. Its answer is only as trustworthy as those inputs. With IsAuthorized, the application must authenticate the caller and construct the principal itself. With IsAuthorizedWithToken, a configured identity source supports token validation and principal mapping. Neither approach makes client-supplied ownership or tenant attributes trustworthy.
Amazon Cognito user pools authenticate users and issue tokens. Signed ID tokens carry identity claims; signed access tokens carry claims intended for access control, including OAuth scopes. A token establishes facts about its subject and issuance, not an unconditional right to perform every operation in an application.
An EKS Pod Identity association maps an IAM role to a service account in a namespace in a specified cluster. Those coordinates identify the workload identity; the role's IAM permissions determine its AWS access. Scope those permissions to the actions and resources the application needs rather than treating the worker node's role as the application's identity.
IAM Roles Anywhere lets an external workload obtain temporary role credentials by proving possession of a private key associated with an X.509 certificate. A trust anchor identifies a trusted certificate authority; a profile lists permitted roles and session settings; the selected role's trust policy independently controls whether Roles Anywhere may assume it. None of these controls replaces the others.
A role’s trust policy is a resource-based policy that controls who may obtain a role session. For cross-account sts:AssumeRole, the caller needs an applicable identity-policy allow for the target role, and the target role’s trust policy must allow that caller. Applicable explicit denies still override those allows. AWS STS returns temporary credentials only when the authorization checks succeed.
A monitoring provider can legitimately assume roles in many customer accounts. A confused deputy failure occurs when customer B persuades that provider to use customer A’s role. The provider authenticates correctly to AWS; the missing check is whose authority the provider is exercising. Knowing A’s role ARN alone grants no access.
AssumeRole exchanges an authorized, signed request for a new role session. For cross-account access, the caller needs permission to call sts:AssumeRole on the target role, and the target role's trust policy must allow that caller. Applicable explicit denies still win. Success returns an access key ID, secret access key, session token, and expiration; subsequent requests use those session credentials.
A cross-account role session has two authorization gates. In Account A, the caller needs permission for sts:AssumeRole on the target role. In Account B, that role's trust policy must accept the caller and its request conditions. Passing these gates creates a new principal: an assumed-role session, not a copy of the caller's permissions.
Attribute-Based Access Control (ABAC) lets one policy scope selected actions to resources whose attributes match the requester's attributes. For a supported action, a condition can use StringEquals with aws:ResourceTag/Project as the key and ${aws:PrincipalTag/Project} as the value. A principal tagged Project=Atlas then satisfies that condition only for resources tagged Project=Atlas. The statement must still allow the requested action and resource.
A permissions boundary sets the maximum permissions available to an IAM role through its identity-based policies. A session policy, supplied when obtaining an STS role session, narrows that session further. Neither policy grants access independently. A boundary belongs to the role; a session policy applies to the particular session.
A data perimeter constrains who can access data, which resources identities can access, and where requests can originate. These are independent boundaries: an organization member can target an external resource, and an external identity can target an organization-owned resource. Conditions narrow permissions; satisfying them does not itself grant access.
IAM Access Analyzer external access analysis identifies potential access outside a zone of trust by evaluating resource-based policies. It generates a finding when a policy permits external access, regardless of whether the external entity has accessed the resource. A finding describes permitted sharing, not a recorded access event.
A data perimeter constrains which identities can access which resources from which networks. These are independent facts. An organization-owned role can send data to an externally owned bucket, and an external principal can reach an organization-owned bucket through private connectivity. Neither request becomes trusted merely because its route is private.
A data perimeter constrains which identities may access data, which resources they may access, and which request contexts are acceptable. An identity-based policy attaches permissions to a user, group, or role. A resource-based policy, such as an S3 bucket policy, controls access from the resource side and can name principals. Neither a private subnet nor organization membership grants permission by itself.
AWS Organizations and AWS Identity and Access Management (IAM) answer different authorization questions. Organizations permission policies define what access may remain possible across governed accounts. Identity-based and resource-based permission policies define who is actually allowed to perform an action on a resource.
Service control policies (SCPs) require an organization with all features enabled; consolidated billing only is insufficient. Attachments at the organization root, OU, or account establish central limits on available permissions. An SCP never grants permissions.
A resource control policy (RCP) sets a resource-side permissions boundary. Use it to restrict access to organizational resources, including requests from external IAM principals. RCPs require an organization with all features enabled; consolidated billing only is insufficient.
A VPC endpoint policy constrains access through the endpoint; it does not independently grant permission to use the service. For AWS STS, it controls which principals can use the endpoint and which STS actions they can perform. A request must pass both this boundary and the caller's applicable authorization policies.
A perimeter deny is effective only when its scope and conditions match: check the requested action, resource, principal where specified, and request context. An applicable explicit deny overrides allows, including a more specific allow or AdministratorAccess. Statement order does not change that result. An implicit deny instead means the required authorization is missing; adding an appropriate allow can help only if no applicable explicit deny or other permission limit blocks it.
Application-scoped access authorizes access to a particular application using identity and relevant context. It does not make a device trustworthy simply because it connected from an office, a private subnet, or a VPN. AWS Verified Access can enforce this boundary for workforce applications without granting users general network connectivity.
AWS Verified Access separates trust information from authorization rules. Configured trust providers supply attributes about the user or device; access policies determine whether those attributes satisfy the application's requirements. A favorable attribute is input to authorization, not permission by itself.
Public Key Infrastructure binds public keys to identities through signed certificates. An external workload proves possession of its corresponding private key; copying its certificate is insufficient. IAM Roles Anywhere uses this proof, a configured CA trust anchor, and IAM authorization to obtain temporary role credentials—not permanent access keys.
Federation exchanges externally established identity for a temporary AWS role session. With OIDC, an external workload obtains a signed token and calls AssumeRoleWithWebIdentity on AWS STS. The IAM OIDC provider identifies the trusted issuer; the role trust policy must also constrain the intended audience and permitted subjects, such as a particular repository and deployment environment.
Design solutions to implement encryption and key management strategies21 lessons
Envelope encryption separates bulk encryption from key protection. A plaintext data key encrypts the object; a customer-managed KMS key protects that data key. The KMS key material stays inside KMS. Object contents do not pass through KMS.
Envelope encryption encrypts plaintext data with a data key, then encrypts that data key under another key. The encrypted data key can safely be stored alongside the encrypted data. Decryption reverses the dependencies: recover the data key first, then decrypt the data.
Automatic rotation replaces the backing key material of an existing KMS key on a schedule. For customer managed keys, it supports symmetric encryption keys with AWS-generated material. Use DescribeKey to inspect the target key: expect KeyManager=CUSTOMER, KeySpec=SYMMETRIC_DEFAULT, KeyUsage=ENCRYPT_DECRYPT, and Origin=AWS_KMS.
Server-authenticated TLS protects traffic confidentiality and integrity while authenticating the server to the client. This assumes the client correctly validates the server certificate and expected server identity. The server does not thereby learn a client certificate identity: a client can establish an encrypted session without presenting any certificate.
A TLS certificate list is evidence, not a trust decision. The verifying peer starts with the leaf certificate and finds issuer certificates that can connect it to a locally accepted trust anchor. The anchor is configured through a trusted process outside this exchange, usually through an operating-system or application trust store. A root does not become trusted because it signs itself or arrives in the handshake.
A TLS termination point decrypts a connection's application traffic. If it forwards the request using TLS, it creates a separate connection with separate keys and a new server-authentication decision. Encryption on the incoming connection says nothing about the outgoing one.
AWS Certificate Manager (ACM) manages server certificates: requesting them, keeping certificate resources, and provisioning them to supported integrations. It supports publicly trusted certificates, private certificates issued through AWS Private CA, and imported certificates. Managing a certificate does not mean operating its issuing authority.
For an ACM certificate lifecycle, make two separate decisions: where the certificate comes from and where TLS terminates. An externally issued certificate can be imported into ACM and used with ACM-integrated AWS services. Importing it changes how it is deployed, not who is responsible for renewing it.
A private TLS hierarchy has two distinct directions: authorities issue certificates downward, while a client builds a certification path back toward a locally configured trust anchor. A root's self-signature does not make it trusted. AWS account membership, VPC connectivity, and permission to request a certificate do not make it trusted either.
A private certificate contains a signed NotBefore and NotAfter. A verifier checks its clock against this window as part of certificate validation; being inside the window is necessary, not sufficient, for acceptance. Renewal does not edit these fields. It creates a replacement certificate with its own validity window.
A strict verifier checks the certificate path to an approved trust anchor, validity periods, constraints, and permitted key usages, including extended key usage where applicable. The client also checks the intended server identity against the certificate's subject alternative name. The server maps a validated client identity to an explicit authorization policy; trusting its issuer alone is not permission to use the application.
AWS CloudHSM provides single-tenant HSMs: hardware dedicated to your use. Clusters in FIPS mode have HSMs validated at FIPS 140-2 Level 3 or FIPS 140-3 Level 3, depending on the HSM type. Dedicated tenancy and hardware validation are separate properties; a requirement for one does not automatically imply a requirement for the other.
An HSM custody boundary identifies where usable key material exists and who controls its lifecycle. Dedicated hardware does not mean customer-owned hardware, and a customer-managed key does not imply exportable material. Start with three questions: who operates the hardware, who administers the cryptographic environment, and who must arrange recovery?
Key custody concerns control of cryptographic material: where it exists, who protects its copies, and what boundaries constrain its use or extraction. Separation of duties concerns combinations of authority: whether independent actors control administration and cryptographic use. Custody includes responsibilities for authorizing use, but possession of material and permission to invoke it are not the same capability.
An existing PKI application can use AWS CloudHSM through compatible PKCS #11, JCE, CNG, or KSP interfaces. These interfaces allow migration with fewer application changes, not necessarily without changes. Here, the existing application stays on premises and uses CloudHSM client software; moving it to EC2 is not part of this configuration.
In AWS CloudHSM, AWS resource administration and HSM authentication are separate permission systems. IAM controls AWS API actions such as managing cluster resources; IAM permission alone does not authenticate an application to an HSM or authorize cryptographic operations. Inside the HSM, administrator and crypto-user identities have different responsibilities.
ML-DSA, standardized in FIPS 204, is a digital signature scheme. A private signing key produces a signature over a message; the corresponding public key verifies it. Verification establishes a cryptographic relationship between that key, that message, and that signature. With an authenticated public key, this supports authenticity and integrity: an attacker without signing authority cannot feasibly forge an accepted signature for altered content.
Post-quantum cryptography uses algorithms designed to resist attacks by both classical and quantum computers. A sufficiently capable quantum computer would threaten RSA and elliptic-curve public-key cryptography. Migration therefore has two distinct jobs: preserve the authenticity of signed information and protect the confidentiality of information exchanged over networks.
Start by inventorying signers, verifier libraries, trust stores, envelope formats, and retained signed objects. An ML-DSA migration changes a protocol contract, not just a key identifier. Agree on the parameter set, exact signed bytes, signature encoding, context, and signing mode. Test every verifier and transport with real signatures; larger signatures affect envelopes, storage, and verification throughput.
ML-KEM establishes shared secret material; it does not encrypt application records. In a full TLS 1.3 handshake using a hybrid group, a classical exchange and ML-KEM each contribute secret material. The group's specification defines how those contributions enter the TLS HKDF key schedule, which derives keys for symmetric authenticated encryption.
A post-quantum transition changes a dependency chain, not just a key. Inventory each producer and consumer of encrypted data, signatures, and transport sessions. Record algorithms, formats, library versions, key owners, retention needs, and which dependencies must change together. Prioritize long-lived confidential data exposed to capture now and decryption later.
Design multi-account governance and compliance solutions32 lessons
An AWS Organizations hierarchy has one root, with accounts and organizational units (OUs) beneath it. An OU can contain accounts and other OUs. Each member account has exactly one parent: the root or an OU. An account belongs to only one organization at a time. The organization root is a hierarchy container, not an account's root user.
An SCP release has two parts: policy documents and an attachment manifest identifying their intended root, OU, or account targets. Version both, with a stable mapping between repository policy names and Organizations policy IDs. Review attachment changes as carefully as document changes: unchanged JSON attached higher in the hierarchy can affect many more accounts.
AWS Organizations supplies the underlying multi-account structure: an organization, its management and member accounts, organizational units (OUs), and organizational policies. It supports account creation and invitations, OU placement, consolidated billing, and policy attachments. Policy-based governance requires the organization's all features mode.
An AWS Control Tower landing zone establishes a governed multi-account environment, including shared audit and log archive accounts and supporting governance resources. A baseline is a defined collection of resources and configurations that establishes a governance foundation for a target. Baselines and controls are related but different: deploying the foundation does not establish that every workload resource is compliant.
Account Factory standardizes account creation through configurable, pre-approved account configurations. Its AWS Service Catalog product accepts account-specific inputs, such as the account name, a unique account email address, and the target registered OU. Administrators control access to the product and configure shared defaults, including Account Factory networking settings.
AWS CloudTrail records AWS account activity: which principal performed an action, when, against which service, and with what recorded outcome. An event can include userIdentity, eventName, eventTime, sourceIPAddress, request parameters, and error information. Available fields vary by service and operation; this is not a complete request-and-response transcript.
AWS CloudTrail records actions: the event name, time, caller identity, request context, and available response or error details. It answers questions such as who called AuthorizeSecurityGroupIngress and whether the service returned an error. An API event is evidence of an action, not a complete snapshot of the resulting resource.
Start with the action an investigator must establish. Control-plane evidence records configuration changes; data-plane evidence records supported operations on data. In AWS CloudTrail, management events can record changes such as PutBucketPolicy or StopLogging. S3 data events can record object operations such as GetObject and PutObject. Recording a policy change does not establish which objects were subsequently accessed.
An organization trail logs events for the organization's management account and all member accounts. It is an organization-wide audit configuration, not a collection of trails that individual account owners independently administer.
Data events describe operations performed on or in a resource, also called data-plane operations. For Amazon S3, examples include reading an object with GetObject, writing one with PutObject, and deleting one with DeleteObject.
Cross-account, cross-Region centralization uses AWS Organizations trusted access. An administrator in the management or delegated administrator account creates a rule identifying source accounts, organizational units, and Regions, together with a destination account and Region.
CloudTrail log file integrity validation answers a specific audit question: was a log file modified, deleted, or left unchanged after CloudTrail delivered it? Its reference point is the delivered file, not whether every action that should have been audited was collected.
AWS Config provides resource configuration evidence and evaluates resources against rules. Its configuration recorder captures configuration items for supported resources within its recording scope, preserving settings and relationships over time. Recording and evaluation are separate capabilities: recording a resource does not, by itself, test a policy.
An AWS Config rule represents the desired configuration settings against which resources are evaluated. Managed rules are predefined and customizable, but their resource support matters: managed rules evaluating Amazon S3 resources support general purpose buckets, not directory buckets.
Organizational rules centrally create, update, and delete a common set of AWS Config rules across organization accounts, with specified accounts excluded. Deployment through the Organizations management account protects the underlying rules from modification by member accounts.
Rule-associated remediation connects an AWS Config rule to a corrective action. Choose an action from the prepopulated list, or create a custom action using an SSM document. The rule describes the compliance condition; the associated action supplies the correction.
Each enabled Security Hub CSPM control runs security checks. A check produces a finding that says whether a specific AWS resource complies with the control’s rules. Some checks run on a periodic schedule; others run only when resource state changes. Enabling a control therefore does not mean every check runs on every resource change.
Amazon GuardDuty analyzes activity for evidence of threats. It combines threat intelligence, anomaly detection, and other detection techniques to identify behavior such as suspicious API use or communication with malicious infrastructure. A finding describes observed activity that warrants investigation; it is not merely a failed configuration check.
Amazon GuardDuty detects threats within an account and Region. The organization management account designates a delegated administrator to manage member protection and see member findings. Configure delegation and member associations in every Region you intend to protect; use the same delegated administrator account across Regions.
Amazon Security Lake collects and organizes security records for analysis. Its normalized telemetry can include routine activity as well as security findings. It stores the records in your Amazon S3 environment; it is not itself a detection engine or an investigation console.
OCSF, the Open Cybersecurity Schema Framework, describes event classes, attributes, types, and enumerations. Normalization starts by deciding what a record asserts: an API operation, an authentication attempt, a network connection, or a security finding. Choose the class from that meaning, not from the delivery service. A finding about an API call is not the original API event.
The organization management account designates a Security Lake delegated administrator through the AWS Organizations integration. A dedicated security tooling account can then manage Security Lake for member accounts without making the management account the operational security lake account. Delegation grants administrative authority; it does not, by itself, establish complete telemetry coverage.
A retention policy needs a searchable window and a total retention window. The searchable window promises access within an investigation's response time. Total retention specifies how long evidence remains available, including any period when retrieval requires a restore. Archived does not necessarily mean offline: some archives remain directly queryable.
A protected archive needs three independent properties: verifiable integrity, enforced retention, and independent control. This design preserves original CloudTrail files in a separate archive account and gives reviewers read access without archive-administration powers. The diagram shows file delivery and requests; response arrows are omitted.
Collection completeness means receiving the records you deliberately require, not merely seeing activity in a central bucket. Maintain an expected coverage inventory by account, Region, workload, source, event category, selector, and destination. Include newly enrolled accounts, newly enabled Regions, and regulated AI workloads.
Service control policies (SCPs) constrain principals in member accounts. Resource control policies (RCPs) constrain access to resources in member accounts for supported services. Neither grants permission: passing both boundaries still requires authorization through the applicable IAM and resource policies.
Effective permissions answer a concrete question: may this principal perform this action on this resource with these condition values? An identity-based or resource-based policy can supply a grant. An AWS Organizations policy supplies a ceiling: passing it leaves access possible, not authorized.
Configuration drift is a difference from an approved expected state. Define that state by resource identity, compared properties, and baseline version. Compare semantic values: sort unordered rule sets, normalize equivalent representations, and exclude only explicitly designated runtime fields. Otherwise, formatting changes create false differences while overly broad exclusions hide real ones.
The AWS Config managed rule required-tags checks whether supported resources have the tags you specify. For cost allocation, you might require a CostCenter key. If you configure only the required key, the rule checks its presence; it does not establish that the value belongs to your approved cost-center list.
Amazon Inspector establishes EC2 package vulnerability coverage from software inventory. Agent-based scanning collects that inventory through SSM Agent; agentless scanning collects it using Amazon EBS snapshots. These are different collection mechanisms for package assessment, not interchangeable names for the same scan.
Amazon Inspector organization governance separates the authority to appoint an administrator from the authority to operate scanning. Only the AWS Organizations management account can designate or remove an Inspector delegated administrator. That administrator must belong to the same organization as the member accounts it manages.
A patch baseline defines which patches Patch Manager approves for an operating system. Approval rules can select patches by properties such as classification and severity and can include an approval delay. Explicit approvals and rejections refine that selection. Approval makes a patch eligible; it does not schedule installation.
Design architectures to meet compliance requirements16 lessons
A delegated request crosses an authorization boundary when a service or agent acts using a different identity. Authenticating the original caller does not authorize every downstream operation. Evaluate which identity requests each action, which resource it targets, and which policies permit or deny it.
Server-side encryption protects stored data, but it does not mean that an authorized reader receives ciphertext. The service can decrypt data for an authorized request. Encryption therefore does not replace access controls: the important boundary is who can recover plaintext.
A central log bucket needs two controls: an ownership rule for the delivered objects and authorization for the delivery requests. Bucket owner enforced, the default Object Ownership setting, supplies the first: the bucket owner owns every object, ACLs are disabled, and access is managed exclusively through policies. It does not, by itself, authorize another account to upload logs.
S3 Object Lock uses a write-once-read-many (WORM) model to prevent deletion or overwrite of protected object versions. Before locking objects, enable both S3 Versioning and Object Lock on a general purpose bucket. You can enable Object Lock on an existing bucket, but afterward you cannot disable it or suspend versioning.
The shared responsibility model allocates operational duties; it does not transfer the customer's regulatory accountability to AWS. AWS protects the infrastructure that runs its services. Customers remain responsible for their data, authorized use, identities, and the settings and software they control.
Data residency describes where data is stored or processed. Data sovereignty concerns the legal authority governing its handling, which can also depend on the organizations involved and where people access it. A Region choice answers a location question, not every jurisdictional question; legal and compliance teams must establish the applicable obligations.
Evidence integrity is the ability to demonstrate whether an artifact changed relative to a trustworthy baseline. Preserve original bytes, their provenance, and the history of handling—not just searchable events. Establish central collection before an incident, outside the workload administrators’ normal control.
A residency rule needs a data class, an approved geography, and the activities it covers: storage, processing, transfer, and possibly remote access. Translate legal and contractual requirements with the responsible teams; a Region name alone does not settle jurisdiction or permitted international access.
A Regional boundary applies to where data may be stored or processed, not just how an application reaches a service. In this design, both Regions are approved. The application writes privately to a source bucket, and S3 creates an authorized copy in the second Region.
AWS Audit Manager has been in maintenance since 2026-03-31: it is closed to new customers, while existing customers can keep using it. This lesson explains the service as AWS offered it, not as a recommendation for new workloads. AWS's migration guide is https://docs.aws.amazon.com/audit-manager/latest/userguide/audit-manager-availability-change.html.
AWS Artifact provides on-demand AWS security and compliance documents, including ISO, PCI, and SOC reports. It also provides certifications from accreditation bodies that validate the implementation and operating effectiveness of AWS security controls.
AWS Audit Manager has been in maintenance since 2026-03-31. It is closed to new customers; existing customers can continue using it. This lesson covers existing-customer operation, not new adoption. AWS's migration guide is https://docs.aws.amazon.com/audit-manager/latest/userguide/audit-manager-availability-change.html.
AWS Audit Manager has been in maintenance since March 31, 2026. It is closed to new customers; existing customers can continue using it. This lesson describes that existing-customer workflow. AWS provides a migration guide at https://docs.aws.amazon.com/audit-manager/latest/userguide/audit-manager-availability-change.html.
A risk matrix maps likelihood and impact categories to decisions. Start with a specific event: “A stolen production credential enables bulk disclosure of customer records during the next year.” Record the system boundary, affected people, exposure and assessment period. Likelihood means the probability of that event within that period; impact means its consequences if it occurs. Counting attempted sign-ins would measure a different event.
A useful threat model connects a business loss to a feasible path through the architecture. For this invoice service, protect invoice confidentiality, invoice integrity, and legitimate customers' access. Include identities, permissions, and authorization evidence as assets—not just stored records.
The AWS Well-Architected Tool records a workload review against lens questions and best practices; it does not automatically prove that an architecture resists its threats. Before reviewing the Security pillar, define the workload boundary, environment, accounts, Regions, critical data, and dependencies. Record the architecture version and review date so evidence describes the system actually being assessed.
Design security and responsible AI controls4 lessons
Amazon Bedrock Guardrails uses sensitive information filters to detect configured categories of personally identifiable information (PII) and matches to custom regular expressions. With ANONYMIZE, it replaces detected values with placeholders while preserving surrounding text. For example, a detected email address can become {EMAIL}, leaving the rest of a support request usable.
Prompt injection attempts to make a model treat attacker-controlled material as instructions. Direct injection arrives in a user message; indirect injection arrives in retrieved documents, web pages, repository files, or tool responses. The distinction is the delivery path, not the wording or the attacker's goal. A document stored in an application-owned bucket can still contain untrusted instructions.
A human approval gate must control whether an AI-proposed action can happen, not merely ask someone to acknowledge it. Evaluate a versioned risk policy before execution: consider impact, reversibility, data sensitivity, uncertainty, and whether the action is permitted at all. Missing evidence should enter review or stop processing, not silently qualify for automatic execution.
A custom human loop collects human judgments; it does not suspend an application or authorize an AI operation. Your application explicitly starts review and withholds the protected operation until its own approval gate accepts the completed result.
Optimize storage and database costs15 lessons
A storage transition is acceptable only if the destination can meet the workload’s maximum acceptable wait. Define what ends that wait: an object becoming readable, the first byte arriving, the full object arriving, or an application becoming usable. These are different measurement boundaries.
A lifecycle transition changes an object's storage class inside Amazon S3. Start with the access deadline, not the storage rate. S3 Glacier Instant Retrieval supports millisecond access through a normal GET. S3 Glacier Flexible Retrieval and S3 Glacier Deep Archive require an asynchronous restore before the object's data can be read.
IOPS measures completed read and write operations per second. Storage throughput measures completed data transfer per second, usually in bytes per second. Neither number determines the other without knowing how much data each counted operation transfers.
Size from storage operations, not transactions or application requests. Caches can remove reads, database writes can generate several operations, the operating system can merge requests, and EBS can split large requests according to its accounting rules. Record request sizes, read/write mix, access pattern, and concurrency alongside the measured rate.
Start with a sustained completion target: how many bytes must reach or leave EBS during the required interval. Measure representative reads and writes, including concurrent background work. A daily average can hide a busy batch window that needs much more capacity.
Right-sizing EBS means sizing stored capacity, IOPS, and throughput separately, then checking whether they meet the application's latency target. Measure representative business peaks, batch jobs, and recovery activity—not just daily averages. Record read/write mix, I/O sizes, sequential versus random access, queue depth, and application latency percentiles.
Aurora cost optimization has three separate decisions: compute capacity, cluster I/O pricing, and purchase commitment. Provisioned compute does not imply Aurora Standard, and Serverless v2 does not imply I/O-Optimized. Evaluate supported combinations rather than treating them as bundled choices.
Aurora Serverless v2 adjusts each DB instance's compute capacity within a configured range, measured in Aurora Capacity Units (ACUs). The range is configured at the cluster level and applies to every serverless writer and reader; it is not a shared capacity pool. Compute usage accumulates as ACU-time across instances, so include readers when estimating cost.
Backup retention controls how long recovery data is kept. It provides historical reach: which older states remain available after production data changes. Here, retention means retained recovery history, not simply keeping records in the live application.
A cost-optimized backup policy separates creation cadence, retention, and storage tier. For example, retain daily recovery points briefly and monthly recovery points for longer obligations. This preserves selected historical dates without paying to retain every daily point for years. The retention clock belongs to each recovery point; a monthly schedule does not mean retention starts at month-end.
Successive EBS snapshots are incremental: they contain only volume data changed since the previous snapshot. This saves storage compared with repeatedly storing every captured block as a separate full copy.
A recovery point remains restorable until the end of its configured lifecycle. Snapshot retention can be set from 1 day to 100 years, or indefinitely if no retention period is entered. Continuous-backup retention ranges from 1 to 35 days. Calculate retention from the date the backup job started, not the date it completed—even when the job crosses midnight.
Metric cardinality counts distinct series within a defined scope and observation window. Within one CloudWatch account and Region, a series is identified by its namespace, metric name, and complete set of dimension name-value pairs. A timestamp or measurement value is not part of that identity.
A CloudWatch metric is identified by its namespace, metric name, and complete set of dimension name-value pairs. That set can be empty. Keeping the metric name unchanged does not preserve identity when a dimension value changes or a dimension is added.
Temporal aggregation replaces observations within a time window with a summary. There are two distinct places to do this: the publisher can summarize observations before sending them, and CloudWatch aggregates the values it receives for each period. Only the first reduces the individual measurements being published; choosing a coarser viewing period does not undo publication work already performed.
Design architectures based on AWS pricing models2 free23 lessons
Workload predictability is confidence in future compute requirements, not simply steady traffic. For purchasing commitments, the useful baseline is eligible usage likely to remain after efficiency changes, within the commitment’s matching scope and over its term. Historical spending is evidence, not automatically a purchase target.
Capacity planning starts with service-level objectives and a time-based demand forecast. Translate business activity into technical demand, such as requests per second, database operations, or tokens per second. Preserve daily troughs, seasonal peaks, growth, and uncertainty: a monthly average hides both idle periods and overload.
Pay-as-you-go makes cost depend on billable usage, but usage is not necessarily useful application work. For an ordinary running EC2 instance, compute runtime is billable even while its CPU is idle. A machine needed for a brief task can therefore generate a full day of runtime charges if it remains running.
Uncommitted On-Demand billing charges for metered resource use without a long-term purchase obligation. A commitment discount exchanges some purchasing flexibility for discounted eligible usage: the customer accepts a financial obligation over a defined term.
A predictable workload is not automatically a predictable discount opportunity. A commitment is economical only when future usage continues to satisfy its eligibility rules. Model the workload after planned rightsizing, migrations, and architecture changes—not just as it runs today.
Evaluate an EC2 purchasing option along separate dimensions: billing, commitment, interruption tolerance, and capacity assurance. A statement about cost does not, by itself, establish that capacity is reserved.
Savings Plans exchange a consistent spending commitment, measured in USD per hour, for discounted rates over a one-year or three-year term. They suit usage whose spending can be committed even when a specific instance configuration cannot. The commitment terms cannot be changed after purchase; additional plans can be purchased as usage grows.
Savings Plans and EC2 Reserved Instances (RIs) are billing commitments, not running resources. Neither purchase launches an instance or attaches a discount permanently to an instance ID. AWS automatically applies the benefit to matching usage during the commitment term.
Economical capacity is the smallest configuration that meets latency and throughput targets across representative demand, with headroom for growth and operational events. Measure busy periods, batch jobs, maintenance, and seasonal peaks. Average CPU alone hides short saturation periods and says little about memory pressure, storage latency, or connection demand.
Cost per successful workload unit is total end-to-end cost divided by the number of unique, successful business outcomes in the same measurement window. Lower is better. Define the unit precisely: an order committed correctly, a document converted to the required format, or a batch completed with validated output. An invocation, state transition, or retry is activity, not necessarily useful work.
Arm64 and x86-64 are different instruction sets. Moving to Graviton requires a compatible operating-system image and executable stack, not just a different instance selection. Check application binaries, native libraries, language runtimes, monitoring and security agents, and vendor support. Portable source code does not guarantee that every dependency has a supported Arm64 build.
Price-performance means useful work delivered for the money while meeting requirements—not the lowest instance-hour price. First define throughput, tail latency, memory headroom and batch deadlines. Measure the current bottleneck under representative peak load: high aggregate CPU utilization alone cannot distinguish useful computation from contention, and low aggregate utilization can hide a saturated single thread.
For on-demand Lambda Event Functions, separate request charges from compute charges. Before discounts and other charges, model the total as billable request units × request rate + sum(memory in GiB × billed seconds) × compute rate. The applicable compute rate depends on the Region, processor architecture, and pricing tier.
A demand profile describes how resource demand changes with traffic, concurrency, request mix, and background work. Collect measurements across a representative business cycle, including batch runs and known peaks. Keep instance-level and workload-level views: fleet averages can hide an overloaded node or partition. Align resource measurements with request rate, latency percentiles, errors, and queue depth on the same timeline.
A rightsizing recommendation proposes a configuration from observed demand; it does not prove that configuration will meet future service levels. With AWS Compute Optimizer, examine the observation period, available metrics, projected utilization, and performance risk. Confirm that the evidence includes business peaks, periodic jobs, and the current application version. A long quiet period is not representative merely because it contains many samples.
EC2 recommendations refresh daily, but they require enough utilization history. EC2 instances and EC2 Auto Scaling groups need at least 30 hours of CloudWatch metric data in the past 14 days. With enhanced infrastructure metrics enabled, they need at least 30 hours over the past 93 days. Available lookback periods are 14 days, the default, 32 days, and 93 days. The 14-day and 32-day options require no additional payment; 32 days can capture monthly workload patterns.
A useful target-tracking metric measures load per unit of capacity: at unchanged demand, doubling effective capacity should approximately halve the metric. Average CPU utilization works for evenly distributed, CPU-bound work; requests per target works when requests have comparable processing cost. Total request rate alone does not fall when instances are added. Tail latency, errors, and queue age are valuable guardrails, but they are not generally proportional enough to capacity to be good target-tracking metrics.
Elasticity matches capacity to demand as demand changes, including releasing capacity afterward. Rightsizing selects resource configurations and baseline capacity that fit the work. The distinction is the decision being made, not simply whether instance count or instance size changes: correcting an unnecessarily high fixed baseline is rightsizing; varying that baseline's additional capacity with traffic is elasticity.
Amazon EC2 Auto Scaling operates EC2 fleets organized into Auto Scaling groups. It maintains desired capacity, launches and terminates instances, and replaces unhealthy instances. The group defines capacity boundaries and how instances are launched, typically through a launch template.
Scheduled scaling changes an Auto Scaling group's capacity settings at specified times to accommodate predictable load changes. An action can run once or recur. Its capacity settings can include minimum capacity, maximum capacity, and desired capacity.
Predictive scaling uses historical load to forecast future capacity needs rather than waiting for demand to arrive. Amazon EC2 Auto Scaling consumes up to the last 14 days of load metric data and creates an hourly load forecast. A new Auto Scaling group needs at least 24 hours of data before a forecast can be generated.
AWS Compute Optimizer analyzes resource configuration and historical utilization to recommend better-fitting resources. For EC2 workloads, it can recommend instance types that better balance performance and cost, including recommendations for supported Auto Scaling groups. Its output is rightsizing advice, not a command to change fleet capacity.
Batch size is the number of compatible items processed together in one model execution. Combining items can amortize scheduling, transfers, and model-execution overhead. For one saturated worker, a batch of B items taking T seconds gives approximately B/T items per second. With compute cost c per second, its execution cost per item is approximately c × T/B.
Optimize data transfer and network costs9 lessons
An edge-cache TTL is a freshness lifetime: how long a stored response can be reused without checking its origin. It is not a deletion timer or a guarantee that bytes remain resident. A normal cache hit does not restart that lifetime; response age continues to increase.
A CloudFront origin group identifies a primary origin and a secondary origin. A cache behavior can target that group. When CloudFront needs an origin response, it tries the primary first; eligible requests can fall back to the secondary after a qualifying failure.
A cache behavior selects an origin or an origin group. This architecture routes /app/* to a private application and uses the default behavior for an S3 origin group. The arrows describe origin routing when CloudFront needs an origin response, not a requirement to contact an origin for every viewer request.
Private-subnet egress has more than one cost dimension. A NAT gateway is charged for availability hours and data processed; the number of gateways therefore matters alongside usage duration and traffic volume. Reducing processed bytes does not remove the charge for keeping a gateway available.
For zonal public NAT gateways, separate the bill into gateway hours, NAT data processing, public IPv4 addresses, and applicable data transfer. A shared gateway reduces the number of running gateways; it does not reduce the processing rate for each byte that still traverses NAT.
An interface VPC endpoint uses AWS PrivateLink and has two cost dimensions: an hourly fee and a per-GB usage cost. Model its endpoint cost as C_endpoint = H × h + P(G), where H is billed endpoint-hours, h is the applicable hourly rate, and P(G) is the processing charge for G GB. An idle deployment can still incur hourly charges; lower traffic reduces the usage component, not the hourly component.
Data locality is a property of a traffic pattern, not just a map. Record each important flow's source, destination, Region, Availability Zone, direction, bytes, frequency, and intermediaries. Include responses, retries, replication, and failover traffic: a small request can trigger a large response.
Both source and destination buckets must have versioning enabled. Live replication automatically replicates new and updated objects as they are written to the source bucket. It does not replicate objects that existed before replication was configured; use S3 Batch Replication to replicate existing objects on demand to one or more destinations.
Separate attachment-hour charges from data-processing charges. For VPC and VPN connectivity, the hourly inventory is the chargeable attachments maintained on the transit gateway—not simply the number of transit gateways. An idle attachment still contributes hourly cost; reducing its traffic does not remove that cost.
Design cost allocation and visibility solutions19 lessons
Resource tagging attaches key-value metadata to a resource. Application=Payments describes the resource; it does not specify which billed charges belong to Payments or how much Payments owes. Several tags can describe different dimensions of the same resource without creating separate costs.
A governed tagging standard is a data contract, not just a list of useful labels. Define each key’s exact spelling, meaning, allowed values, applicable resource types, and accountable owner. For this lesson, use CostCenter with finance-approved identifiers such as CC104, Application with registered application identifiers, and Environment with prod, test, or dev. Case differences can fragment attribution, so reject aliases such as costcenter.
Tag policies define a tagging standard, including the capitalization of a tag key and permitted tag values. Enable the tag policy type in an organization with all features, then attach policies to the root, OUs, or accounts. The account's effective tag policy combines the applicable policies along its hierarchy; reading only its directly attached policy misses inherited rules.
Tag Editor finds supported resources and changes their tags in bulk. Resource Groups organizes resources using criteria such as tags; creating a tag-based group does not add those tags to its members. For standardization, use Tag Editor against an explicitly defined inventory.
Consistent attribution starts with a tagging standard: keys such as CostCenter, Project, and Environment identify the business dimensions used to group costs. A tag policy attached to the AWS Organizations root is inherited by every account, providing a common standard across the organization.
AWS Cost Explorer provides managed querying and visualization of AWS cost and usage data. Its console and API let you request supported metrics, filters, and groupings without operating a billing-data pipeline. API access makes this analysis programmable; it does not turn Cost Explorer into a general-purpose SQL engine over billing records.
A Cost Explorer report has two separate controls: filters select the charges included, while grouping divides those charges into buckets. Filtering to linked accounts A and B produces their combined scope; grouping by linked account separates their contributions. Service, linked account, and Region describe AWS activity. Cost allocation tags and Cost Categories add business ownership: tags supply resource metadata, while Cost Category rules classify costs into business-defined groups.
For the standard AWS Cost and Usage Report (CUR), time granularity can be hourly, daily, or monthly. This controls how usage is aggregated in report rows; it does not schedule delivery. An hourly report is not an hourly feed. AWS delivers reports asynchronously to your S3 bucket and refreshes them at least daily.
Showback reports attributed costs; chargeback uses those allocations to charge internal owners. Neither changes the AWS invoice by itself. In AWS Cost and Usage Report (CUR), bill/PayerAccountId identifies the payer, while lineItem/UsageAccountId identifies the account associated with the usage or charge. The payer is not necessarily the consuming team.
An Athena-backed billing dashboard separates report delivery, SQL preparation, and presentation. The diagram shows a SPICE-based implementation; arrows represent delivered data or metadata, not API request direction. AWS Cost and Usage Report supplies detailed billing objects, unlike Cost Explorer, which provides cost exploration, or AWS Budgets, which tracks budgets and sends alerts.
A tagging rule must define more than a key name. For this lesson, the contract is: applicable resources must have the exact key CostCenter, with value CC100 or CC200. Treat presence, key capitalization, and allowed values as separate assertions. Store the contract, enforcement policies, and test fixtures together in version control.
Showback tells consumers what their consumption costs. Chargeback makes an internal consumer financially responsible by posting a charge to its departmental accounts or budget. A budget comparison, emailed statement, or approved dashboard is still showback if it creates no internal financial charge.
Cost categories map billing line items to business dimensions such as team, product, or cost center. Rules can use dimensions such as linked account, service, and activated cost allocation tags. Rules are evaluated in order: the first matching rule determines the value within that category. Put specific exceptions before broader rules, and use a default value to make unmatched costs visible.
A reconciled showback statement is a redistribution of a defined billing total, not an independent estimate. Fix the reconciliation contract: payer scope, reporting period, currency, billing-data version, and cost basis. An amortized workload view does not necessarily equal an invoice-period total; explain the difference with an explicit bridge rather than forcing equality between unlike measures.
The key distinction is allocation versus repricing. Allocation asks which internal owner should receive a share of AWS-billed costs. AWS Billing and Cost Management provides billing data and allocation dimensions, including accounts, activated cost allocation tags, and Cost Categories. These classify costs; they do not establish new usage rates.
AWS Billing Conductor calculates a separate pro forma view of costs for internal reporting. Showback communicates those costs; chargeback uses them as the basis for internal charges. Neither changes the AWS invoice or collects payment from departments.
AWS Budgets evaluates spending against an explicit financial boundary. AWS Cost Anomaly Detection identifies spending that differs from learned expectations. These are independent questions: “Are we approaching our allowance?” and “Is this spending unusual?”
A cost budget measures a configured population of charges, not every expense associated with a team. In an Organizations management account, a linked-account filter selects member-account costs. Different filter dimensions combine as AND; multiple selected values within a dimension act as OR. Selecting accounts A and B plus Project=Atlas therefore measures Atlas-tagged charges in either account, not all charges in those accounts plus Atlas charges elsewhere.
AWS Cost Anomaly Detection looks for unusual spending relative to learned behavior, not merely spending above a fixed amount. A cost monitor defines the spending being analyzed. AWS service monitors evaluate services individually; custom monitors can focus on linked accounts, cost allocation tags, or cost categories.
Design migration strategies by using AWS frameworks1 free32 lessons
AWS Application Discovery Service has been in maintenance since October 7, 2025: it is closed to new customers, while existing customers can continue using it. This lesson explains the service as offered to those customers. AWS documentation identifies AWS Transform as an alternative with similar capabilities. AWS’s migration guide is https://docs.aws.amazon.com/application-discovery/latest/userguide/application-discovery-service-availability-change.html.
AWS Application Discovery Service has been in maintenance since 2025-10-07: it is closed to new customers, while existing customers can continue using it. AWS migration guide: https://docs.aws.amazon.com/application-discovery/latest/userguide/application-discovery-service-availability-change.html.
AWS Migration Evaluator is a migration assessment service that helps create a directional business case for AWS cloud planning and migration. Directional means the evidence supports planning a possible investment; it should not be treated as a final deployment specification or a guaranteed financial outcome.
AWS Application Discovery Service has been in maintenance since October 7, 2025: it is closed to new customers, while existing customers can continue using it. This lesson describes its offered capabilities, not a recommendation for new deployments. AWS's migration guide is https://docs.aws.amazon.com/application-discovery/latest/userguide/application-discovery-service-availability-change.html.
AWS Migration Hub has been in maintenance since November 7, 2025. It is closed to new customers; existing customers can continue using it. This lesson describes that existing-customer workflow, not a recommendation for new workloads. AWS’s migration guide: https://docs.aws.amazon.com/migrationhub/latest/ug/migrationhub-availability-change.html.
A dependency graph represents components and the relationships that could constrain their transition. Define an arrow consistently: A → B means A depends on B, not that B must migrate first. Record the relationship’s purpose, endpoint, protocol, owner, and evidence source. A connection alone does not establish business importance or an acceptable migration boundary.
The 7 Rs are alternative workload strategies, not seven sequential phases. Assign them at the smallest boundary that can be evaluated meaningfully: an application, database, or independently managed component. Rehost moves a workload to cloud infrastructure with minimal application changes. Relocate moves its existing infrastructure platform to a compatible cloud environment, preserving the applications’ execution environment. Relocation depends on platform compatibility, licensing, and available destinations; it is not simply another name for moving individual servers.
A migration wave is a bounded set of changes with named owners, a cutover window, and explicit progression gates. Start with application-level portfolio records, not just a server list. Record business criticality, migration approach, data ownership, recovery objectives, allowed disruption, operational ownership, and dependencies. These attributes determine which changes can safely share a wave.
AWS Transform coordinates transformation work through specialized agents and a shared workspace. Teams use job plans, conversations, artifacts, approvals, and execution history to collaborate on migration decisions. For infrastructure migration, that includes discovery, dependency analysis, application grouping, and migration wave planning.
AWS Application Migration Service (MGN) keeps source-server data synchronized through a replication pipeline. Distinguish the source sending blocks, the temporary servers receiving them, and the target storage retaining the replicated data.
A migration wave is a group of servers migrated together. In the AWS Transform workflow, wave setup automatically configures the target account, validates permissions, and sets up resource tagging. The next step, inventory validation, reviews server configurations, instance type recommendations, and network assignments before migration begins.
AWS Transform server rehosting moves supported servers to Amazon EC2, using AWS Transform MGN internally for data replication. Sources can be on-premises data centers, other cloud providers, or other AWS Regions. Physical and virtual servers are supported, including virtual machines running on VMware, Hyper-V, KVM, and other virtualization platforms.
A reversible rehosting cutover needs an explicit rollback target: the source machines, application configuration, dependencies, and data state that can serve production again. Keeping a source VM does not prove recoverability. Preserve its storage, network paths, certificates, credentials, licenses, capacity, and operational access. Rehearse startup and representative transactions, including background processing, without allowing duplicate production effects.
Homogeneous migration retains the database engine; heterogeneous migration changes it. Self-managed PostgreSQL to Amazon RDS for PostgreSQL is homogeneous. Oracle Database to PostgreSQL is heterogeneous, even when both run on the same hosting platform. Crossing a cloud, account, or Region boundary does not determine the category.
A homogeneous migration retains the database engine, not necessarily its version, configuration, or administrative capabilities. PostgreSQL on a self-managed server and Amazon RDS for PostgreSQL can differ in supported extensions, privileges, and filesystem access. Establish compatibility before choosing how to transfer the data.
A heterogeneous migration has two separate feasibility questions: can the target preserve the application's meaning and behavior, and can the data reach it within the allowed interruption? Inventory database objects and their callers, including stored procedures, triggers, jobs, dynamic SQL, drivers, and transaction assumptions. A small database with deeply embedded engine-specific logic can require more work than a much larger database with portable SQL.
A database migration has two distinct responsibilities: making the database structure compatible with the target, and moving the data into that structure. AWS DMS data replication addresses data movement. It can replicate source data to a target while applications continue using the source.
AWS Schema Conversion Tool (AWS SCT) assesses a source schema for conversion to a selected target database engine. Its assessment report identifies conversion issues and provides guidance for work that cannot be completed automatically. Treat this as a compatibility and remediation assessment, not a promise that every source feature has a target equivalent.
A premigration assessment evaluates specified components of a migration task to identify problems that might prevent it from running as expected. Its purpose is to expose potential task problems, not to define the data to migrate.
Moving a self-managed database to Amazon RDS transfers specific operational tasks to the service: backups, software patching, automatic failure detection, and recovery. These managed tasks are the operational benefit of the move; they do not mean that every database responsibility transfers to AWS.
Aurora MySQL and Aurora PostgreSQL are separate engine families. Match the source family first, then check the exact source and target versions supported by the chosen migration mechanism. MySQL compatibility does not make an arbitrary MySQL backup restorable, and PostgreSQL compatibility does not guarantee that every extension is available.
Runtime portability means replacing implicit host dependencies with an explicit execution contract. Inventory shared libraries, native extensions, certificate bundles, locales, writable paths, background daemons, device access, and startup scripts. Package application-level dependencies in a maintained image; do not assume packages installed on a developer machine exist in managed compute. A multistage build can supply compilers during the build without keeping them in the runtime image.
Microservices concerns where responsibilities, data ownership, and release boundaries sit. Serverless concerns how execution infrastructure is operated. Separating business capabilities does not require serverless compute, and moving code to serverless compute does not establish independent service boundaries.
Incremental service extraction moves one business capability behind an interface while the rest of the monolith continues to operate. Choose a boundary such as order acceptance, not a shared database-access layer. The useful outcome is an independently deployable capability: changing its implementation does not require a coordinated release of every caller.
Serverless transfers host provisioning and replacement to the provider; it does not preserve your process. With AWS Lambda, initialization prepares an execution environment before a handler runs. Later invocations may reuse that environment, but reuse is not guaranteed. Initialization latency therefore belongs in the latency budget, not just the handler's execution time.
The Strangler Fig Pattern transfers business responsibilities, not just traffic. Choose a coherent capability with explicit operations, data ownership and dependencies. A capability that shares transactions throughout the legacy application may need its boundary redesigned before it can move independently.
Regression testing asks whether modernization damaged behavior that must remain stable. The reference is an approved behavioral baseline, not simply whatever the legacy system produced most recently. A baseline pairs representative inputs and starting state with accepted observations: responses, error outcomes, database changes, emitted messages, and batch artifacts. Internal implementation can change while this externally observable contract stays intact.
A stable method signature is not a stable behavioral contract. Characterization tests record what the legacy implementation does for selected inputs and starting states, including surprising behavior. Capture returned values, externally visible errors, persisted state, and observable side effects. These tests provide evidence of compatibility, not proof that the existing behavior is desirable or that every path is covered.
AWS Transform modernizes supported .NET Framework solutions toward cross-platform .NET. Start by checking the repository against the current supported solution and project types. A repository containing .NET code is not automatically an eligible transformation input. Establish a reproducible source build and record existing test results so later failures have a baseline.
A viable migration needs both a compatible execution model and an accessible target runtime. Replatforming with Rocket Software technology retains much of the existing source and supplies compatible mainframe facilities. Refactoring transforms application code into modern languages and frameworks, including Java-based applications. Neither approach guarantees that every source dependency or business behavior is preserved automatically.
AWS Transform analyzes supported mainframe source material to help teams understand existing applications and produce modernization artifacts. Source-derived descriptions, dependency findings, and discovered business functions turn implementation details into material that engineers and business reviewers can inspect. These artifacts are engineering inputs, not proof that a proposed replacement preserves every required behavior.
AWS Mainframe Modernization supports migrating and operating mainframe workloads on AWS. Its scope includes development, testing, data movement, and runtime capabilities—not just code conversion. AWS Transform provides mainframe analysis and automated refactoring capabilities that help engineers understand and change applications.
Design disaster recovery architectures27 lessons
Recovery Point Objective (RPO) limits acceptable recent data loss, expressed as time. Recovery Time Objective (RTO) limits acceptable service downtime. A five-minute RPO and a fifteen-minute RTO require both sufficiently recent recovered data and sufficiently fast service recovery; neither limit substitutes for the other.
Recovery Point Objective (RPO) is the maximum acceptable loss of recent data, expressed as time. To verify it, define the failure scenario and identify the newest usable recovery point that survives that scenario. A backup existing somewhere is not enough.
An RTO is a target for restoring an agreed business capability after disruption, not a timer for one infrastructure operation. Define the failure scope, affected user journeys, required throughput, and acceptable error rate. Recovery of an order service might mean authenticated users can submit orders and retrieve their committed results at the agreed load.
The continuously replicated core should preserve authoritative state whose loss would breach the recovery point objective, or RPO, or whose reconstruction would exceed the recovery time objective, or RTO. Classify database records, uploaded objects, queued work, and derived data separately. A cache or index can stay outside the core only when its rebuild time and degraded performance fit the recovery budget.
Warm standby keeps a functional workload running at reduced capacity in a separate recovery location. Recovery changes its data role and capacity rather than deploying the application from scratch. This diagram overlays normal replication with the request path used after recovery; replication into the replica precedes promotion, while production SQL writes follow it.
Pilot light keeps an operational core in the recovery location, commonly replicated data or a replication staging environment. That core preserves the foundation for recovery, but it is not a working copy of the whole application. Application tiers must still be started or deployed before the recovery environment can provide the intended service.
AWS Elastic Disaster Recovery replicates supported on-premises or cloud-based source servers into a staging area subnet in your AWS account and selected AWS Region. The diagram follows block data and snapshot lineage, not management calls or recovery-instance launch operations.
Recovery launch settings govern how AWS Elastic Disaster Recovery launches a source server as an EC2 instance for a drill or recovery. The associated EC2 launch template specifies instance configuration, including the instance type, subnet, and security groups. These choices define the AWS environment into which the converted server boots.
Continuous replication establishes an initial copy, captures subsequent changes, and maintains recovery state in another Region. AWS Elastic Disaster Recovery, or DRS, uses asynchronous block-level replication: source writes do not wait for the recovery Region. During initial synchronization, it must also account for changes made while the baseline is being copied.
AWS Resilience Hub assesses whether a modeled workload is expected to meet resilience objectives. It evaluates supported resource configurations against a resilience policy, including recovery time objectives (RTO) and recovery point objectives (RPO). Its assessment results and recommendations describe expected recovery capability, not recovery observed during an outage.
In AWS Resilience Hub, a resiliency policy defines recovery objectives for disruption types such as software, hardware, Availability Zone, and AWS Region. It specifies recovery time objective (RTO) and recovery point objective (RPO) targets against which an application is assessed.
A recovery runbook should express a dependency graph: each step names the conditions its predecessors must establish. A database being created is not sufficient readiness for its consumers. Its required configuration, connectivity, credentials, and data checks must pass before dependent application work proceeds. Before activating a replacement writer, establish fencing that prevents the former writer from accepting conflicting writes.
A failure-safe runbook assumes that execution can stop between a successful change and the recording of its result. A lost response therefore means outcome unknown, not necessarily failure. An idempotent step can be repeated without adding another effect: setting capacity to a recorded target is different from incrementing capacity on every attempt.
An Automation runbook defines actions that AWS Systems Manager performs on managed instances and other AWS resources. Predefined runbooks cover common operational tasks; author a custom runbook when your recovery procedure needs different inputs, checks, or actions.
An EventBridge rule can start a Systems Manager Automation runbook when a matching AWS system event occurs or according to a schedule. AWS service events emitted in an account go to that account’s default event bus; a scheduled invocation does not require an incoming service event.
An alarm-driven response separates event matching from operational execution. An EventBridge rule selects the event and uses a Systems Manager Automation runbook as its target. EventBridge can also start an automation on a schedule; this lesson follows the event-driven path.
A regional traffic decision needs an explicit definition of acceptable operation. Reachability is evidence that a request can reach an endpoint; application readiness asks whether that endpoint can serve useful work. A successful check proves only the behavior it actually exercises.
An ARC routing control is an On/Off state, not a traffic proxy. In this design, each Region has a routing control linked to a Route 53 health check. The health checks are associated with primary and secondary failover records pointing to regional Application Load Balancers. ARC changes routing eligibility; application requests never pass through ARC.
A disaster recovery tabletop rehearses recovery decisions through structured discussion, not live recovery. Its useful outputs are evidence about decision-making, coordination, and plan usability: who can declare a disaster, which procedure people locate, and which assumptions block progress. Evaluate the plan and supporting processes, not individual performance.
Resilience testing validates known failure modes and aims for pass/fail results. Chaos engineering tests a hypothesis about how an application and its dependencies—including people, processes, and technology—absorb, adapt to, and recover from unexpected failures. A controlled injection can be repeatable even when the resulting system response challenges your mental model; hypothesis-based does not mean random destruction.
An AWS Fault Injection Service experiment should test a hypothesis, not merely demonstrate that a fault can occur. Start with steady state: normal operation expressed through business metrics such as transactions, clicks, or orders per second. Steady state can allow some disruption; acceptable impact does not have to mean zero impact.
A recovered database or a healthy endpoint does not prove that an application has recovered. Define a recovery acceptance contract for each critical journey: its realistic entry point, authorized identity, expected response, durable state changes, external effects, and acceptable completion time. Include journeys that read pre-disaster records and journeys that create new work after recovery.
Synthetic transactions ask whether a selected journey is working acceptably in the running service over time. End-to-end testing asks whether an integrated application produces the required outcomes for specified cases. Both can execute the same sign-in, search, and checkout script. Their difference is the decision the evidence supports, not whether they use a browser or an API.
Independent failure domains are independent with respect to a particular failure, not independent of everything. Separate EKS clusters have separate Kubernetes control planes and cluster-scoped objects. That can contain a faulty cluster configuration, but it does not separate worker infrastructure, regional dependencies, or the automation authorized to change both clusters.
Amazon EKS manages control-plane availability within an AWS Region. It automatically scales control-plane instances based on load, detects and replaces unhealthy instances, and patches the control plane. When needed, EKS restarts unhealthy control-plane instances across Availability Zones within that same Region.
An ECS cluster is Regional, although its services can run tasks across Availability Zones within that Region. A second cluster is an independent scheduling boundary, not a replica of the first. ECS does not automatically synchronize their services, task definitions, desired counts, or capacity.
Active-active means both Regions serve production traffic before a failure; equal traffic shares are not required. This diagram shows request forwarding, local data operations, and replication—not response, health-check, or deployment connections. Each Region has its own multi-AZ Kubernetes application and local data endpoint.
Design solutions to meet business continuity and resiliency requirements17 lessons
An Organizations backup policy describes backup configuration that AWS Backup applies across accounts. This integration requires an organization with all features, trusted access for AWS Backup, and the backup policy type enabled. Organizations determines the account’s effective policy; AWS Backup turns that configuration into backup plans.
Enable AWS Backup trusted access and the backup policy type in an organization with all features enabled. Attach backup policies to the root, organizational units, or accounts. AWS Organizations combines applicable policies along each account's hierarchy into an effective backup policy. AWS Backup uses its complete plan definitions to create backup plans in the specified Regions of that account.
Backup isolation means that production administrators cannot also destroy the recovery path. This architecture uses a supported Amazon EFS backup workflow: central policy schedules protection, and AWS Backup copies recovery points into a separately administered account. The arrows show policy delivery, backup requests, recovery copies, and key operations—not every service response.
AWS Backup Vault Lock makes the ability to remove the lock a separate decision from the retention of individual backups. Its two modes differ in whether an authorized administrator can later undo the lock.
AWS Backup Vault Lock and EBS snapshot lock address retention protection at different boundaries. Vault Lock is a control on an AWS Backup vault, protecting recovery points stored in that vault. EBS snapshot lock is a control on an individual EBS snapshot, protecting that snapshot against deletion during its lock period.
Immutability constrains operations on a recovery point: storage rejects prohibited deletion or retention changes while protection applies. Backup isolation constrains administrative authority: compromising production must not grant control over recovery copies. One protects retained data against changes; the other separates who can control its recovery path.
A logically air-gapped vault stores its backups in an AWS Backup service-owned account. This is the storage boundary relevant to account compromise: the backups are not stored in the customer's account. Every such vault also includes Vault Lock in compliance mode.
A static-threshold alarm watches a chosen metric and compares it with a threshold. Period is the duration used to produce each metric or expression data point. Evaluation Periods, N, selects how many recent points to evaluate; Datapoints to Alarm, M, specifies how many must breach. Breaches need not be consecutive. With complete data, a 3-out-of-5 alarm can enter ALARM for the sequence breaching, good, breaching, good, breaching.
A Synthetics canary is a configurable script that monitors endpoints and APIs. It follows customer routes and actions, so it can verify an experience even when the application has no customer traffic. Its checks cover availability and latency, and it can store UI load-time data and screenshots.
High availability emphasizes keeping a service usable for its required proportion of time. Brief interruptions for detection, failover, or recovery can be acceptable within that objective. Fault tolerance emphasizes continued acceptable operation while specified failures occur. The distinction is the behavior during the failure, not simply how many replicas exist.
A failure domain is a boundary within which one event can disable several resources. Two instances in one Availability Zone protect against some instance failures, but not loss of that Zone. Trace every required dependency: a shared, unprotected dependency can defeat otherwise independent paths.
Fault tolerance is a bounded promise: name the failures covered, the demand to support, and the behavior that remains acceptable. For this lesson, a stateless HTTP service must continue meeting its latency and error objectives at its design load after losing any one instance or either Availability Zone.
Amazon EC2 Auto Scaling replaces unhealthy group members to maintain desired capacity; it does not need a demand-scaling policy to do this. Its default EC2 health checks evaluate instance state and EC2 status checks. A running instance can still have a broken application that these checks do not detect.
S3 Object Lock protects individual object versions and requires S3 Versioning. Once Object Lock is enabled, it cannot be disabled and versioning cannot be suspended. Enabling the feature alone does not assign retention to every version: bucket default retention applies to new versions, not retroactively to existing ones. Check each version's actual protection.
A retention policy states how long backups should remain. A backup plan can translate that intention into a scheduled expiration. Neither the written requirement nor the expiration setting necessarily prevents a separate request to delete a backup earlier.
Snapshot lock prevents deletion of an EBS snapshot while its lock is active. The mode determines how users with appropriate permissions can change that protection. In governance mode, the snapshot locks immediately, with no cooling-off period.
Blast radius is the potential reach of a failure, not just the resources directly broken. A dependency graph must distinguish application requests, shared resource limits, and control actions. A box around a workload is not evidence of isolation.
Design infrastructure as code2 free18 lessons
Imperative infrastructure specifies operations: call a creation API, capture its result, then pass that result to another operation. The automation author specifies the execution procedure. Declarative infrastructure specifies resources, properties, and relationships; a provisioning engine determines the operations needed to implement that model.
A provisioning engine interprets a desired-state model, not a list of commands. Resource types and properties describe the target configuration; logical identifiers connect declarations to managed resource identities. The engine uses this model, its recorded management information, and resource-type behavior to determine lifecycle operations. Tools differ in how much live resource information they read during planning: recorded state is not automatically a complete picture of reality.
A recoverable imperative workflow needs a durable execution journal, not just a log of successful commands. For each logical operation, record its execution ID, intended parameters, stable operation identity, known resource identifiers, ownership, and phase. Useful phases include planned, requested, ready, compensating, and compensated. Persist intent before issuing a mutating request.
A CloudFormation template is a YAML or JSON file describing resources. A stack manages related resources as one unit for creation, updates, and deletion. CloudFormation makes the underlying AWS service calls to provision and configure the declared resources; the template is the declaration, not a script of service calls.
An AWS CDK app executes to build a construct tree. Each construct has a scope and an ID that is unique within that scope. Stacks establish deployment boundaries; ordinary constructs provide composition boundaries, not separate deployments. A reusable construct can contain several resources without creating another stack.
AWS CDK and direct CloudFormation templates are two authoring paths to the same deployment engine. With CDK, you write a program that defines constructs and stacks. Synthesis runs that program and produces a cloud assembly containing CloudFormation templates and deployment artifacts. With direct CloudFormation, you author the JSON or YAML template yourself.
A safely repeatable CLI script makes decisions from observed state, not from which commands ran last time. Consider a script that ensures one Amazon EBS volume exists for a workload. Before discovery, validate the account with aws sts get-caller-identity and consistently select the intended credentials and Region. Otherwise, an empty result can trigger creation in the wrong environment.
Imperative provisioning specifies operations: create this network, then create this instance. When you issue direct service commands through the AWS CLI, the target services perform those operations, but the CLI does not automatically turn separate commands into a managed resource lifecycle. A script can add orchestration; its author owns that logic.
Static analysis evaluates infrastructure code or configuration without deploying the infrastructure it describes. The analyzer executes; the proposed workload does not. For AWS CDK applications, inspecting the synthesized CloudFormation template exposes generated resources that are not obvious from the source constructs.
CloudFormation Guard checks JSON or YAML data against declarative rules describing required or prohibited configurations. It answers a policy question: does this input satisfy these rules? Running Guard does not, by itself, make CloudFormation reject a deployment. To create an early gate, configure the deployment workflow to stop when validation fails.
Externalizing a secret means infrastructure code carries its identifier while a separate, authorized operation retrieves its value. A secret ARN is not a credential and grants no access by itself. Provision or populate the secret through a controlled path; do not move its plaintext into a template parameter or a synthesis script.
AWS Secrets Manager and Parameter Store SecureString both protect stored values using AWS KMS. Encryption alone therefore does not decide where an infrastructure-managed credential belongs. Creating the value through infrastructure code does not, by itself, require Secrets Manager.
A SecureString parameter stores a value encrypted with AWS KMS. Standard SecureString parameters use KMS directly; advanced SecureString parameters use envelope encryption through the AWS Encryption SDK. Both require authorized decryption to return plaintext.
Define an AWS::SecretsManager::Secret with GenerateSecretString instead of putting a password in the template. For a JSON credential, SecretStringTemplate can contain a nonsecret username, while GenerateStringKey names the generated password field. Secrets Manager creates the password; the template contains generation instructions, not its value.
Infrastructure as code should deploy secret metadata, permissions, executable code, and workflow definitions—not carry credential values. This design adds a custom coordinator around an existing database and application. It uses alternating database accounts so the previous account can remain usable during a bounded cutover.
A portable deployment interface exposes independent environment choices, not every property that can vary. Start by assigning each value one source of truth: explicit configuration, deployment context, a reference or derivation, or a fixed design decision. For example, accept an approved VPC allocation and derive subnet ranges from it rather than accepting both independently. Keep mandatory encryption as a design constant instead of offering an encryption-disable parameter.
A StackSet needs authorization to deploy stack instances across accounts and Regions. Its permission model determines who establishes that authorization: you establish the role relationships with self-managed permissions, or StackSets creates the necessary roles with service-managed permissions.
A StackSet is a regional resource: you can view or change it only in the Region where it was created. That management scope is distinct from the target accounts and Regions selected for deployment.
Design CI/CD and DevSecOps pipelines25 lessons
AWS CodeBuild executes commands in a managed build environment. It can compile, test, package, or run other scripts. A build project defines how that execution is configured; a build is one execution of that project.
AWS CodePipeline owns the release workflow: which actions run, which artifacts they consume, and whether the release can advance. A deploy action delegates work to a deployment provider; naming a stage Deploy does not make CodePipeline the deployment engine.
A pipeline describes how software changes move through a release process as a series of stages. A stage is a logical unit that can isolate an environment and limit concurrent changes in that environment. Within a stage, actions can run serially or in parallel.
A CodeCommit source integration has two paths: a repository event starts execution, and the source action retrieves repository contents. Here, a same-Region EventBridge rule selects changes to main, starts CodePipeline with the event's commit revision, and leaves source retrieval to CodePipeline.
A buildspec is a YAML collection of build commands and related settings that CodeBuild uses to run a build. You can include it with the source code or define it when creating the build project. The repository alone therefore does not describe the commands a build will execute.
For a pipeline release targeting a CodeDeploy deployment group, the deployment configuration determines how the rollout proceeds. Read that configuration in the context of the compute platform: an instance-availability rule and a task-set traffic-shifting rule control different things.
Artifact promotion means advancing the same built output through environments. Record the source commit, build execution, artifact location, and checksum together as a release identity. A branch name or a mutable object key alone cannot identify exactly what was tested.
A quality gate is an enforceable decision, not merely a test run. Define acceptance criteria before evaluating a candidate: required checks, prohibited findings, performance budgets, and evidence validity. Select requirements by risk, including change impact and target environment; an average score must not conceal failure of a mandatory requirement.
Cross-account promotion needs delegated authority and access to protected artifacts. Cross-Region promotion needs an artifact bucket in the pipeline Region and each action Region. CodePipeline copies artifacts between Regions; the action-Region bucket and encryption key remain in the pipeline account.
Vulnerability assessment discovers weaknesses and produces evidence: affected resources, vulnerable packages, severity, and remediation advice. A security quality gate uses evidence to decide whether a change may cross a delivery boundary. Discovering a critical vulnerability and refusing to promote an artifact are separate operations.
A digital signature binds signed data to a private signing key. For a release archive, compute a cryptographic digest of its exact bytes and sign using an asymmetric signature algorithm. Verification uses the corresponding public key; it does not require the private key. Repacking an archive can change its bytes even when its extracted files look identical.
AWS Signer supplies an authenticity and integrity control: a verifier can check that an artifact has not changed since signing and that its signing identity is trusted. A signature does not establish that the software is safe or free of vulnerabilities.
ECR managed signing automatically signs images as they are pushed, using the identity of the entity pushing the image. The signature associates publisher identity with an image digest: the content-addressed identity of the image, rather than merely its human-readable tag.
An artifact-bound gate joins the candidate, scan evidence, signature subject, exceptions, and promotion decision using the same immutable image digest. Resolve a tag once, then carry the digest through evaluation and deployment. Rebuilding the same source creates a new candidate; a source revision or tag is not a substitute for artifact identity.
A release gate is a decision rule backed by evidence about a defined application and workload. Start with supported tasks, intended users, and unacceptable failures. Evaluate complete tasks through the application: retrieval, prompts, permissions, tool calls, and final answers. A model-only benchmark cannot establish that this combined system works.
Human evaluation is a measurement protocol, not a collection of opinions. Start with the release claim: which users, tasks, languages, and operating conditions must the application support? Build a held-out test set with prompts, required context, and case identifiers. Keep development examples separate; repeatedly tuning against release cases makes them development data.
Model evaluation supports a decision about an application configuration across a set of cases: does its measured behavior meet the criteria for the intended use? Services such as Amazon Bedrock Evaluations can contribute this evidence. Passing thresholds supports deployment under the assessed conditions; it does not certify every response the application will generate.
An acceptance gate treats every model response as untrusted and releases it only after the policy for its intended destination passes. This diagram shows response data flow, not the model-invocation protocol. AWS Lambda runs application-written validation; it does not provide these acceptance rules automatically.
A reversible blue-green cutover needs a prepared replacement, a controllable traffic switch, and a retained environment that can still operate on current production state. This example uses two EC2 fleets, separate target groups, an Application Load Balancer, and one shared relational database.
A canary deployment releases a candidate to limited production traffic while a retained stable version serves the rest. Publishing the candidate does not expose it: a separate routing decision controls its share. A weighted share is probabilistic, not an exact request count or a guarantee that one user always reaches the same version.
A rolling deployment changes a serving fleet in batches. Its capacity budget has two boundaries: a minimum healthy capacity that must remain available and a maximum total capacity allowed during replacement. Starting a replacement consumes headroom before it contributes healthy capacity. Removing an old resource consumes the availability budget until its replacement is ready.
Blue-green deployment controls environment replacement. The current environment serves production while a separate replacement environment is prepared and validated. A classic blue-green release then redirects production traffic in one cutover. The defining property is the separate replacement, not the speed of the traffic change.
Blue-green deployment prepares a replacement application environment independently of the active one, then redirects production traffic to it. Rolling deployment updates or replaces members of the serving fleet in successive batches. The defining difference is the replacement boundary: an environment destination versus members of a fleet.
Rolling deployment controls the replacement of serving resources: which instances, tasks, or pods change next, and how much capacity remains available. Canary deployment controls initial exposure to a candidate version and uses production evidence to decide whether that exposure should increase. Gradual replacement and gradual exposure are not the same control.
Rollback restores an executable release, not the past. Retain immutable artifacts and their configuration, infrastructure definitions, secret references, and dependency requirements. A release that was healthy yesterday is a usable rollback target only if it can still run against today's data and dependencies.
Design observability and monitoring solutions25 lessons
Structured logging makes an event a record with defined field names, meanings, and types. JSON is an encoding, not the contract: "rejected_count":12 and "rejected_count":"12" are both valid JSON, but only the first satisfies a contract requiring a number. Keep a readable message, but filter and aggregate using stable fields rather than message wording.
An instrumented application creates telemetry using OpenTelemetry APIs and SDKs. Its SDK exporter sends OpenTelemetry Protocol (OTLP) data to an ADOT Collector. The arrows below carry telemetry, not the application's business requests; the Collector does not create instrumentation inside an uninstrumented application.
Standardized instrumentation creates telemetry; collection transports it. In this design, an EC2 application writes structured log files and emits OpenTelemetry metrics and spans. The CloudWatch agent handles file logs and host metrics, while an AWS Distro for OpenTelemetry (ADOT) Collector handles application metrics and spans. These are parallel paths, not agents chained together.
Container Insights connects resource measurements to container-platform identities. The important choice is not simply whether monitoring is enabled: it is which entities the collection mode exposes. A healthy cluster or service average can hide one overloaded task or container. More detailed collection improves attribution; it does not simply mean a faster sampling interval.
CloudWatch RUM collects client-side performance data from actual web and mobile user sessions in near real time. Web evidence includes page load times, client-side errors, and user behavior. This describes actual application use, but does not guarantee that every user session contributed evidence.
Head sampling decides near a trace's start, using information already available, such as the route. Configure the entry service's root sampler and use parent-based sampling downstream: services extract the trace context, honor its sampling decision, and propagate it on further calls. Preserve trace identifiers and parent relationships even when a request is not sampled. Independent random decisions at each service fragment traces.
Head sampling decides near the start of a trace whether to record and export spans. A parent-based sampler respects an upstream sampling decision; a ratio-based decision for new root traces controls how many traces enter collection. Configure the sampler explicitly rather than treating an SDK default as a production volume policy.
ECS telemetry answers different questions through separate signals: resource measurements show pressure, application logs explain behavior, and lifecycle events record transitions. Task metadata supplies the identity needed to connect them; it is a local runtime interface, not a durable monitoring store.
Container Insights connects container resource consumption to Kubernetes identity: cluster, namespace, workload, pod, and node. For this EC2-backed EKS design, the Amazon CloudWatch Observability EKS add-on deploys the CloudWatch agent for infrastructure telemetry and Fluent Bit for container logs. These collectors are represented inside the cluster card; creating an EKS cluster alone does not establish this pipeline.
Amazon Managed Grafana is the query client and visualization layer. Its workspace stores dashboard definitions and data-source configuration, sends queries to backends, and renders their results. It is not the durable store for the container metric samples shown in those dashboards.
An Amazon Managed Service for Prometheus workspace is an ingestion and storage destination, not automatically a scraper for every workload. An AWS managed collector discovers and scrapes EKS targets using a configured scraper, then delivers metrics to its destination workspace. You still configure target selection, scrape access, and the source network.
A multi-cluster dashboard correlates infrastructure pressure with application symptoms. In this design, ECS and EKS publish Container Insights telemetry to CloudWatch; EKS application metrics also reach Amazon Managed Service for Prometheus through configured collection. Collection must already be enabled: adding a Grafana data source does not install collectors.
A central archive uses a CloudWatch Logs logical destination to expose an approved subscription endpoint across accounts. That destination references a Direct PUT Firehose delivery stream and an IAM role. It is a routing and authorization resource, not another queue. This design keeps the source log group, destination, stream, and bucket in one Region.
A CloudWatch alarm action can publish a notification to an SNS topic when the alarm enters a configured state. Configure the topic for the state you want reported; an ALARM action does not also configure OK or INSUFFICIENT_DATA notifications. An alarm remaining in ALARM does not repeatedly send the same SNS action just because it is still breaching.
A service-level indicator (SLI) supplies the measurement an SLO evaluates. Application Signals automatically collects Latency and Availability for every discovered service and operation. An SLO can target a specific operation or a dependency the service calls or uses. You can also use any CloudWatch metric or metric expression as an SLI.
AWS Systems Manager Run Command can use Amazon SNS to notify recipients about command-status changes. The same notification capability also applies to commands sent using Maintenance Windows; this lesson follows Run Command.
A latency measurement needs a start event, an end event, and an observation point. Application end-to-end timing can include network transport, authentication, retrieval, queueing, and response delivery. A model-serving measurement covers a different boundary; the two are not interchangeable.
Task completion rate is successfully completed tasks divided by eligible attempted tasks, multiplied by 100. The unit is a user's goal, not a message, model invocation, or tool call. Define a task contract: the start event, eligibility rules, required outcome, completion deadline, and evidence needed to prove success. Keep its version with the measurement so a definition change cannot masquerade as a performance improvement.
Data drift is a change in input distributions, such as customer mix or missing-value frequency. Prediction drift is a change in model outputs. Neither establishes degraded prediction quality. Concept drift changes the relationship between inputs and outcomes; it can occur even when input distributions look stable.
A synthetic transaction is a scheduled, controlled journey through production. Define success as a user-visible outcome: sign-in reaches the account page, a known product appears, and adding it produces the expected cart entry. Assert these outcomes explicitly; HTTP 200 alone can hide an error page or a failed sign-in. Record named step durations as well as total duration.
An SLI defines a measurement of service behavior; an observed SLI value reports what happened over a stated interval. An SLO references that measurement and adds a target and evaluation window. “Successful eligible requests divided by all eligible requests” defines an SLI. “At least 99.9% over a rolling 30 days” specifies an objective for it. Changing the objective to 99.95% does not change the observed service behavior.
A useful SLI specification is an executable measurement contract: it names the user outcome, eligible events, success predicate, observation boundary, and counting rules. For checkout, healthy servers measure a dependency; confirmed purchases measure an outcome. Keep checkout separate from high-volume browsing so browsing success cannot hide checkout failure.
A user-centered SLO needs a measurement contract: the user journey, eligible population, counting unit, good outcome, measurement boundary, target, and evaluation window. Choose a boundary that captures the promised experience. Server latency cannot establish client-perceived latency, and an HTTP success response cannot prove that an order was recorded correctly.
A service level objective (SLO) states the required service quality over an evaluation window. An error budget expresses the failure allowance implied by that objective. They describe the same reliability constraint from opposite sides: required good service versus permitted bad service.
A burn-rate alert starts with the SLO's allowed bad-event fraction: a = 1 − SLO. For a 99.9% target, a = 0.001. With one million eligible requests in the measurement window, the allowance is 1,000 bad requests; after 700 bad requests, 300 remain.
Design operational automation and resilient systems13 lessons
Quota headroom is the difference between an allowed limit and the demand measured against it. Build each quota record around the target account, Region, service code, quota code, and any resource context. Inspect the quota's scope: a Regional increase does not change other Regions, and a global quota must not be treated as independent Regional capacity. Central automation can assume a least-privilege role in each account to read that account's values.
A retry policy needs two gates: error eligibility and safe repetition. Retry failures that the API documents as temporary, such as throttling, selected server failures, and certain connection errors or timeouts. Authentication failures, malformed requests, and unsupported parameters generally need correction, not another identical request. Honor server retry guidance when supplied.
A shared token bucket makes concurrent remediation workers spend one allowance. Its capacity B caps stored tokens, and its refill rate r restores tokens per second. Given balance T and elapsed time Δt, calculate Tnew = min(B, T + r × Δt). An attempt costing c is admitted only when Tnew ≥ c; admission subtracts c. Completing an operation does not return tokens.
Exponential backoff answers: “After this attempt fails, when may this operation try again?” A typical delay ceiling is d(n) = min(cap, base × multiplier^(n−1)), where n starts at the first retry. The policy reacts to an unsuccessful attempt; it does not, by itself, regulate initial requests.
A remediation bulkhead needs two boundaries: the resources an action may change, and the execution capacity that action may occupy. A narrow target set protects healthy resources from direct changes; a separate capacity budget protects other work from resource exhaustion. Neither boundary substitutes for the other.
Rate limiting controls admissions over time. A request consumes an allowance when it is admitted; that allowance is replenished according to the rate policy, not when the request finishes. Requests admitted earlier can still occupy resources when new requests become eligible.
A circuit breaker controls admission to a dependency. In closed, calls pass and outcomes are measured; in open, new calls are rejected without invoking the dependency; in half-open, only bounded recovery probes pass. Opening does not cancel work already admitted.
A bulkhead asks, “Can this dependency occupy another unit of its allocated capacity?” A circuit breaker asks, “Should we attempt this call given what we know about the dependency’s health?” Both can reject a call immediately, but they protect against different conditions.
Exponential backoff spaces retry attempts by increasing the wait after successive failures. It answers: “When should this failed operation try again?” A circuit breaker answers a different question: “Should calls reach this dependency, given its observed health?”
A circuit breaker asks whether its assessment of dependency health permits a call. A rate limiter asks whether an attempt fits a traffic allowance. Both can reject immediately without contacting the dependency. Fast rejection alone therefore tells you neither which control acted nor what must change before another attempt can pass.
For asynchronous invocation, maximum event age controls how long Lambda retains an event in its asynchronous event queue, up to six hours. This is a retention boundary, not a promise that every event will receive every possible processing attempt.
Immutable recovery replaces unhealthy compute with a fresh instance of an approved definition; it does not repair the failed host in place. Build, scan and test an AMI, then pin its AMI ID in a specific numeric launch template version. Configure the Auto Scaling group to use that version rather than $Latest or $Default. Keep the AMI available and its launch permissions valid.
An automated patch rollout needs both an execution path and a health feedback loop. This design uses AWS Step Functions to coordinate waves and AWS Systems Manager Automation to run patching and recovery procedures. Patch Manager applies approved operating-system updates; the workflow supplies the application-specific safety gates.