Architecture questions rarely test one service alone. They describe a workload and ask which combination of services meets its availability, security, cost or performance goal. Each section here draws one common design end to end, so you can see where every service sits and why.
Highly available three-tier web application
The classic architecture question describes a web application that must stay up through an Availability Zone failure, scale with traffic, resist attacks and keep its data private. The answer combines a protected edge layer, a load-balanced stateless tier and an encrypted managed database, each placed in at least two zones.
How it works
- Route 53 answers for the domain with an alias record that points at CloudFront.
- At the edge, Shield Standard absorbs common DDoS attacks, and an AWS WAF web ACL blocks malicious requests. ACM provides and renews the TLS certificates.
- CloudFront serves static files from a private S3 bucket through origin access control and forwards dynamic requests to the load balancer.
- An Application Load Balancer in public subnets of two zones sends requests to an Auto Scaling group in private subnets of the same zones. A target tracking policy scales the group, and unhealthy instances are replaced.
- The app tier keeps no local state: sessions and hot reads live in ElastiCache, durable data in Aurora, encrypted with a KMS key chosen at creation.
- Aurora takes writes on the writer and keeps a replica in the other zone for reads and failover.
- Each zone has its own NAT gateway for outbound calls, so losing one zone does not cut the other off.
| Tier | Service | What makes it highly available and secure |
|---|---|---|
| Edge | Route 53, CloudFront, Shield Standard, AWS WAF, ACM | Global edge network; attacks filtered before the origin |
| Static content | S3 | Private bucket behind OAC |
| Web and app | ALB, EC2 Auto Scaling | Two or more AZs; target tracking; unhealthy instances replaced |
| Session and cache | ElastiCache | Shared state, so instances are interchangeable |
| Data | Aurora, KMS | Storage in three AZs; replica as failover target; encrypted at rest |
| Decision | Choose | When |
|---|---|---|
| Name at the zone apex | Alias record | Pointing example.com at CloudFront or an ALB |
| Block web exploits | AWS WAF on CloudFront | SQL injection, scripting, rate floods |
| Reach from app tier to database | Security group as source | Instances come and go |
| Scaling policy | Target tracking | Keep one metric near a target |
| Egress for private subnets | One NAT gateway per AZ | Egress must survive an AZ failure |
Security groups chain the tiers: the ALB accepts HTTPS, the app tier accepts traffic only from the ALB security group, and the database accepts its port only from the app tier security group.
Exam cues
- If the question says survive an AZ failure, think ALB and an Auto Scaling group across at least two AZs, because both spread work across zones.
- If the question says only the app tier may reach the database, think a security group rule that references the app tier security group, because it follows instances as they scale.
- If the question says private instances keep internet access during an AZ outage, think one NAT gateway per AZ, because a NAT gateway lives in one zone.
- If the question says keep the S3 origin private behind CloudFront, think origin access control, because only the distribution can read the bucket.
- If the question says users lose sessions as instances scale in, think ElastiCache or DynamoDB for session state, because the app tier must be stateless.
- If the question says block SQL injection or request floods, think AWS WAF on CloudFront, because it filters at the edge.
- If the question says certificates must renew automatically, think ACM.
Remember
- ALB: subnets in at least two AZs.
- Aurora: storage copies in three AZs; up to 15 Aurora Replicas.
- NAT gateway: one per AZ for zone-independent egress.
- Alias, not CNAME, at the zone apex.
- Shield Standard is automatic and free; AWS WAF is configured per resource.
- RDS encryption is set at creation; encrypt later through an encrypted snapshot copy.
Trap: One NAT gateway or one database instance makes the whole design depend on a single zone, even when the web tier spans two. Check every tier, not just compute.
Users look up the domain in Route 53. An alias record at the zone apex returns the CloudFront distribution.
Requests reach a nearby CloudFront edge location, where Shield Standard absorbs common DDoS attacks at no extra cost.
An AWS WAF web ACL on the distribution blocks malicious requests, such as SQL injection, before they reach any origin.
TLS uses certificates that ACM issues and renews, on the distribution and on the load balancer.
Static files come from a private S3 bucket that only the distribution can read, through origin access control in the bucket policy.
Dynamic requests go to the Application Load Balancer, which has nodes in public subnets of two Availability Zones and accepts traffic only from CloudFront.
The load balancer spreads requests across an Auto Scaling group in private subnets of both zones. Only the ALB security group may reach the instances.
Instances keep sessions and cached reads in ElastiCache, so no user is tied to one instance.
Writes go to the Aurora writer, reachable only from the app tier security group. The cluster volume keeps copies of the data in three Availability Zones.
The database is encrypted at rest with a KMS key chosen when it was created.
If the writer or its zone fails, the Aurora Replica in the other zone becomes the writer.
A target tracking policy keeps a metric such as average CPU at its target, adding or removing instances, and the group replaces unhealthy instances in the surviving zone.
Outbound internet calls from each zone use the NAT gateway in that same zone, which sends them out through the internet gateway.
Detalhes das caixas (12)
- Route 53
An alias record at the zone apex points example.com at the CloudFront distribution.
- CloudFront
Serves cached static content from edge locations and forwards dynamic requests to the load balancer. Shield Standard protects it at no extra cost.
- AWS WAF
Rules block SQL injection, cross-site scripting and request floods before they reach the origin.
- ACM
Issues and renews the certificates on the distribution and on the load balancer.
- S3 bucket
Private bucket. Its policy lets only this distribution read it, through origin access control.
- AWS KMS
Chosen when the database is created. An unencrypted database cannot be encrypted in place.
- Load balancer
Internet-facing ALB with nodes in a public subnet of each AZ. Its security group accepts HTTPS from CloudFront.
- EC2 instances
Stateless app tier. Its security group allows traffic only from the ALB security group.
- ElastiCache
Shared session store and read cache, so any instance can serve any user.
- Aurora writer
Takes all writes. Its security group allows the database port only from the app tier security group.
- Aurora Replica
Serves reads through the reader endpoint and is the failover target if the writer fails.
- CloudWatch alarm
Created and managed by the target tracking policy, for example average CPU at 50 percent.
Da documentação da AWS (17)
- A Route 53 alias record can point the zone apex, such as example.com, at a CloudFront distribution or other supported AWS resource, which a CNAME record cannot do.
- CloudFront can send authenticated requests to an S3 origin with origin access control (OAC), so the bucket stays private; AWS recommends OAC over the older origin access identity.
- An Application Load Balancer needs subnets in at least two Availability Zones.
- EC2 Auto Scaling replaces instances it finds unhealthy, and a group that spans several Availability Zones can launch instances in another zone when one becomes unavailable.
- AWS recommends keeping session state in a shared backing store such as ElastiCache, DynamoDB or RDS, so any instance can serve any user and instances can scale without losing sessions.
- An Aurora cluster volume keeps copies of the data across three Availability Zones in the Region.
- An Aurora cluster can have up to 15 Aurora Replicas that share the cluster volume and serve reads; placing them in other Availability Zones keeps the cluster highly available.
- A NAT gateway lives in one Availability Zone; to stay resilient, create one in each zone and route each zone's private subnets to the NAT gateway in the same zone.
- A security group rule can name another security group as its source, allowing traffic from every instance associated with that group over private IP addresses.
- AWS WAF is a web application firewall that watches HTTP(S) requests to resources such as CloudFront distributions and API Gateway APIs and allows or blocks them by rules.
- AWS gives automatic protection against common DDoS attacks such as UDP reflection and SYN floods at no extra cost.
- Serving traffic through Amazon CloudFront and Amazon Route 53, which run in edge locations, is an AWS best practice for DDoS resilience because attacks are absorbed at the edge.
- AWS Certificate Manager creates, stores and renews public and private SSL/TLS certificates that protect websites and applications on AWS.
- ACM certificates are deployed to integrated AWS services such as Elastic Load Balancing and CloudFront.
- Amazon RDS encrypts DB instances at rest with an AWS KMS key, either the AWS managed key for RDS (the default) or a customer managed key you choose when creating the instance.
- To encrypt an unencrypted RDS DB instance or change its KMS key, copy a manual snapshot with encryption enabled and restore it, or use a blue/green deployment with an encrypted green environment.
- Target tracking adjusts group capacity toward a metric target and manages the associated CloudWatch alarms.
Serverless event-driven application
A serverless design answers questions that ask for no servers to manage, cost that follows usage and components that scale on their own. The pieces fit in two halves: a synchronous path that serves the user, and an asynchronous path that does slower work after the response.
How it works
- CloudFront serves the web front end from a private S3 bucket through origin access control.
- Users sign in with a Cognito user pool. API Gateway checks each token with a user pool authorizer, throttles bursts, and a regional AWS WAF web ACL filters malicious requests.
- A Lambda function writes to DynamoDB and publishes an event to EventBridge, then answers the user.
- EventBridge rules fan the event out: a Step Functions workflow coordinates multi-step work, and an SQS queue buffers simpler jobs.
- A worker function drains the queue at a capped concurrency and reports partial batch failures. Messages that keep failing land in a dead-letter queue, and a CloudWatch alarm on it notifies the team.
- X-Ray traces each request across API Gateway, Lambda and DynamoDB.
| Need | Service | Why |
|---|---|---|
| Static front end | CloudFront and S3 with OAC | Edge caching; bucket stays private |
| Sign-in and API access | Cognito user pool authorizer | No custom auth code |
| Request handling | API Gateway and Lambda | Throttling; scales per request |
| Web exploit protection | Regional AWS WAF on the REST API | Filters requests without CloudFront |
| Data | DynamoDB on-demand | No capacity planning |
| Fan-out to many consumers | EventBridge | Rules per consumer; producer unchanged |
| Buffer and protect a backend | SQS with maximum concurrency | Work waits in the queue |
| Ordered multi-step process | Step Functions | Retries and visible state |
| Find slow calls | X-Ray with Active tracing | Per-request path and timing |
Exam cues
- If the question says the API must not wait for slow downstream work, think publish an event or message and return, because the asynchronous path scales on its own.
- If the question says many services must react to one event and more will come, think EventBridge rules, because consumers are added without touching the producer.
- If the question says a downstream system cannot take bursts, think SQS between them with maximum concurrency on the event source mapping, because messages wait instead.
- If the question says authenticate app users for an API without writing code, think a Cognito user pool authorizer.
- If the question says coordinate several steps with retries and track each order, think Step Functions.
- If the question says know when messages fail permanently, think a CloudWatch alarm on the dead-letter queue.
Remember
- Synchronous path: CloudFront, API Gateway, Lambda, DynamoDB.
- Asynchronous path: EventBridge for fan-out, SQS for buffering, Step Functions for workflows.
- Dead-letter queue: same account and Region as its source queue; alarm on
ApproximateNumberOfMessagesVisible. - AWS WAF can attach to an API Gateway REST API directly.
Trap: Calling every downstream service directly from the API function couples them: one slow consumer slows every request. Put an event bus or a queue between them.
The browser loads the single-page application from CloudFront, which reads a private S3 bucket through origin access control.
The user signs in with a Cognito user pool and receives tokens.
The app calls API Gateway with the token. A Cognito user pool authorizer checks it, and throttling protects the backend.
A regional AWS WAF web ACL on the REST API blocks malicious requests before they reach the function.
A Lambda function stores the order in a DynamoDB table in on-demand mode.
The function publishes an OrderPlaced event to EventBridge and returns at once.
EventBridge rules start a Step Functions workflow for fulfillment and send a copy to an SQS queue.
A worker Lambda function polls the queue and sends the confirmation email. Maximum concurrency caps how far it scales, and partial batch failure reporting retries only the failed messages.
Messages that keep failing move to a dead-letter queue for investigation.
A CloudWatch alarm on the dead-letter queue's visible message count tells the team as soon as anything lands there.
Active tracing sends each request's path through API Gateway, Lambda and DynamoDB to X-Ray, so slow or failing calls show up per request.
Detalhes das caixas (7)
- S3 bucket
Holds the single-page application. Only the distribution can read it.
- X-Ray
Active tracing on the functions follows each request through API Gateway, Lambda and DynamoDB.
- Cognito
Signs users in and issues the tokens the API checks.
- API Gateway
Checks tokens with a Cognito user pool authorizer and throttles requests before they reach Lambda.
- EventBridge
Rules route the event to each consumer. New consumers add a rule, not code in the API.
- SQS queue
Buffers work so a slow consumer never slows the API.
- Lambda
Event source mapping with maximum concurrency set, and partial batch failure reporting so only failed messages are retried.
Da documentação da AWS (13)
- CloudFront can send authenticated requests to an S3 origin with origin access control (OAC), so the bucket that holds a web front end stays private.
- A REST API in API Gateway can use an Amazon Cognito user pool as its authorizer, as an alternative to IAM permissions or a Lambda authorizer.
- API Gateway throttling and quotas protect an API from being overwhelmed by too many requests; they apply on a best-effort basis.
- On-demand is the default and recommended DynamoDB throughput mode for most workloads, with no capacity to plan.
- EventBridge is a serverless service whose event buses receive events and deliver them to zero or more targets, which keeps producers and consumers loosely coupled.
- Lambda can process messages from standard and FIFO SQS queues; functions should report partial batch failures so successful messages are not retried.
- Maximum concurrency on an SQS event source mapping limits how far Lambda scales for that queue.
- An SQS dead-letter queue receives messages that a source queue could not process successfully, isolating them for debugging; it must be in the same account and Region as the source queue.
- A CloudWatch alarm on a dead-letter queue's ApproximateNumberOfMessagesVisible metric signals when messages land in it.
- Step Functions workflows, also called state machines, orchestrate microservices and processes as a series of event-driven steps.
- AWS WAF protects regional resources including an Amazon API Gateway REST API and an Application Load Balancer.
- AWS X-Ray collects data about the requests an application serves and provides tools to view and filter it to find issues and optimization opportunities.
- Lambda Active tracing automatically sends segments for sampled requests.
Multi-Region disaster recovery with warm standby
Disaster recovery questions give a recovery time and a budget, then ask for the cheapest strategy that meets them. Warm standby is the middle ground the exams use most: a second Region already runs the full stack at small size, data replicates continuously, backups are copied there, and DNS moves users over when the primary fails.
How it works
- One CloudFormation template, deployed to both Regions through a StackSet, keeps the DR Region identical to production at a smaller size.
- A Route 53 health check watches the primary load balancer, and failover routing answers with the primary Region while it is healthy.
- Aurora Global Database keeps a read-only cluster in the DR Region, and S3 Cross-Region Replication copies objects to a versioned bucket there.
- AWS Backup copies recovery points to a vault in the DR Region, so a restore point survives even when bad data replicates.
- When the primary fails its health check, Route 53 answers with the DR Region. The standby takes traffic at once and scales out.
- Aurora managed failover promotes the secondary. A planned test uses switchover instead, which loses no data. The global writer endpoint follows the new primary.
| Strategy | DR Region before the event | Recovery |
|---|---|---|
| Backup and restore | Backups only | Slowest: rebuild infrastructure, restore data |
| Pilot light | Data stores running, app servers off | Start or deploy app servers, then switch |
| Warm standby | Full stack running at reduced size | Takes traffic at once, then scales out |
| Multi-site active/active | Full stack serving traffic | Traffic already spread across Regions |
| Decision | Choose | When |
|---|---|---|
| Planned Region move with no data loss | Aurora switchover | Tests and maintenance |
| Region outage | Aurora managed failover | Primary unavailable; accept possible lost writes |
| Writes in every Region | DynamoDB global tables | Multi-active workloads |
| Restore points in the DR Region | AWS Backup copy action | Protection against replicated corruption |
Exam cues
- If the question says the cheapest option and hours of downtime are acceptable, think backup and restore, because nothing runs in the DR Region.
- If the question says data must be live in the DR Region but compute can start after the event, think pilot light.
- If the question says recover in minutes at reduced cost, think warm standby, because the stack is already running.
- If the question says writes in every Region, think DynamoDB global tables, because Aurora Global Database writes in one primary Region.
- If the question says fail DNS over automatically, think Route 53 failover routing with health checks.
- If the question says a planned Region move with zero data loss, think Aurora switchover; for an outage, managed failover.
Remember
- Aurora Global Database: one primary Region, up to 10 read-only secondaries.
- Switchover: RPO zero. Managed failover: can lose writes still replicating.
- DynamoDB global tables: multi-active, multi-Region.
- S3 CRR is asynchronous; versioning gives restore points.
- AWS Backup copy actions put recovery points in another Region.
- Pilot light cannot serve without action; warm standby can.
Trap: Replication is not a backup. Corruption and deletions replicate too, so keep versioning, point-in-time recovery or AWS Backup copies alongside it.
Both Regions are deployed from the same CloudFormation template through a StackSet, so the DR Region matches production. Its Auto Scaling group runs at reduced size.
Users resolve the domain in Route 53.
A Route 53 health check probes the primary load balancer, and the failover routing policy answers with the primary record while it is healthy.
The primary Region serves all traffic at full capacity.
Aurora Global Database keeps a read-only secondary cluster synchronized in the DR Region.
S3 Cross-Region Replication copies objects to a versioned bucket in the DR Region.
An AWS Backup plan takes backups and its copy action sends them to a vault in the DR Region, for restores to an earlier point in time.
If the health check fails, Route 53 answers with the DR Region. The standby already serves at reduced size and scales out to production capacity.
Aurora managed failover promotes the secondary cluster to take writes. The global writer endpoint keeps its name and now points to the new primary.
Detalhes das caixas (7)
- Route 53
Primary record with a health check, secondary record for the DR Region.
- Health check
Probes the primary load balancer. A CloudWatch alarm can notify when its status changes.
- Aurora
Takes all writes for the global database. Applications use the global writer endpoint.
- AWS Backup
The plan's copy action sends each recovery point to a vault in the DR Region.
- Aurora
Read-only until it is promoted by a switchover or failover.
- Auto Scaling
Running at reduced size. On failover, raise its capacity to production size.
- CloudFormation
One template, a stack instance per Region, so the DR Region matches production.
Da documentação da AWS (15)
- AWS groups disaster recovery strategies into four approaches, from low-cost backup and restore to multiple active Regions; active/passive strategies serve traffic from one Region and fail over to another.
- Warm standby keeps a scaled-down but fully functional copy of production running in another Region, so it can take traffic at reduced capacity at once and recovers faster than pilot light.
- In pilot light, data stores such as databases and object storage stay running in the DR Region, but the application servers cannot serve requests until more action is taken.
- CloudFormation can deploy the same infrastructure definition consistently across accounts and Regions, which keeps a DR Region in step with production.
- A StackSet deploys one template as stacks across selected AWS accounts and Regions; a stack instance associates it with an account and Region.
- Route 53 health checks support active-passive failover, where the failover routing policy sends traffic to a secondary resource when the primary is unhealthy, and active-active failover with the other routing policies.
- Route 53 health checks monitor the health of web applications and other resources, and CloudWatch alarms can notify when a health check status changes.
- An Aurora global database has one primary Region that takes writes and up to 10 read-only secondary Regions that Aurora keeps synchronized.
- Switchover, formerly managed planned failover, synchronizes the selected secondary before changing primary Region and has RPO zero.
- Managed failover handles an unplanned outage without waiting for synchronization; asynchronous replication lag can cause lost writes.
- The global writer endpoint keeps the same name and points to the new primary after switchover or failover; applications must observe the DNS change before resuming writes.
- S3 Cross-Region Replication copies objects asynchronously to a bucket in another Region, and with versioning you can choose a restore point.
- AWS Backup can copy supported backups to other Regions on demand or through backup plan copy actions.
- The first copy to a new Region is full; later copies are generally incremental if the service supports incremental backups.
- DynamoDB global tables are multi-active and multi-Region, with fast local reads and writes in each replica Region.
Hybrid network hub with Direct Connect and Transit Gateway
Hybrid questions describe a data center that must reach many VPCs reliably and privately. The common answer is a hub: one transit gateway that every VPC attaches to, Direct Connect as the main path from the data center, a VPN as the backup, and Route 53 Resolver endpoints so names resolve in both directions.
How it works
- A transit virtual interface connects the Direct Connect link to a Direct Connect gateway, which is associated with the transit gateway.
- A Site-to-Site VPN to the same transit gateway gives a backup path; Direct Connect routes win while it is healthy.
- VPCs from many accounts attach to the transit gateway, shared through AWS RAM.
- Transit gateway route tables decide which attachments reach which, for example keeping production and development apart.
- A second Direct Connect connection at another location removes the single point of failure on the private path.
- Resolver inbound and outbound endpoints in a shared services VPC connect VPC DNS and corporate DNS. AWS RAM shares the forwarding rules with the workload accounts.
| Need | Choice |
|---|---|
| Many VPCs and on premises in one routing domain | Transit Gateway hub |
| Main private path from the data center | Direct Connect with a transit VIF and Direct Connect gateway |
| Cheap backup path | Site-to-Site VPN to the transit gateway |
| Isolate environments on a shared hub | Separate transit gateway route tables |
| DNS in both directions | Resolver inbound and outbound endpoints |
| Same forwarding rules in many accounts | Share the Resolver rules through AWS RAM |
| Maximum resiliency for the private path | Separate connections at more than one Direct Connect location |
| Encrypt traffic over Direct Connect | Private IP Site-to-Site VPN over the connection |
Exam cues
- If the question says many VPCs, many accounts and on premises, think Transit Gateway shared with AWS RAM, because peering does not scale and is not transitive.
- If the question says Direct Connect to VPCs behind a transit gateway, think transit VIF and Direct Connect gateway.
- If the question says backup for Direct Connect at low cost, think Site-to-Site VPN.
- If the question says Direct Connect must be encrypted, think a Private IP Site-to-Site VPN over it, because Direct Connect is not encrypted by default.
- If the question says on-premises servers resolve private hosted zone names, think a Resolver inbound endpoint.
- If the question says EC2 instances resolve corporate names, think an outbound endpoint with forwarding rules.
Remember
- Direct Connect routes are preferred over VPN routes for the same prefix.
- Maximum resiliency: separate connections on separate devices in more than one location.
- Route tables, not the transit gateway itself, isolate environments.
- VPC peering is not transitive.
Trap: A VPN backup protects against losing the Direct Connect link, but one connection at one location is still one point of failure for the main path. Resiliency questions want connections at more than one location.
The network account shares the transit gateway with the workload accounts through AWS RAM, so their VPCs can attach to it.
Each VPC attaches to the transit gateway. Its route tables let production and development reach shared services and on premises, but not each other.
The data center reaches AWS over Direct Connect: a transit virtual interface to a Direct Connect gateway associated with the transit gateway.
A second connection at another Direct Connect location removes the single point of failure on the private path.
On-premises DNS servers forward queries for private zone names to the Resolver inbound endpoint, which answers from the private hosted zone.
VPC queries for corporate names match a forwarding rule, shared to the accounts through RAM, and leave through the outbound endpoint to the on-premises DNS servers.
If the Direct Connect path fails, the Site-to-Site VPN to the transit gateway carries the traffic over the internet.
Detalhes das caixas (8)
- DNS servers
Forward queries for AWS private zone names to the Resolver inbound endpoint, and answer queries for corporate names.
- Direct Connect
Private, not encrypted by default.
- Direct Connect
A separate connection on a separate device at a second location, for maximum resiliency.
- Site-to-Site VPN
IPsec over the internet. Routes learned over Direct Connect win while it is healthy.
- AWS RAM
Shares the transit gateway, and the Resolver forwarding rules, with the workload accounts.
- Transit Gateway
Separate route tables keep production and development apart while both reach shared services and on premises.
- Inbound endpoint
Receives queries from on-premises DNS servers and answers them with VPC Resolver.
- Outbound endpoint
Sends VPC queries for corporate domains to the on-premises DNS servers named in each forwarding rule.
Da documentação da AWS (13)
- Transit Gateway is a network transit hub that interconnects VPCs and on-premises networks through attachments.
- A Direct Connect connection reaches the VPCs and VPNs attached to a transit gateway through a transit virtual interface to a Direct Connect gateway that is associated with the transit gateway.
- Direct Connect does not encrypt traffic in transit by default.
- A Site-to-Site VPN can act as a backup path that keeps VPC connectivity if the Direct Connect connection fails.
- For identical destination prefixes at a virtual private gateway, BGP routes learned over Direct Connect are preferred over Site-to-Site VPN routes, subject to endpoint health.
- Each transit gateway attachment is associated with a transit gateway route table, and attachments can propagate their routes into route tables, which controls which networks can reach each other.
- AWS RAM can share a transit gateway with other accounts or the whole organization, so their VPCs can attach to it.
- A Route 53 Resolver inbound endpoint lets on-premises DNS servers forward queries into a VPC, and an outbound endpoint with forwarding rules sends VPC queries to resolvers on the on-premises network.
- Maximum Direct Connect resiliency uses separate connections ending on separate devices in more than one Direct Connect location.
- To encrypt traffic over Direct Connect, run a Private IP Site-to-Site VPN over it, which uses IPsec without public IP addresses.
- Peering is not transitive: two VPCs peered with the same VPC do not gain connectivity to each other through it.
- Resolver forwarding rules can be shared with accounts through AWS Resource Access Manager (RAM).
- A private hosted zone supplies records to associated VPCs through VPC Resolver.
Streaming ingestion into an S3 data lake
Analytics questions describe events or logs that arrive continuously and must be queryable cheaply, often by several teams with different access. The answer is a data lake: stream into S3 in a columnar format, catalog it once, and query it in place with serverless engines.
How it works
- Applications write events to a Kinesis data stream, which real-time consumers can also read.
- Data Firehose reads the stream, converts JSON to Parquet with a Glue Data Catalog schema, and writes to S3.
- A Glue crawler keeps catalog tables current; Lake Formation controls who can see which tables and columns.
- A Lambda function reads the same stream for per-event processing, because Firehose buffers before delivering.
- Athena queries the files in place, Quick Sight draws dashboards on it, and Redshift Spectrum joins the same data with warehouse tables.
- A KMS key encrypts the stream and the bucket; S3 Lifecycle moves old data to cheaper storage; failed records go to an error prefix.
| Need | Service |
|---|---|
| Real-time stream with several consumers | Kinesis Data Streams |
| Load into S3 with no code, convert formats | Data Firehose |
| Schema and tables for the lake | Glue Data Catalog and crawlers |
| Fine-grained access to tables and columns | Lake Formation |
| Ad hoc SQL, pay per query | Athena |
| Warehouse joins with lake data | Redshift Spectrum |
| Dashboards | Quick Sight |
| React to each event within seconds | Lambda reading the stream |
| Only load into S3, no real-time readers | Direct PUT to Firehose, no stream |
| Keep old data cheaply | S3 Lifecycle transitions |
Exam cues
- If the question says load streaming data into S3 with the least code, think Data Firehose, because it buffers, converts and delivers for you.
- If the question says cheaper and faster Athena queries, think Parquet or ORC, because columnar formats read less data.
- If the question says query S3 with SQL and no servers, think Athena.
- If the question says column-level access for analysts on a data lake, think Lake Formation.
- If the question says the warehouse must query data left in S3, think Redshift Spectrum.
- If the question says process each event within seconds, think a Lambda or other consumer on Kinesis Data Streams, because Firehose buffers.
Remember
- Firehose can read from a Kinesis data stream and convert JSON to Parquet or ORC.
- Crawlers create and update Data Catalog tables.
- Athena: serverless, pay per query.
- Failed format conversions land in an S3 error prefix.
- KMS-encrypted lake: readers need kms:Decrypt.
Trap: Loading the lake into a database before analysts can query it adds cost and delay. Athena and Redshift Spectrum query the files where they are.
A KMS key encrypts the stream and the data lake bucket at rest.
Lake Formation grants analysts fine-grained access to catalog tables instead of broad bucket permissions.
Applications send events and logs to the Kinesis data stream.
A Lambda function reads the stream through an event source mapping and reacts to each batch within seconds.
Data Firehose reads the same stream, buffers records, converts JSON to Parquet with a schema from the Glue Data Catalog, and writes to S3.
A Glue crawler keeps the Data Catalog tables and partitions for the lake current.
Athena runs SQL on the Parquet files in place, and Quick Sight builds dashboards on Athena queries.
Redshift Spectrum lets the warehouse query the same S3 data without loading it.
An S3 Lifecycle rule moves old raw data to a cheaper storage class or expires it.
Records that fail format conversion go to an error prefix in S3. If delivery to S3 fails, Firehose retries for as long as the stream keeps the records.
Detalhes das caixas (8)
- KMS key
Encrypts the stream and the bucket. Readers need kms:Decrypt as well as Athena and S3 access.
- Kinesis Data Streams
Several consumers can read the same records. Retention bounds how long Firehose can retry.
- Lambda
An event source mapping reads the stream and invokes the function with batches of records.
- Data Firehose
Buffers records until the size or interval hint is met, converts JSON to Parquet with a Glue schema and writes to S3.
- Archive class
A lifecycle rule moves old raw data to a cheaper storage class or expires it.
- Lake Formation
Grants table, column and row access to analysts instead of broad S3 bucket permissions.
- Glue
The crawler keeps tables and partitions in the Data Catalog up to date.
- Redshift
Joins warehouse tables with data that stays in S3.
Da documentação da AWS (16)
- Kinesis Data Streams collects and processes large streams of data records in real time, such as logs, clickstreams and business events, for consumer applications to read.
- A Firehose stream can use a Kinesis data stream as its source.
- Data Firehose can convert JSON input to Apache Parquet or Apache ORC before writing to S3, using a schema from the AWS Glue Data Catalog; columnar formats save space and speed up queries.
- An AWS Glue crawler populates the Glue Data Catalog by creating or updating tables for the data stores it crawls.
- Athena runs standard SQL directly on data in S3; it is serverless, so you pay only for the queries you run.
- Lake Formation adds a permissions model on top of IAM for fine-grained access to data lake data in S3 and its metadata in the Glue Data Catalog.
- Redshift Spectrum queries data directly from files in S3.
- Quick Sight can use Athena, Redshift, OpenSearch Service and S3 as data sources for dashboards.
- Kinesis Data Streams supports server-side encryption of stored data with AWS KMS keys.
- Reading a KMS-encrypted S3 dataset requires kms:Decrypt permission in addition to Athena and S3 access.
- A Lambda event source mapping reads queue or stream records and invokes a function with a batch.
- The first configured destination buffer condition met, size or interval, triggers Firehose delivery.
- Direct PUT sends application records to Firehose through PutRecord or PutRecordBatch.
- Format conversion parse errors write failed records to an S3 error prefix; if that write fails, Firehose retries it indefinitely and blocks further delivery.
- For an S3 destination with Kinesis Data Streams or MSK sources, failed delivery retries are bounded by the source stream retention policy.
- S3 Lifecycle can transition or expire stored objects, with separate actions for noncurrent versions.
Secure access across many AWS accounts
Multi-account security questions combine four access paths: people from a corporate directory, applications that cross account boundaries, outside vendors, and guardrails that no account can switch off. The design puts identity and policy in the management account, logs in a separate account, and workloads in member accounts under an OU.
How it works
- Control Tower builds the landing zone with Organizations. Preventive controls become SCPs on the workload OU, and detective controls report drift.
- An organization trail sends every account’s API activity to a bucket in the Log Archive account.
- Identity Center federates with the corporate identity provider and turns permission sets into roles in each account.
- Applications cross accounts by assuming a role: the caller is allowed to call sts:AssumeRole, and the target trust policy names the caller.
- Resource policies, such as bucket and key policies, decide who else may use a resource. SSE-KMS sharing needs a customer managed key.
- Vendors assume a role that requires their external ID.
| Need | Choice |
|---|---|
| Workforce sign-in to many accounts | Identity Center with permission sets |
| Keep the existing Active Directory as the source | AD Connector or an external identity provider as identity source |
| Cap what any account can do | SCPs on OUs |
| Account baseline and guardrails | Control Tower landing zone |
| App in one account uses data in another | Cross-account role, or a resource policy |
| Third party access | Role with an external ID condition |
| Central, tamper-resistant audit log | Organization trail to a log account |
Exam cues
- If the question says single sign-on across many accounts, think IAM Identity Center, because permission sets become roles in each account.
- If the question says limit what even account administrators can do, think SCPs, because they cap permissions in member accounts.
- If the question says a vendor or partner needs access, think a cross-account role with an external ID.
- If the question says share encrypted objects with another account, think a customer managed KMS key with a key policy that allows that account.
- If the question says users keep their on-premises Active Directory credentials, think AD Connector or Identity Center with that directory as identity source.
Remember
- SCPs never grant access and do not restrict the management account.
- Cross-account access needs an allow on both sides.
- An external ID is not a secret; it prevents the confused deputy problem.
- Preventive controls block; detective controls report.
Trap: Attaching an allow SCP does not give anyone access. Access still needs an identity or resource policy that allows it, inside the ceiling the SCPs leave.
Control Tower sets up the landing zone with Organizations: OUs, shared accounts, and preventive controls enforced as SCPs on the workload OU.
An organization trail records every account into a bucket in the Log Archive account, whose bucket policy grants CloudTrail access.
Employees sign in with the corporate identity provider.
Identity Center uses that provider as its identity source: SAML for sign-in and SCIM to sync users and groups.
Assigning a permission set creates roles in each account. Users choose the least privileged role they need in the access portal.
The production app role assumes a role in the data account. Its own policy allows sts:AssumeRole, and the target role's trust policy trusts it.
The data role reads the bucket. Objects use SSE-KMS with a customer managed key whose key policy allows the role.
A third-party vendor assumes the audit role only by sending the external ID that the role's trust policy requires.
If an administrator in a member account tries to change the organization trail, the request fails: member accounts cannot change it, and SCPs cap even administrator roles.
Detalhes das caixas (5)
- Identity provider
The corporate directory stays the source of users and groups. With Active Directory, AD Connector forwards requests without caching the directory in AWS.
- Organizations
SCPs cap what principals in member accounts can do. They never grant access, and they do not restrict the management account.
- Control Tower
Preventive controls are enforced with SCPs; detective controls use Config rules and report noncompliance.
- Data role
Its trust policy names the production app role. The caller also needs sts:AssumeRole on this role's ARN.
- KMS key
A customer managed key, because objects encrypted with the AWS managed S3 key cannot be shared across accounts.
Da documentação da AWS (21)
- An organization's identity source defines where users and groups are managed; one source can be an Identity Center directory, Active Directory, or an external identity provider.
- An external identity provider uses SAML for authentication to the AWS access portal, and Identity Center grants access using its policies.
- SCIM 2.0 automatically synchronizes user and group information from an external identity provider to Identity Center.
- A permission set is a template of IAM policies used to assign users or groups access to AWS accounts.
- Assigning a permission set creates Identity Center controlled IAM roles in the accounts and attaches the specified policies; modifying the set updates the corresponding policies and roles.
- A user can have multiple permission sets and choose the least privileged role needed in the access portal.
- AD Connector redirects directory requests to an existing Active Directory without caching directory information in the cloud.
- AWS Control Tower applies controls (guardrails), which are preventive, detective or proactive rules, to the accounts in its landing zone.
- Preventive controls block actions that violate policy and use Organizations SCPs, RCPs, or declarative policies.
- Detective controls use Config rules to identify resource noncompliance and report it in the dashboard.
- An SCP limits the available permissions of principals in member accounts and never grants access.
- SCPs do not restrict the management account, but delegated administrator member accounts remain subject to them.
- Organization trails cover the management and member accounts and members cannot change the trail.
- CloudTrail log delivery requires an S3 bucket policy granting the service access; aws:SourceArn can restrict the grant to specific trails.
- A cross-account AssumeRole caller needs sts:AssumeRole permission on the target role ARN.
- The target role trust policy must trust the caller or its account for cross-account AssumeRole.
- AWS evaluates each side of a cross-account request separately with its applicable policy limits; both evaluations must allow access.
- An external ID helps prevent a vendor serving multiple customers from being tricked into using its authority for the wrong customer, the confused deputy problem.
- The customer trust policy requires the vendor principal and checks sts:ExternalId.
- A key policy is the resource permission document controlling who can manage or use its KMS key.
- Cross-account sharing of SSE-KMS objects requires a customer managed key rather than the AWS managed S3 key.
Container microservices on ECS and Fargate
Container questions describe several small services that must scale on their own, deploy without servers to manage, and survive tasks coming and going. The usual answer: one load balancer routing by path, stateless services on Fargate, state in managed stores, queues between services, and scaling policies per service.
How it works
- Images live in ECR. The task execution role pulls them and injects secrets; the task role gives the code its AWS permissions.
- An Application Load Balancer routes each path or host to the target group of one ECS service.
- Tasks are stateless: sessions and data live in DynamoDB, and files that every task shares live in EFS.
- Slow work goes through SQS to a worker service, which can run on Fargate Spot because a lost task only delays a message.
- Service Auto Scaling changes the desired task count: target tracking on CPU for web services, backlog per task for workers.
| Decision | Choose | When |
|---|---|---|
| Orchestrator | ECS | AWS-native orchestration with less to operate |
| Orchestrator | EKS | Kubernetes tooling and APIs are required |
| Compute | Fargate | No hosts to manage; CPU and memory per task |
| Compute | EC2 with a capacity provider | Instance-level control; ECS places tasks on the Auto Scaling group |
| Interruptible workers | Fargate Spot | Work can be retried; no automatic fallback to on-demand |
| Shared state | DynamoDB, ElastiCache, EFS | Any task must serve any request |
Exam cues
- If the question says containers without managing servers, think Fargate.
- If the question says existing Kubernetes manifests or tooling, think EKS.
- If the question says route paths to different services behind one endpoint, think ALB listener rules.
- If the question says sessions are lost when tasks scale in, think a shared session store, because stateless tasks can be replaced at will.
- If the question says a task cannot pull its image or read an injected secret, think the task execution role.
- If the question says scale workers on waiting messages, think backlog per task.
Remember
- Execution role: image pulls, logs, injected secrets. Task role: the application’s AWS calls.
- Fargate Spot gives a two-minute warning and no automatic on-demand fallback.
- Service Auto Scaling changes the desired task count; a capacity provider ties tasks to EC2 capacity.
Trap: Sticky sessions do not make a service stateless. If a task holding sessions is replaced, those users lose them; keep state in a shared store.
Each service's image lives in ECR. When a task starts, the execution role pulls the image and injects secrets from Secrets Manager.
The load balancer's listener rules route each path to the target group of the service behind it.
Services run as stateless Fargate tasks, with no servers to manage. Orders and session data live in DynamoDB, so any task can serve any request.
Catalog tasks mount a shared EFS file system for files that every task needs.
The orders service puts slow work on an SQS queue and answers at once; a worker service on Fargate Spot polls the queue and processes it.
Service Auto Scaling uses target tracking on average CPU to change the desired task count. The worker scales on queue backlog per task.
If Spot reclaims a worker task, the messages it did not delete become visible again after the visibility timeout, and another task retries them. A message received more than maxReceiveCount times moves to the dead-letter queue.
Detalhes das caixas (5)
- CloudWatch
Target tracking keeps average CPU near the target by changing the service's desired task count.
- ALB
Listener rules match path-pattern or host-header and forward to each service's target group.
- Orders service
The execution role pulls the image and injects secrets; the task role gives the code its AWS permissions.
- Worker service
Scales on backlog per task. Spot capacity gives a two-minute warning before interruption.
- SQS queue
Its redrive policy names the dead-letter queue and maxReceiveCount.
Da documentação da AWS (28)
- Amazon ECS is a fully managed container orchestration service for deploying, managing and scaling containerized applications.
- AWS Fargate runs containers without provisioning, configuring or scaling clusters of EC2 instances; you set CPU and memory per task.
- Amazon EKS is a fully managed Kubernetes service that removes the work of operating Kubernetes clusters.
- An EKS cluster can combine Auto Mode nodes, managed node groups, self-managed nodes, Fargate, and Hybrid Nodes.
- Amazon ECR is an AWS managed container image registry with private repositories controlled through IAM, and public repositories too.
- The execution role is used for Fargate ECR image pulls and awslogs delivery, and for referenced secrets.
- Injected Secrets Manager secrets require secretsmanager:GetSecretValue on the execution role.
- The ECS task role gives application code AWS API permissions; the execution role gives agents permissions for operations such as image pulls and log delivery.
- A load balancer receives client requests through listeners and uses listener rules to route them to registered targets in target groups.
- ALB conditions can match host-header, path-pattern, http-header, http-request-method, source-ip, and query-string.
- A stateless system keeps no session data on local disk or memory between requests, so servers can be replaced at will and any instance or Lambda function can serve any request, which allows horizontal scaling.
- AWS recommends storing session state in a shared backing store such as Amazon DynamoDB, Amazon RDS or Amazon ElastiCache, so the application scales across instances without losing sessions.
- Sticky sessions on an Application Load Balancer keep a client on one instance, but the session is lost if that instance fails and load can become uneven.
- ECS tasks on Fargate Linux platform 1.4.0 or later can mount shared persistent EFS file systems.
- Making interactions asynchronous, for example with Amazon SQS, AWS Step Functions, Amazon EventBridge or Amazon SNS, suits any request that only needs an acknowledgment rather than an immediate response.
- FARGATE_SPOT uses spare capacity and gives a two-minute interruption warning.
- Fargate does not automatically replace unavailable Spot capacity with on-demand capacity.
- If a received SQS message is not deleted before visibility timeout expires, it becomes available for another receive.
- ECS Service Auto Scaling uses Application Auto Scaling to change the desired number of service tasks.
- Target tracking chooses a metric target and manages the alarms and task-count adjustments automatically.
- ECS publishes service average CPU and memory metrics for scaling.
- SQS worker services can scale using a custom backlog-per-task metric.
- An Auto Scaling group capacity provider connects ECS task placement with EC2 instance capacity.
- AWS App2Container is a command line tool that packages supported applications running on servers into container images without requiring their source code.
- AWS App2Container stopped accepting new customers on November 7, 2025.
- AWS recommends AWS Transform for new modernization projects in its .NET modernization-tools availability notice.
- A dead-letter queue isolates source-queue messages that could not be processed successfully for diagnosis and later processing.
- A source queue RedrivePolicy identifies deadLetterTargetArn and maxReceiveCount; SQS moves a message when its receive count exceeds maxReceiveCount.
Cost-optimized batch processing
Cost questions about batch work give a nightly or event-driven workload, say it can be interrupted or must finish by morning, and ask for the cheapest design. The answer combines the right compute service, the right purchasing option for each part of the load, and storage classes that follow how the data is used.
How it works
- With EventBridge enabled on the input bucket, a rule submits a job to an AWS Batch job queue for each new file.
- The queue tries a Spot compute environment first and an On-Demand one next. A retry strategy reruns jobs that lose their Spot instance.
- A Compute Savings Plan covers the steady On-Demand baseline; Spot covers the flexible part.
- Results land in S3 Intelligent-Tiering. A lifecycle rule moves raw input to Glacier Deep Archive.
- Batch job status events go to EventBridge, so a rule alerts the team through SNS when a job fails.
| Need | Compute |
|---|---|
| Short tasks, up to 30 minutes | Lambda |
| Containerized jobs, scheduler managed for you | AWS Batch |
| Hadoop or Spark over large datasets | Amazon EMR |
| Containers with no instances to manage | Fargate |
| Load | Purchasing option |
|---|---|
| Interruptible, flexible start time | Spot Instances |
| Steady 24/7 baseline, may change instance family | Compute Savings Plans |
| Short, unpredictable, cannot be interrupted | On-Demand |
| Access pattern | Storage class |
|---|---|
| Unknown or changing | S3 Intelligent-Tiering |
| About once a month, millisecond access | S3 Standard-IA |
| Less than once a year, hours to restore | S3 Glacier Deep Archive |
Exam cues
- If the question says batch jobs that can be interrupted at the lowest cost, think Spot, because it is spare capacity at a steep discount.
- If the question says run containerized batch jobs without managing a scheduler, think AWS Batch.
- If the question says Spark or Hadoop, think EMR.
- If the question says a steady baseline across EC2, Fargate and Lambda, think Compute Savings Plans.
- If the question says access patterns are unknown, think S3 Intelligent-Tiering.
- If the question says keep data for years and rarely read it, think a lifecycle rule to Glacier Deep Archive.
Remember
- Lambda timeout: 1,800 seconds (30 minutes) at most.
- Spot: up to 90% off, two-minute interruption notice; design jobs to retry.
- Savings Plans and Reserved Instances: up to 72% off; Savings Plans are not tied to an instance configuration.
- Minimum storage durations: 30 days for the IA classes, 90 for Glacier Instant and Flexible Retrieval, 180 for Deep Archive.
Trap: Spot is the cheapest compute, but not for work that cannot be interrupted or retried. Put the steady, must-run part on a Savings Plan or On-Demand.
A Compute Savings Plan covers the steady part of the On-Demand usage at a lower rate.
Producers upload input files to an S3 bucket.
With EventBridge enabled on the bucket, a rule matches new objects and submits a job to the Batch job queue.
The queue tries the Spot compute environment first. Batch launches Spot instances from the least interrupted, lowest priced pools, and they pull the job image from ECR.
If the Spot environment cannot take the jobs, the queue tries the On-Demand environment next.
Jobs write results to a bucket in S3 Intelligent-Tiering, because nobody knows how often each result will be read.
A lifecycle rule moves raw input files to S3 Glacier Deep Archive once processing is done.
If Spot reclaims an instance, the retry strategy runs the job again. When a job still ends FAILED, Batch's status event matches an EventBridge rule that alerts the team through SNS.
Detalhes das caixas (5)
- Deep Archive
Lowest-cost class, retrieval in hours, 180-day minimum storage duration.
- Job queue
Tries its compute environments in ascending order: Spot first, then On-Demand.
- Spot instances
Uses SPOT_PRICE_CAPACITY_OPTIMIZED. Jobs have a retry strategy, because Spot capacity can be reclaimed with a two-minute notice.
- Output bucket
Results with unpredictable access: no retrieval fees, a small monitoring fee per object.
- Savings Plan
A Compute Savings Plan commits to a steady USD per hour of use and also applies to Fargate and Lambda.
Da documentação da AWS (27)
- AWS Batch runs batch computing workloads on AWS and removes the heavy lifting of configuring and managing the infrastructure, like traditional batch computing software.
- AWS Batch runs containerized jobs on Amazon ECS or Amazon EKS and scales capacity on EC2 instances (including Spot), Fargate or ECS Managed Instances.
- Amazon EMR is a managed cluster platform for running big data frameworks such as Apache Hadoop and Apache Spark.
- AWS Fargate runs containers without provisioning, configuring or scaling clusters of EC2 instances; you set CPU and memory per task.
- A Lambda function's timeout defaults to 3 seconds and can be set in 1-second steps up to 1,800 seconds (30 minutes).
- On-Demand Instances are paid by the second for the instances you launch, with no commitment.
- Spot Instances use spare EC2 capacity at steep discounts and suit applications that are flexible about when they run and can be interrupted, such as batch jobs, data analysis and background processing.
- Spot Instances are available at up to a 90% discount compared with On-Demand prices.
- EC2 Spot interruption notices are best effort: stop and termination notices give two minutes of warning, while a hibernation notice arrives as hibernation begins.
- Savings Plans can save up to 72% on compute; Compute Savings Plans apply regardless of instance family, size, OS, tenancy or Region, and also to AWS Fargate and AWS Lambda.
- Reserved Instances lower costs in exchange for a commitment to a consistent instance configuration, including instance type and Region, for 1 or 3 years; they are a billing discount, not physical instances.
- AWS recommends Savings Plans over Reserved Instances; both offer up to 72% off On-Demand, but Savings Plans don't tie you to an instance configuration.
- Enabling EventBridge on an S3 bucket sends all supported events to EventBridge, where rules select events and targets.
- Amazon SNS delivers messages from publishers to subscribers: publishers send to a topic, and every subscriber of the topic receives the message.
- S3 Intelligent-Tiering is for data with unknown, changing or unpredictable access patterns; it charges per-object monitoring and automation fees but no retrieval fees.
- S3 Glacier Deep Archive is for archives accessed less than once a year, with retrieval in hours and a 180-day minimum storage duration; it is the lowest-cost class.
- S3 Lifecycle rules schedule transitions or expiration for all objects in a bucket, or select a subset with filters such as a key prefix or object tags.
- Deleting, overwriting, or transitioning objects out of a class before its minimum storage duration can incur remaining-duration charges.
- EventBridge rules can send events to a Batch job queue as a target.
- Batch jobs wait in a job queue until they can be scheduled on a compute environment; for example, one queue can use On-Demand Instances for high-priority jobs and another Spot Instances.
- A job queue tries its compute environments for job placement in ascending order, so the one with the lower order value is tried first.
- The SPOT_PRICE_CAPACITY_OPTIMIZED allocation strategy picks Spot pools that are least likely to be interrupted and have the lowest price; AWS recommends it over SPOT_CAPACITY_OPTIMIZED in most cases.
- A Batch job gets one attempt by default; a retry strategy in the job definition or at submission allows 1 to 10 attempts, for failures such as a non-zero exit code or an EC2 instance failing or being terminated.
- AWS Batch sends an event to EventBridge whenever the status of a submitted job changes.
- S3 Standard-IA is for long-lived, infrequently accessed data (about once a month) with millisecond access, a 30-day minimum storage duration and per-GB retrieval fees.
- S3 Glacier Instant Retrieval is for archive data accessed about once a quarter that needs millisecond access, with a 90-day minimum storage duration.
- S3 Glacier Flexible Retrieval is for archives accessed about once a year, with retrieval in minutes to hours, a 90-day minimum, and objects restored before access.
Flashcards
Nada para revisar aqui agora. Escolha outros tópicos ou outro filtro.
·
Todos os 85 flashcards em lista
A web application on EC2 must survive the loss of an Availability Zone with no manual action. Which combination of load balancer and compute settings fits?
An Application Load Balancer with subnets in at least two AZs, in front of an Auto Scaling group that spans the same AZs.
The group replaces unhealthy instances and launches in the surviving zone.
A three-tier application on EC2 must let only the web tier reach the database tier, even as instances are added and removed. How should the database security group be written?
Allow the database port with the app tier security group as the source, not IP ranges.
The rule then covers every instance in that group, whatever its address.
Private EC2 instances in two Availability Zones share one NAT gateway in AZ A. What happens to internet access from AZ B if AZ A fails, and what is the fix?
AZ B loses outbound internet access. Create one NAT gateway per AZ and route each zone's private subnets to the NAT gateway in the same zone.
A company serves static images from an S3 bucket through CloudFront and wants the bucket closed to direct public access. What should it configure?
Origin access control (OAC) on the distribution, and a bucket policy that allows only that distribution. Block Public Access can stay on.
A three-tier web application uses Aurora and needs a database that keeps serving after an Availability Zone failure, with read capacity in the other zone. Which design fits?
An Aurora cluster with an Aurora Replica in another AZ. The replica serves reads and is the failover target, and the cluster volume already keeps copies in three AZs.
The domain example.com must point at a CloudFront distribution. Why does the team use a Route 53 alias record instead of a CNAME?
A CNAME is not allowed at the zone apex. An alias record can point example.com at the distribution.
Users of an Auto Scaling web tier are logged out whenever an instance is terminated. Which change fits a highly available three-tier design?
Move session state to a shared store such as ElastiCache (or DynamoDB), so any instance can serve any user.
A web application behind CloudFront receives SQL injection attempts and bursts of requests from a few IP addresses. What should block them before they reach the origin?
An AWS WAF web ACL on the CloudFront distribution, with rules for SQL injection and request rates.
A company wants baseline DDoS protection for a public web application without paying for an extra service. What does it get, and which front end helps?
Shield Standard protects every customer automatically at no extra cost. Serving through CloudFront and Route 53 absorbs attacks at edge locations.
A web application needs HTTPS certificates on CloudFront and on its Application Load Balancer that renew without manual work. Which service fits?
AWS Certificate Manager (ACM): it issues and renews certificates and deploys them to integrated services such as CloudFront and Elastic Load Balancing.
An Amazon RDS DB instance was created without encryption, and compliance now requires encryption at rest. Can the team turn it on in place?
No. Copy a manual snapshot with encryption enabled and restore it (or use a blue/green deployment with an encrypted green environment). The KMS key is chosen at creation.
An Auto Scaling group behind an ALB should keep average CPU near 50 percent as traffic changes, without hand-built alarms. Which scaling policy fits?
A target tracking policy on average CPU with a target of 50. It adjusts capacity and manages its own CloudWatch alarms.
A serverless REST API in API Gateway must accept only users who signed in to the company's web app, with no custom authorization code. Which option fits?
A Cognito user pool authorizer on the API. Users sign in to the user pool and send its token with each request.
An order API on Lambda must notify billing, email and analytics services, and new consumers keep being added. How can the API stay unchanged as consumers grow?
Publish an event to an EventBridge event bus and give each consumer its own rule and target.
The producer never calls consumers directly.
A Lambda function that consumes an SQS queue calls a legacy database that fails under more than 20 parallel connections. How can the team cap the load without slowing the API that fills the queue?
Set maximum concurrency on the SQS event source mapping. Messages wait in the queue instead of reaching the database all at once.
Some messages in an SQS queue fail processing every time and are retried again and again. Which feature isolates them for debugging?
An SQS dead-letter queue. Messages that fail repeatedly move there for debugging. It must be in the same account and Region as the source queue.
A serverless order flow must charge a card, reserve stock and ship, with retries and a visible state per order. Which service coordinates the steps?
AWS Step Functions. A workflow (state machine) runs each step and shows where every execution is.
A new serverless application on DynamoDB has unpredictable traffic and no capacity estimate. Which throughput mode fits?
On-demand, the default and recommended mode for most workloads. There is no capacity to plan.
A serverless API in API Gateway (REST) receives SQL injection attempts. Can AWS WAF protect it directly, without CloudFront in front?
Yes. A regional AWS WAF web ACL can be associated with an API Gateway REST API.
Failed order messages pile up in an SQS dead-letter queue for days before anyone notices. What should the team add?
A CloudWatch alarm on the dead-letter queue's
ApproximateNumberOfMessagesVisiblemetric, so the team is notified as soon as messages arrive.Some requests through API Gateway and Lambda are slow, and the team must see which downstream call causes it, request by request. What fits?
AWS X-Ray with Active tracing on the Lambda functions, which records each sampled request's path and timing.
A Lambda function processes SQS messages in batches of ten. When one message fails, all ten are retried. How can only the failed message be retried?
Report partial batch failures from the function, returning only the failed message IDs, so successful messages are not processed again.
A company needs its application to keep answering requests within minutes of a Region failure, at lower cost than running two full Regions. Which DR strategy fits?
Warm standby: a scaled-down but fully working copy runs in the DR Region, takes traffic at once and scales out.
In the DR Region, the databases are replicated and running but no application servers can serve traffic until they are started. Which strategy is this, and how does warm standby differ?
Pilot light. Warm standby keeps the application running at reduced capacity, so it handles traffic immediately.
Traffic must go to the primary Region and switch to a DR Region automatically when the primary endpoint is unhealthy. Which Route 53 configuration fits?
Failover routing (active-passive) with a health check on the primary record and a secondary record for the DR Region.
An Aurora MySQL database must be readable in a second Region and promotable there during a regional outage. Which feature fits?
Aurora Global Database: one primary Region for writes and up to 10 read-only secondary Regions kept in sync.
A multi-Region application must accept writes in every Region with low local latency. Which database feature fits better than Aurora Global Database?
DynamoDB global tables, which are multi-active: every replica Region takes reads and writes. An Aurora global database writes only in its primary Region.
A DR plan replicates S3 objects to another Region, but a bad batch job just overwrote thousands of objects, and the overwrites replicated too. What protects against this?
Versioning on the buckets, so earlier versions can be restored. Replication alone copies corruption as well.
How can a team keep the DR Region's infrastructure identical to production as production changes?
Define it once in CloudFormation and deploy the same template to both Regions (and accounts), for example with a StackSet.
A company runs a planned DR test that moves its Aurora global database to the DR Region and must lose no data. Which operation fits?
Switchover (formerly managed planned failover): it synchronizes the secondary before changing the primary Region, with RPO zero.
The primary Region of an Aurora global database is down. The team runs managed failover. Can recent writes be lost?
Yes. Managed failover does not wait for synchronization, so writes still in asynchronous replication can be lost. Only a switchover guarantees RPO zero.
After an Aurora global database fails over to the DR Region, must the application change the database hostname it writes to?
No, if it uses the global writer endpoint: the name stays the same and points to the new primary. The application must pick up the DNS change before writing again.
Besides live replication, a company needs point-in-time backups of its databases stored in the DR Region, in case corrupted data replicates. What fits?
An AWS Backup plan with a copy action to a vault in the DR Region. The first copy is full; later copies are generally incremental.
A company with 30 VPCs in several accounts and one data center wants a single place to route between all of them instead of a mesh of peering connections. Which service fits?
AWS Transit Gateway, a hub that VPC, VPN and Direct Connect gateway attachments connect to. Share it across accounts with AWS RAM.
How does a Direct Connect connection reach many VPCs that are attached to a transit gateway?
Create a transit virtual interface to a Direct Connect gateway, and associate that gateway with the transit gateway.
A company wants a low-cost backup for its single Direct Connect connection. What fits, and which path carries traffic while both are up?
A Site-to-Site VPN as backup. For identical prefixes, the Direct Connect routes are preferred while the connection is healthy.
Production and development VPCs share one transit gateway, and both need the shared services VPC but must never reach each other. How is that done?
Use separate transit gateway route tables: associate each VPC with a table that has routes to shared services and on premises, but not to the other environment.
Servers in a data center must resolve names in a Route 53 private hosted zone, and EC2 instances must resolve corporate names. Which Route 53 Resolver setup fits?
An inbound endpoint for queries from on premises, and an outbound endpoint with forwarding rules for queries to corporate DNS.
A security team assumes traffic over Direct Connect is encrypted. Is it?
No. Direct Connect does not encrypt traffic by default. A Private IP Site-to-Site VPN over the connection adds IPsec encryption without public IP addresses.
A company's only Direct Connect connection is a single point of failure for critical workloads. What gives maximum resiliency for the private path?
Separate connections ending on separate devices in more than one Direct Connect location.
VPC A is peered with VPC B, and VPC B with VPC C. Can instances in VPC A reach VPC C through VPC B?
No. Peering is not transitive. Peer A with C directly, or attach all three to a transit gateway.
Ten workload accounts must resolve corporate domain names through one outbound endpoint in a shared services account. How do the rules reach their VPCs?
Share the Resolver forwarding rules through AWS RAM, then associate them with each VPC.
Clickstream JSON arrives through a Kinesis data stream and must land in S3 in a format that makes Athena queries cheaper and faster, with no code to write. Which design fits?
A Data Firehose stream reading the Kinesis stream, with record format conversion to Parquet using a Glue Data Catalog schema.
Analysts need ad hoc SQL on terabytes of log files in S3 without loading them into a database or managing servers. Which service fits?
Amazon Athena: standard SQL directly on S3, serverless, paid per query.
New partitions and files keep arriving in an S3 data lake, and Athena tables must stay current without manual DDL. What keeps the catalog up to date?
An AWS Glue crawler, which creates and updates Data Catalog tables for the data it crawls.
Different analyst teams may see only certain columns of data lake tables in S3. Which service manages that access centrally?
AWS Lake Formation, whose permissions add fine-grained access on top of IAM for S3 data and Glue Data Catalog tables.
A Redshift warehouse must join its tables with years of historical data kept in S3, without loading that data. Which feature fits?
Redshift Spectrum, which queries files in S3 directly.
Business users need dashboards over data lake queries that already run in Athena. Which service fits?
Quick Sight, with Athena as its data source.
Each clickstream event must trigger a fraud check within seconds, and the same events must also land in S3 for analytics. Which design fits?
A Kinesis data stream with two consumers: Lambda through an event source mapping for the real-time check, and Data Firehose for delivery to S3.
A team plans to run per-event alerts from Data Firehose because it already reads the stream. Why is that a poor fit?
Firehose buffers records and delivers when the size or interval hint is met, so it suits loading data, not reacting to each event. Use a stream consumer such as Lambda.
Logs only need to reach S3 as Parquet; nothing reads them in real time. What is the simplest ingestion?
Send records straight to Data Firehose with Direct PUT (PutRecord or PutRecordBatch). A Kinesis data stream is not needed.
Some JSON records fail Parquet conversion in Firehose. What happens to them?
Firehose writes them to an S3 error prefix. If that write fails too, it retries indefinitely and blocks further delivery.
Analysts with Athena and S3 permissions get access denied when querying a data lake encrypted with a KMS customer managed key. What is missing?
kms:Decrypt permission on the key used to encrypt the data.
Raw event files older than 90 days are rarely queried but must be kept cheaply. What handles that automatically?
An S3 Lifecycle rule that transitions them to a cheaper storage class, or expires them when no longer needed.
A company with 40 AWS accounts wants employees to sign in once with the corporate identity provider and get role-based access to each account. Which design fits?
IAM Identity Center with the corporate provider as its identity source (SAML sign-in, SCIM sync) and permission sets assigned to groups per account.
An SCP attached to an OU allows all S3 actions. A user in a member account has no IAM policy. Can the user read S3?
No. An SCP only limits the permissions available in member accounts and never grants access. The user still needs an IAM policy that allows it.
A deny-all-except-approved-Regions SCP is attached to the organization root. Does it stop an administrator in the management account from using another Region?
No. SCPs do not restrict the management account. Keep workloads out of it, and use member accounts that the SCP does cover.
An application in account A must read data in account B through a role. What must be in place on each side?
In account A, a policy allowing sts:AssumeRole on the role's ARN. In account B, a role whose trust policy trusts account A or its role. Both sides must allow it.
A monitoring vendor serving many customers needs a role in a company's account. How does the company stop another customer from tricking the vendor into using that role?
Require an external ID in the role's trust policy (sts:ExternalId condition). This protects against the confused deputy problem.
Objects in a bucket are encrypted with the AWS managed S3 KMS key, and another account must read them. What has to change?
Encrypt with a customer managed KMS key whose key policy allows the other account. The AWS managed key cannot be used for cross-account sharing.
In a Control Tower landing zone, which controls block noncompliant actions, and which only report them?
Preventive controls block actions, using SCPs and similar policies. Detective controls use Config rules to find and report noncompliant resources.
Security wants API activity from every account in one place, and member accounts must not be able to turn logging off. What fits?
An organization trail delivering to a central bucket in a log account, with a bucket policy that grants CloudTrail access. Member accounts cannot change it.
Users must sign in to AWS with their existing on-premises Active Directory accounts, and no directory data may be cached in the cloud. What fits?
AD Connector, which redirects directory requests to the existing Active Directory without caching it in AWS.
A team wants to run containers without provisioning, patching or scaling EC2 hosts, setting only CPU and memory per task. Which launch option fits?
AWS Fargate with Amazon ECS (or EKS).
A company already runs Kubernetes on premises and wants the same tooling and APIs on AWS without operating the control plane. What fits?
Amazon EKS, a managed Kubernetes service. Its pods can run on managed node groups, Fargate or other compute options.
Container tasks keep user sessions in memory, so users lose their session when tasks scale in. What fixes this?
Make the tasks stateless: keep session data in a shared store such as DynamoDB or ElastiCache, so any task can serve any request.
One Application Load Balancer must send /orders to one ECS service and /catalog to another. How?
Listener rules with path-pattern conditions, each forwarding to the target group of one service.
An ECS task fails to start because it cannot read a database password from Secrets Manager, although the task role allows it. What is wrong?
Injected secrets are read by the task execution role, which needs secretsmanager:GetSecretValue. The task role only covers calls from the application code.
An ECS service should add tasks when average CPU rises and remove them when it falls, with no alarms to manage by hand. What fits?
Service Auto Scaling with a target tracking policy on average CPU. It changes the desired task count and manages the alarms.
A queue worker on ECS should scale with the amount of waiting work, not CPU. Which metric fits?
A custom backlog per task metric: messages waiting divided by running tasks.
Interruptible queue workers on ECS must cost as little as possible. Which capacity fits, and what happens if Spot capacity is unavailable?
FARGATE_SPOT, which gives a two-minute warning before interruption. Fargate does not fall back to on-demand on its own.
A worker task is stopped while processing an SQS message it has not deleted yet. Is the message lost?
No. After the visibility timeout expires, the message becomes available again and another task processes it, so processing must tolerate repeats. A message that keeps failing moves to a dead-letter queue after maxReceiveCount receives.
A company wants to package existing Java and ASP.NET applications into container images without their source code. Which tool was built for this, and what does AWS recommend for new projects?
AWS App2Container packages such applications into images for ECS or EKS. It stopped accepting new customers on November 7, 2025, and AWS points new projects to AWS Transform.
Thousands of containerized jobs run every night, and the team does not want to install a scheduler or size the cluster. Which service fits?
AWS Batch, which provisions compute for submitted jobs and runs them on EC2 (including Spot), Fargate or ECS Managed Instances.
Batch jobs can be interrupted and rerun, and cost matters more than finishing at a fixed time. Which EC2 purchasing option fits?
Spot Instances: spare capacity at up to 90% off On-Demand, suited to interruptible work such as batch jobs.
A workload runs a steady baseline 24/7 on EC2, Fargate and Lambda, and instance families may change next year. Which commitment fits?
A Compute Savings Plan: a USD-per-hour commitment for 1 or 3 years that applies across instance families, Regions, Fargate and Lambda.
Why does AWS recommend Savings Plans over Reserved Instances for most new commitments?
Both give up to 72% off, but Reserved Instances tie the discount to an instance configuration and Region, while Savings Plans do not.
Batch jobs on Spot sometimes fail when an instance is reclaimed. How can they rerun automatically?
Set a retry strategy on the job definition or submission: 1 to 10 attempts, covering failures such as an instance being terminated.
Which AWS Batch allocation strategy does AWS recommend for most Spot compute environments?
SPOT_PRICE_CAPACITY_OPTIMIZED, which picks the pools least likely to be interrupted and with the lowest price.
A job takes 40 minutes per file. A team proposes Lambda triggered by S3 uploads. Why will that fail, and what fits?
A Lambda function times out after at most 1,800 seconds (30 minutes). Run long jobs on AWS Batch or containers instead.
Nightly processing runs Apache Spark over terabytes of data. Which managed service fits better than AWS Batch?
Amazon EMR, a managed cluster platform for big data frameworks such as Hadoop and Spark.
Output files are read heavily for some customers and never for others, and nobody can predict which. Which storage class fits?
S3 Intelligent-Tiering, built for unknown or changing access, with monitoring fees but no retrieval fees.
Raw input files must be kept for 7 years, are almost never read, and a restore can take hours. How are they stored most cheaply?
An S3 Lifecycle rule that transitions them to S3 Glacier Deep Archive, the lowest-cost class.
A lifecycle rule moves files to Glacier Deep Archive, and another rule deletes them 30 days later. Why is the bill higher than expected?
Deep Archive has a 180-day minimum storage duration. Deleting earlier still charges for the remaining days.
The operations team must be alerted when a Batch job finally fails. What fits with no polling?
Batch sends job status change events to EventBridge; a rule matching FAILED jobs sends the event to an SNS topic.