RQ

AWS

1 note17,065 words78 min read

SAA-C03 practice exams →

Contents

SAA-C03 Study Notes

These are the notes I put together while preparing for the AWS Certified Solutions Architect – Associate (SAA-C03) exam, organized by the exam’s four domains. Each section starts with how things work and the rules for choosing between options, then gives comparison tables and a “question signals” cheat sheet, and ends with a few practice questions (answers are collapsed under each question). For full-length timed practice, there are also 8 practice exams.

Exam overview

Item Details
Questions and time 65 questions, 130 minutes (15 are unscored, but you don’t know which)
Format Single answer, or multiple answer (the question says Choose two / three)
Passing score 720 / 1000 (scaled)
Domain 1 Design Secure Architectures 30%
Domain 2 Design Resilient Architectures 26%
Domain 3 Design High-Performing Architectures 24%
Domain 4 Design Cost-Optimized Architectures 20%

How to approach questions

  1. Mark the constraint words first, then read the options. Common ones: UDP, shared, across AZs, least operational overhead, most cost-effective, guarantee / prevent, without changing code, single-tenant.
  2. Eliminate what can’t work. An unsupported protocol, a feature the service doesn’t have, a single point of failure: cross those options out right away.
  3. Prefer managed over self-built. “Least operational overhead” almost always means the managed or serverless option.
  4. Pick the cheapest option that meets the requirements, and don’t pay for needs the question didn’t mention.
  5. prevent / guarantee → preventive controls (SCP, Block Public Access, encryption settings); detect / notify → detective controls (Config, GuardDuty, Macie).

AWS services change quickly. For numbers in these notes (quotas, limits, discounts), the AWS documentation is the source of truth.


Domain 1: Design Secure Architectures (30%)

Domain 1 carries the most weight of the four. It has three parts: 1.1 Access control (IAM) · 1.2 Workload security (VPC and security services) · 1.3 Data security (encryption and retention)


1.1 Access control (IAM)

How IAM evaluates a request (simplified, single account)

API request
  → Explicit Deny?                 Yes → deny
  → SCP allows?                    No  → deny
  → Permission boundary allows?    No  → deny
  → An Allow exists?               No  → implicit deny
  → Access allowed

Two rules are enough to remember:

  1. An explicit Deny always wins.
  2. No explicit Allow means deny (implicit deny).

Concepts that are easy to mix up

Concept Scope Key point Question signal
IAM user One person or application Long-term credentials (password, access key) Usually not the best answer
IAM role Assumed by users or services Temporary credentials, no stored keys EC2/Lambda accessing AWS services, cross-account
Identity policy Attached to a user, group or role What this identity can do Granting permissions to an identity
Resource policy Attached to a resource (e.g. an S3 bucket) Who can access this resource Letting another account access a resource
Permission boundary A single user or role Sets a ceiling, grants nothing Developers may create roles but can’t escalate
SCP Organization, OU or account Sets a ceiling, grants nothing Restrict a whole account or OU, admins included

Who is accessing: three identity entry points

Who What to use Question signal
Employees using the AWS console and APIs IAM Identity Center, or SAML 2.0 federation (AD groups mapped to IAM roles) Existing AD or IdP, no second set of accounts, thousands of employees
End users of an app you build Cognito user pool: sign-up, sign-in, MFA, issues a JWT after sign-in Sign-up and sign-in for a web or mobile app, only paying users can sign in
App end users calling AWS services directly Cognito identity pool: exchanges a user for temporary AWS credentials (an IAM role) App uploads straight to S3, reads DynamoDB directly

Memory hook: the user pool answers “who are you” (authentication); the identity pool answers “which AWS resources can you use” (authorization). Employees don’t use Cognito.

Details that come up often

  • SCPs don’t affect the management account, but they restrict member accounts, including their root user.
  • SCPs and permission boundaries only set ceilings; they grant nothing. Effective permissions are the intersection of the layers, and an Allow in an IAM policy can’t exceed the ceiling.
  • Cross-account access usually needs both sides to allow it. For assume role: account A needs permission to call sts:AssumeRole, and the role’s trust policy in account B must trust A.
  • A role has two policies: the permission policy decides what the role can do; the trust policy decides who can assume it. Cross-account questions are almost always about the trust policy. A central account reading data from many accounts → each account creates a role that trusts the central account’s role, and the app assumes into them (role chaining).
  • How compute services get permissions: EC2 → instance profile (one role per instance); ECS → task role; EKS Pods → IRSA or EKS Pod Identity; Lambda → execution role. If EKS policies sit on the node’s instance role, every Pod gets every permission, and Kubernetes RBAC can’t control AWS permissions.
  • Prefer roles over long-term access keys, and never use root access keys.
  • IAM roles can’t be attached to user groups. Groups only take policies; roles are assumed by things that need a temporary identity, like EC2, Lambda or other accounts.
  • Check who an SCP is attached to: to restrict only non-production accounts, attach the SCP to those accounts, or to the OU that contains them.
  • Permission boundaries prevent privilege escalation: add an iam:PermissionsBoundary condition to the developers’ policy so roles can be created only with the specified boundary attached, then Deny deleting or changing that boundary.

Lambda calling other services: don’t mix up the two policies

Execution role Resource-based policy
Controls Whose identity the function uses when it calls other services Who can invoke the function (S3 or API Gateway triggering it)
Function needs to read S3 or decrypt with KMS Permissions go here Not involved

When the target resource has its own policy (a KMS key policy, an S3 bucket policy), both sides must allow it: the execution role has the IAM permission, and the key policy also grants that role. IAM policies attach to identities; they can’t be attached to a Lambda function directly.

Multi-account governance

Service What it does Question signal
Organizations Groups accounts (OUs), SCPs, consolidated billing Central restrictions and billing across accounts
Control Tower Builds a landing zone on top of Organizations: an organization-wide CloudTrail, Log Archive and Audit accounts, guardrails, Account Factory. Must be set up in the management account Many accounts, consistent compliance, new accounts compliant automatically
AWS RAM Shares resources with other accounts: subnets (VPC sharing), Transit Gateway, Resolver rules, customer managed prefix lists Other accounts placing resources in my VPC, central network management; security groups in many accounts using the same CIDRs

VPC sharing splits the work: the network account owns the VPC, subnets and route tables; application accounts launch their own EC2 and RDS into the shared subnets but can’t change the VPC configuration.


1.2 Workload security

Security layers in a typical three-tier architecture

Internet
  ↓
Shield + WAF (edge protection, attaches to CloudFront, ALB, API Gateway)
  ↓
┌──────────────────────────── VPC ────────────────────────────┐
│ Public subnet  [NACL]  ALB      SG: allow 443                  │
│   ↓                                                            │
│ Private subnet [NACL]  EC2 app  SG: allow only the ALB's SG    │
│   ↓                                                            │
│ Private subnet [NACL]  RDS      SG: allow only the app tier SG │
└──────────────────────────────────────────────────────────────┘

“The website is behind an ALB” means traffic reaches the ALB first and the ALB forwards it to the servers. The ALB faces the internet; the EC2 instances sit behind it, usually in private subnets.

User → Internet → WAF inspection → ALB → EC2 (website)

Security group vs NACL

Security group NACL
Where Attached to an ENI, protects the instance Attached to a subnet, protects the subnet boundary
State Stateful: return traffic is allowed automatically Stateless: inbound and outbound both need rules
Rules Allow only Allow and Deny
Evaluation All rules evaluated In number order, stops at the first match
Source Can reference another security group CIDR only

What comes up most:

  • Block a specific IP → NACL, because security groups can’t Deny. The Deny rule needs a lower number than the Allow rule that would let the traffic in.
  • NACLs are stateless, so outbound must allow ephemeral ports (usually 1024–65535) or responses can’t get back.
  • Auto Scaling or changing IPs → reference a security group. The rule matches membership in the group, so new instances get access as soon as they join it.

Security services that are easy to mix up

Service Purpose Question signal
WAF Layer-7 filtering SQL injection, XSS, rate limiting (rate-based rules), filtering by country or IP
Shield DDoS protection Standard is on automatically; Advanced adds stronger protection and a response team
GuardDuty Analyzes logs to detect threats Unusual API calls, suspicious traffic, compromised accounts
Inspector Vulnerability scanning CVEs in EC2, container images, Lambda
Macie Finds sensitive data in S3 PII in S3
Network Firewall Stateful inspection and IPS at the VPC boundary, can filter by domain Outbound allowed only to specific domains, IPS/IDS, Suricata rules
Route 53 Resolver DNS Firewall Blocks DNS queries Blocking malicious domains at the DNS layer only
AWS Config Records each resource’s configuration and changes, checks compliance with rules Security groups must not open 22 to 0.0.0.0/0, configuration history, compliance checks
Security Hub Aggregates findings and compliance checks from other services One view of security findings
Security Lake Centralizes security logs for the whole organization in S3, normalized to OCSF Central collection and analysis of security data with minimal development
Cognito App user sign-in Sign-up and sign-in for web or mobile apps (see the three identity entry points above)
VPC Flow Logs Records traffic metadata per network interface: source and destination IP, port, ACCEPT or REJECT Troubleshooting connectivity, analyzing unusual traffic; can be sent only to CloudWatch Logs, S3 or Firehose, not CloudTrail
Secrets Manager Manages secrets Database passwords, especially with automatic rotation
  • CloudTrail vs Config: CloudTrail records who called which API (behavior); Config records how a resource is configured and whether it’s compliant (state).
  • Prefix list: a named set of CIDRs that security group rules can reference; change it once and every rule that uses it updates. Ones you create are customer managed prefix lists and can be shared through RAM; AWS managed prefix lists (such as S3 or CloudFront IP ranges) can’t be created or changed by you.
  • WAF attaches only to CloudFront, ALB, API Gateway, AppSync and Cognito. It inspects inbound HTTP requests only and can’t sit on a NAT gateway to control outbound traffic.
  • Notifying people about findings: Macie / GuardDuty findings → EventBridge rule filter → SNS email or SMS. SQS is for programs to poll; people won’t receive it.

Signing in to instances without open ports: Session Manager

EC2 (SSM Agent) ──outbound HTTPS 443──→ Systems Manager ←── Administrator
  • No port 22, no bastion host, no SSH keys, and sessions can be logged to S3 or CloudWatch Logs for auditing.
  • Two prerequisites: the instance role has AmazonSSMManagedInstanceCore, and the instance can reach the service (NAT, or the three interface endpoints ssm, ssmmessages and ec2messages).

1.3 Data security

Encryption in two places

User
  ↓  In transit: HTTPS / TLS, certificates from ACM
CloudFront / ALB / application
  ↓
At rest: keys managed by KMS, usage auditable in CloudTrail
  → S3 / EBS / RDS

Four ways to encrypt S3

Method Who manages the key Question signal
SSE-S3 AWS, entirely Encryption is all that’s required, simplest
SSE-KMS KMS Audit key usage, control the key policy or rotation
SSE-C You supply the key, AWS encrypts and decrypts The company must hold the keys itself
Client-side You encrypt before uploading AWS must never see plaintext

Details that come up often:

  • Enforce HTTPS: in the bucket policy, deny requests where aws:SecureTransport is false.
  • SSE-KMS at high request rates: heavy traffic can hit KMS quotas; S3 Bucket Keys cut KMS calls and also save money.

KMS key types

Type Control When to use
AWS owned key Fully managed by AWS, invisible to you Default encryption, no control needed
AWS managed key Managed by AWS, visible and auditable, key policy can’t be changed Easy, but you want to see usage
Customer managed key You control the key policy, rotation and disabling Compliance requirements, or cross-account sharing
  • Using encrypted data across accounts: besides IAM permissions, the key policy must also grant the other account.
  • Data must move across Regions: consider a multi-Region key.
  • KMS vs CloudHSM: a customer managed key only means you control the key policy; underneath it’s still an AWS-operated multi-tenant service. The question says single-tenant, dedicated HSM, exclusive company control, AWS can’t touch the keys → CloudHSM (you manage the cluster and its availability).

Encrypting existing resources

Existing EBS volumes and RDS instances can’t be encrypted in place. The process is the same for both:

Create a snapshot → encrypt while copying the snapshot → restore a new resource from it → switch over

Note: you can’t create an encrypted read replica from an unencrypted RDS instance.

Which Region the ACM certificate goes in

Used by Certificate Region
ALB The same Region as the ALB
CloudFront us-east-1

With CloudFront in front of an ALB in another Region, you usually need two certificates.

Public vs private certificates: internet-facing sites use ACM public certificates, free, auto-renewing and trusted by browsers; internal services and device authentication use private certificates from AWS Private CA, billed monthly and not trusted by browsers.

CloudFront access control

S3 reachable only through CloudFront → OAC: the bucket stays private and the bucket policy allows only this distribution. The origin must be the S3 REST endpoint; the static website endpoint doesn’t support OAC. OAI is the legacy approach.

CloudFront signed URL CloudFront signed cookie S3 presigned URL
Path Through CloudFront Through CloudFront Directly to S3
Covers One file Many files One object
Changes the URL? Yes No Yes
Use case A single download Video segments, a whole paid area Uploads or downloads that skip the CDN

Stop users from bypassing CloudFront to reach the ALB directly: allow only CloudFront’s managed prefix list in the ALB’s security group; or add a custom header at the origin and have the ALB accept only requests with it; or use a VPC origin to put the ALB in a private subnet.

Preventing public S3 buckets

  • Account-level Block Public Access governs every bucket in the account and overrides bucket-level settings.
  • Admins could turn it off themselves, so also use an SCP that denies s3:PutAccountPublicAccessBlock. New buckets have Block Public Access on by default.

Data retention: S3 Object Lock

Requirement Choice
Nobody (root included) can delete or shorten retention Compliance mode
Protected, but users with special permission (s3:BypassGovernanceRetention) can override; testing retention settings Governance mode
No end date, e.g. litigation hold Legal Hold
An immutable policy at the Glacier vault level Glacier Vault Lock
Just “prevent accidental deletion” Versioning + MFA Delete

Question signals

Signal in the question Think first of
Restrict a whole account or OU, admins included SCP
Developers create their own roles without escalating Permission boundary
EC2 or Lambda accessing AWS services, cross-account IAM role, temporary credentials
Block a specific IP NACL
Auto Scaling, changing IPs Reference a security group
SQL injection, XSS, rate limiting WAF
DDoS Shield
Audit key usage, control the key policy SSE-KMS + customer managed key
Encrypt an existing resource Snapshot, encrypt on copy, restore
CloudFront certificate us-east-1
Many accounts, new accounts compliant automatically Control Tower
Other accounts placing resources in my VPC AWS RAM (VPC sharing)
Compliance checks, configuration history AWS Config
Outbound filtering by domain, IPS Network Firewall
No port 22, no bastion host Session Manager
Single-tenant HSM, AWS can’t touch the keys CloudHSM
S3 reachable only through CloudFront OAC + private bucket
Temporary access to many files without changing URLs CloudFront signed cookie

Practice questions

1.1 Access control

Q1. A developer’s IAM policy allows s3:*, but the SCP on their OU allows only ec2:*. Can they read S3? Why?

Answer

No. The SCP is the ceiling for the account and allows only ec2:*. s3:* is outside it, so the request is denied at the SCP step. An Allow in the IAM policy can’t exceed that ceiling.

Q2. The company must make sure no member account can turn off CloudTrail, account administrators included. What’s the best approach?

  • A. Attach a Deny policy to each administrator
  • B. Use an SCP to deny cloudtrail:StopLogging
  • C. Set a permission boundary on every IAM user
  • D. Turn on MFA for the root user
Answer

B. “Every member account” plus “administrators included” points to an SCP.

  • A: An administrator with enough permissions can delete the Deny policy.
  • C: A permission boundary can’t restrict a member account’s root user, and it’s per-identity, not account-level.
  • D: MFA strengthens sign-in but doesn’t limit what you can do afterwards.

Q3. An application on EC2 in account A needs to read an S3 bucket in account B. What’s the best approach?

  • A. Create an IAM user in account B and put its access key on the EC2 instance
  • B. Make the bucket public and allow only account A’s IP
  • C. Give EC2 an instance role and grant access through a cross-account role or a bucket policy
  • D. Store account B’s root access key in Secrets Manager
Answer

C. The instance role provides temporary credentials, and a cross-account role or bucket policy grants access, with no long-term keys stored. A and D rely on long-term credentials (D even uses the root key); B makes the data public.

1.2 Workload security

Q4. EC2 runs in a public subnet with no ALB. You need to block a malicious IP. What should you do?

  • A. Add a Deny rule to the security group
  • B. Add a Deny rule to the NACL
  • C. Turn on Shield Standard
  • D. Turn on GuardDuty
Answer

B. Security groups only have Allow rules, so A isn’t possible; Shield Standard and GuardDuty can’t block a specific IP either. NACLs match in number order, so the Deny rule needs a lower number than the Allow rule that would let this traffic in.

Q5. The app tier runs in an Auto Scaling group and instance IPs change often. RDS must accept connections only from the app tier. What’s the best configuration?

  • A. Manually add each instance’s IP to the RDS security group
  • B. Move RDS to a public subnet and restrict it with a NACL
  • C. Set the RDS security group’s inbound source to the app tier’s security group
  • D. Protect RDS with WAF
Answer

C. The signal is “instance IPs change often”. With manual IPs, new instances launched by Auto Scaling aren’t in the rules and can’t reach the database, so every scaling event means editing rules. With the app tier’s security group as the source, the rule checks group membership, and new instances get access as soon as they join.

Q6. A website behind an ALB is hit by SQL injection, and you also need to rate-limit requests per IP. What should you use?

  • A. Shield Advanced
  • B. GuardDuty
  • C. Inspector
  • D. WAF
Answer

D. SQL injection and per-IP rate limiting are classic WAF use cases; rate limiting maps to a WAF rate-based rule. With WAF associated with the ALB, malicious requests are stopped before they reach EC2.

1.3 Data security

Q7. The company wants to encrypt S3 data, audit every use of the key, and control the key policy itself. Which option?

  • A. SSE-S3
  • B. SSE-KMS + customer managed key
  • C. SSE-C
  • D. Turn on S3 Versioning only
Answer

B. “Audit every key use” plus “control the key policy”: only a customer managed key does both. SSE-S3 shows no key usage records; with SSE-C you hold the key, but there’s no KMS auditing or key policy.

Q8. An existing RDS instance isn’t encrypted and now must be. How?

  • A. Modify the instance and turn on encryption
  • B. Create an encrypted read replica, then promote it
  • C. Create a snapshot, encrypt it while copying, then restore a new instance
  • D. Add a rule to the RDS security group
Answer

C. B is the common trap: you can’t create an encrypted read replica from an unencrypted RDS instance. The only route is snapshot → encrypted copy → restore.

Q9. The ALB is in ca-central-1 with CloudFront in front, and users connect over HTTPS on a custom domain. Where does CloudFront’s ACM certificate go?

  • A. ca-central-1
  • B. us-east-1
  • C. Any Region
  • D. CloudFront doesn’t need a certificate
Answer

B. CloudFront certificates must be in us-east-1, whatever the origin’s Region. The ALB’s own certificate goes in ca-central-1, so this architecture needs two certificates.


Domain 2: Design Resilient Architectures (26%)

Domain 2 has two parts: 2.1 Scalable and loosely coupled (messaging, load balancing, compute) · 2.2 Highly available and fault tolerant (disaster recovery, database HA, Route 53)


2.1 Scalable and loosely coupled

The core idea: decouple components with messaging so each tier can scale on its own.

Two classic decoupling patterns

SQS queue decoupling (tested most often)

Web tier (accepts the order, returns immediately)
  ↓ sends a message
SQS queue (absorbs traffic spikes)
  ↓ polled
Workers (Auto Scaling on queue backlog)
  ↓ repeated failures
Dead-letter queue (DLQ)

SNS + SQS fan-out (one event handled by several systems)

Order service (publishes one event)
  ↓
SNS topic (pushes to every subscriber)
  ↓ copied to each
SQS ── SQS ── SQS
  ↓      ↓      ↓
Shipping Inventory Analytics

Choosing a messaging or event service

Service Pattern Question signal
SQS Queue; consumers poll; each message goes to one consumer Decoupling, absorbing bursts, asynchronous processing
SNS Pub/sub; pushes to many subscribers One notification to many targets
SNS + SQS Fan-out One event processed reliably and independently by several systems
EventBridge Event bus with rule-based routing AWS service events, SaaS events, scheduled jobs, content filtering
Kinesis Data Streams Real-time data stream Real-time analytics, clickstreams and logs, multiple consumers, replay, ordering per shard
Step Functions Workflow orchestration Multi-step processes, retries, human approval
  • S3 event notifications can target only Lambda, SQS and SNS. To reach other services (such as SageMaker Pipelines or Step Functions), filter in complex ways or reach several targets → turn on S3 event delivery to EventBridge and route with rules.
  • An EventBridge rule seems to do nothing: check the CloudWatch metrics in the AWS/Events namespace: MatchedEvents (did the rule match), Invocations and FailedInvocations (was the target called, did it fail). EventBridge doesn’t write to CloudWatch Logs by default.
  • SNS deliveries to an HTTPS endpoint fail and messages must be kept → configure a DLQ on the subscription (it must be an SQS queue).

SQS details that come up often

Concept Key point
Standard vs FIFO Standard has nearly unlimited throughput but may duplicate and reorder; FIFO guarantees order and exactly-once processing with limited throughput
Visibility timeout A received message is hidden for a while; if processing takes longer, it reappears and is processed again
DLQ Messages that fail too many times are moved there for investigation
Long polling Fewer empty polls, lower cost
What to scale on Queue backlog (pending messages per instance)
Message group ID FIFO orders within a group; e.g. account ID as the group ID keeps each account ordered while different accounts run in parallel
  • The question says “must be processed in order” or “must not be processed twice” → FIFO.
  • The question says “messages are processed twice” → first suspect a visibility timeout that’s too short.
  • An SQS message goes to one consumer; if several systems each need a copy → SNS fan-out.

Load balancers

Type Layer Question signal
ALB 7 (HTTP/HTTPS) Routing by path or host, microservices, containers, WAF integration
NLB 4 (TCP/UDP) Ultra-low latency, very high throughput, static IPs or Elastic IPs
GWLB 3 Deploying third-party firewalls and intrusion detection appliances
  • The question mentions only TCP/UDP or layer 4 → one NLB is enough; adding an ALB just costs more.

Statelessness and health checks

  • Users get signed out on scale-in: sessions live in instance memory and vanish when the instance terminates. Put sessions in ElastiCache or DynamoDB to make the app stateless. Sticky sessions only pin a user to one instance and can’t save a terminated one.
  • The app hangs but the ASG doesn’t replace the instance: by default an ASG uses only EC2 status checks (is the instance running); turn on ELB health checks.
  • Install software after launch, copy logs before termination → lifecycle hooks, unrelated to health checks.
  • “At least N instances always running” while surviving an AZ failure: put at least N ÷ (number of AZs − 1) in each AZ. For at least 2 across 2 AZs → 2 per AZ, 4 in total. With 1 + 1, losing an AZ leaves only 1.

Choosing compute

Service Good for
Lambda Event-driven short tasks (up to 15 minutes), no servers to manage
Fargate Running containers without managing EC2
ECS AWS-native container orchestration
EKS Already using Kubernetes, or consistency across clouds
API Gateway REST/WebSocket APIs in front of Lambda or other backends, with throttling and auth
Amplify Hosting front ends (static sites, single-page apps), with built-in CI/CD
  • Keep existing code + split into services owned by different teams + low operations → package as containers on ECS (Fargate), with an ALB routing paths to each service. Switching to Lambda means rewriting the code.

2.2 Highly available and fault tolerant

Four disaster recovery strategies

Cheapest, slowest recovery                          Most expensive, fastest recovery
←───────────────────────────────────────────────────────────────────────────→
Backup and restore → Pilot light → Warm standby → Active-active
     hours              tens of minutes    minutes        near zero
Strategy Normal state RTO/RPO
Backup and restore Only backups; the environment is rebuilt after a disaster Hours
Pilot light Data replicates continuously; core components exist but aren’t running Tens of minutes
Warm standby A scaled-down full environment runs all the time and scales up in a disaster Minutes
Active-active Several Regions serve traffic at once Near zero
  • How to answer: read the RTO/RPO in the question, then pick the cheapest strategy that meets them.
  • Pilot light vs warm standby: pilot light has only the data and the most critical parts, and app servers don’t run normally; warm standby is a smaller full environment that’s always running and can take traffic right away.
  • RPO sets the backup frequency: an RPO of 1 hour → back up at least hourly (AWS Backup hourly, or RDS automated backups + point-in-time recovery).

Database high availability

Option Replication Readable? Failover Question signal
RDS Multi-AZ DB instance Synchronous, across AZs Standby can’t be read Automatic High availability, automatic failover
RDS Multi-AZ DB cluster 1 writer + 2 readable standbys across 3 AZs Standbys can be read (reader endpoint) Automatic, usually under 35 seconds HA plus read offloading at the lowest cost (no extra replicas)
RDS read replica Asynchronous, can be cross-Region Readable Manual promote Offloading reads, cross-Region DR
Aurora 6 copies across 3 AZs Up to 15 readable replicas Automatic, promotes a replica High performance + high availability
Aurora Global Database Cross-Region, usually under 1 second of lag Secondary Regions readable Promote a secondary Region Cross-Region DR with a very low RPO
DynamoDB Global Tables Multi-Region, multi-active Every Region reads and writes No failover needed Low-latency reads and writes for global users, multi-active

The key difference: Multi-AZ solves availability; read replicas solve read performance. “Automatic failover” in the question → Multi-AZ.

  • Aurora Global Database has a single writable primary Region. Secondary Regions are read-only, and if the primary fails you must promote a secondary before writing. Every Region writing locally, and still writing when one Region fails → DynamoDB Global Tables.
  • ElastiCache for Redis high availability: each shard has a primary and replicas (node level) + Multi-AZ on (AZ level) + cluster mode with several shards. AOF persistence isn’t high availability.

Route 53 routing policies

Policy Use
Simple A single resource, no health checks
Weighted Split by percentage, e.g. blue/green or canary releases
Latency Send users to the lowest-latency Region
Failover Switch to a standby when the primary is unhealthy, with a health check
Geolocation Route by the user’s country or continent, e.g. localized content, compliance
Geoproximity Route by geographic distance, with an adjustable bias
Multivalue answer Return several healthy IPs
  • Latency vs geolocation: the first looks at network latency, the second at where the user is.
  • Weighted at 100/0 can act like primary/standby, but it doesn’t fail over based on health.
  • Hosted zones: names resolved for internet users → public; internal names resolved only inside a VPC → private. Moving public DNS to Route 53: create a public hosted zone, import the zone file, change the NS records at the registrar.

Other services that come up

Service Use
S3 Cross-Region Replication Copies S3 data across Regions; Versioning required; only new objects after it’s enabled, existing ones need Batch Replication
S3 Same-Region Replication Copies within a Region, can cross accounts, e.g. centralizing logs from many accounts in one bucket. Lifecycle can’t copy objects, only change storage class or delete
CRR + Replication Time Control 99.99% of objects replicated within 15 minutes, with an SLA
S3 Multi-Region Access Points One global endpoint for buckets in several Regions, reads and writes go to the nearest; with CRR for active-active and failover
FSx for ONTAP + SnapMirror Continuously replicates ONTAP volumes to FSx for ONTAP in another Region, same protocols
AWS Backup Central backup policies across services, with cross-account and cross-Region copies
AWS Elastic Disaster Recovery Continuously replicates servers to AWS and launches them quickly in a disaster
Auto Scaling across AZs Replaces capacity in other AZs when one AZ fails

Question signals

Signal in the question Think first of
Traffic spikes, processing can’t keep up, decoupling SQS + workers scaled on backlog
One event processed separately by several systems SNS + SQS fan-out
Strict ordering, no duplicates SQS FIFO
Messages processed twice Check the visibility timeout
Real-time stream, replay, multiple consumers Kinesis Data Streams
Routing by path or host ALB
Ultra-low latency, static IPs, TCP/UDP NLB
Automatic failover RDS Multi-AZ
Offload reads Read replica
Cross-Region DR with a very low RPO Aurora Global Database
Multi-Region, multi-active reads and writes DynamoDB Global Tables
Automatic switch when the primary Region fails Route 53 Failover + health check
Choose DR by RTO/RPO The cheapest strategy that meets them
Sessions lost on scale-in Sessions in ElastiCache / DynamoDB
App hangs, ASG doesn’t replace it ELB health checks
S3 replication with a 15-minute SLA CRR + RTC
Users write to the nearest S3 Region, automatic failover Multi-Region Access Points + CRR

Practice questions

2.1 Scalable and loosely coupled

Q1. During a sale, orders surge and the backend can’t keep up, causing front-end timeouts and lost orders. What’s the best improvement?

  • A. Move to larger EC2 instances
  • B. Add an SQS queue between the web tier and the processing tier, and scale the processing tier on queue backlog
  • C. Add an NLB
  • D. Cache the order page with CloudFront
Answer

B. “Surge”, “can’t keep up” and “lost orders” all point to buffering with a queue. A only moves the bottleneck; C and D don’t add processing capacity.

Q2. An order event must reach three systems (shipping, inventory, analytics), and each must reliably receive it and process it independently. What’s the best architecture?

  • A. One SQS queue polled by all three systems
  • B. An SNS topic with three SQS queues subscribed, each system processing its own queue
  • C. The order service calls each system’s API synchronously in turn
  • D. Write events to S3 and have the three systems scan it on a schedule
Answer

B. The problem with A: an SQS message goes to only one consumer, so the three systems would compete for messages instead of each getting a copy. C is synchronous tight coupling, so one failing system breaks the whole flow.

Q3. A banking system requires transactions for the same account to be processed strictly in order and never twice. What should you use?

  • A. SQS Standard
  • B. SQS FIFO
  • C. An SNS Standard topic
  • D. A longer visibility timeout on SQS Standard
Answer

B. FIFO orders by message group ID. Using the account ID as the group ID keeps each account strictly ordered while different accounts still run in parallel. D only reduces duplicates and can’t guarantee order.

2.2 Highly available and fault tolerant

Q4. After a failure the system may be down for up to 24 hours and lose up to 1 hour of data, at the lowest cost. Which DR strategy?

  • A. Active-active
  • B. Warm standby
  • C. Pilot light
  • D. Backup and restore
Answer

D. With 24 hours of allowed downtime, use the cheapest option, backup and restore. The RPO is 1 hour, so back up at least hourly.

Q5. If the AZ hosting the RDS primary fails, the database must switch over automatically with no manual steps. How should you configure it?

  • A. Create a read replica in the same Region
  • B. Turn on RDS Multi-AZ
  • C. Take a snapshot every hour
  • D. Move the database to EC2 and manage it yourself
Answer

B. A is the common trap: a read replica doesn’t take over automatically, it must be promoted manually, and asynchronous replication can lose data.

Q6. An app runs in two Regions. All traffic normally goes to the primary Region and should switch to the standby automatically when the primary is unavailable. Which Route 53 routing policy?

  • A. Weighted
  • B. Latency
  • C. Failover + health check
  • D. Geolocation
Answer

C. Weighted at 100/0 can split traffic but doesn’t switch based on health. “Primary/standby with automatic switchover” is Failover with a health check.


Domain 3: Design High-Performing Architectures (24%)

Domain 3 has five parts: 3.1 Storage · 3.2 Compute · 3.3 Databases · 3.4 Networking · 3.5 Data ingestion and transformation

It overlaps a lot with Domain 2; the focus here is choosing services by performance needs.


3.1 Storage

Three types of storage

Type Service How it’s accessed Question signal
Object storage S3 HTTP API, whole objects Huge numbers of files, static websites, data lakes, backups
Block storage EBS Attached to one EC2 instance as a disk Databases, OS disks, low latency
File storage EFS / FSx Mounted by many EC2 instances at once Shared files across instances and AZs

An EBS volume lives in one AZ and usually attaches to one instance (io1/io2 Multi-Attach is the exception and rarely tested). To share across AZs, choose EFS.

Under the hood: the difference is who maintains the “files”

Block (EBS)               File (EFS/FSx)                 Object (S3)
EC2 (one)                 EC2  EC2  EC2                   Any client
  ↓                         ↓ by path (NFS/SMB)             ↓ HTTP: PUT/GET whole objects
File system on the client  File system on the server       Flat namespace, no real directories
(ext4 / NTFS)              handles dirs, permissions, locks key → data + metadata
  ↓ read/write block N
[#0][#1][#2][#3]...
  • Block storage: just a row of fixed-size numbered blocks; it only understands “read/write block N”. The file system on EC2 maintains the mapping.
    • You can change a small block in place with the lowest latency → good for databases.
    • The mapping lives on one machine, so several machines writing at once corrupt the data → usually one instance only.
  • File storage: the file system runs on the server and clients access files by path. The server manages directories, permissions and locks, so many machines can share safely, but every operation is coordinated over the network, so latency is higher than block storage.
  • Object storage: one giant key-value table.
    • uploads/2026/photo.jpg is one whole key; “folders” are just a display by prefix.
    • Objects are read and written whole; you can’t change a few bytes in the middle (reads can use byte ranges).
    • No directory tree or locks to maintain → nearly unlimited scale, but the highest per-request latency.
    • That’s why a database can’t run on S3 directly: every 4 KB change would rewrite the whole object.
Block (EBS) File (EFS/FSx) Object (S3)
Unit of work Fixed-size blocks Files, by path Whole objects, by key
Where the file system lives Client Server Nowhere, flat keys
Small in-place changes Yes, fast Yes No, rewrite the whole object
Sharing Usually one instance Many at once Any client
Latency Lowest Medium Highest
Scalability Per-volume limit High Nearly unlimited
Typical use Databases, boot disks Shared directories, content management Data lakes, backups, static assets

Exam shortcut: low latency and small random writes → block; shared across machines → file; huge, cheap, whole-object reads and writes → object.

EBS volume types

Type Media Use case
gp3 SSD The general-purpose default; IOPS and throughput adjustable independently
io2 Block Express SSD Critical databases needing the highest IOPS and lowest latency
st1 HDD Sequential reads and writes for big data and logs, throughput first
sc1 HDD Rarely accessed cold data, cheapest
Instance store Local disk on the host Very high IOPS for temporary data; lost when the instance stops
  • Random I/O, IOPS matters → SSD; sequential I/O, throughput matters → HDD. HDD can’t be a boot volume.
  • IOPS is operations per second (small random database I/O); throughput (MiB/s) is data per second (large sequential files).
  • gp2 vs gp3: gp2 ties IOPS to size (3 IOPS per GiB), so more IOPS means a bigger disk; gp3 includes 3,000 IOPS and 125 MiB/s, and IOPS and throughput can be added independently (up to 80,000 IOPS and 2,000 MiB/s). “IOPS configured separately from capacity, at the lowest cost” → gp3, and io2 if that’s not enough.
  • Note that gp3’s limits were raised: previously 16,000 IOPS, 1,000 MiB/s and 16 TiB; now 80,000 IOPS, 2,000 MiB/s and 64 TiB. Many questions still use the old numbers: if the need is over 16,000 IOPS and io2 is an option, io2 is the safest pick.
  • Instance store: local NVMe, the fastest, included in the instance price; data is lost on stop, termination or hardware failure. Signals: scratch space, caches, intermediate results, “can be regenerated”. If the question says data must persist → rule out instance store.

EFS vs FSx

FSx is not part of EFS. They’re separate service families that are both file storage and can both be shared by many instances.

EFS FSx
What it is AWS’s own file system Managed versions of existing file systems
Protocol NFS Depends on type: SMB, Lustre, NFS, iSCSI
OS Linux (no Windows) Windows and Linux options
Character Serverless, capacity scales automatically Keeps the original file system’s features and tools
FSx type Question signal
FSx for Windows File Server Windows apps, SMB, Active Directory, migrating on-premises Windows file servers. Once joined to the AD domain, existing AD groups control share and file permissions (SMB permissions follow AD, not IAM)
FSx for Lustre High-performance computing, ML training, integrates with S3
FSx for NetApp ONTAP Migrating on-premises NetApp, multi-protocol (NFS, SMB, iSCSI)
FSx for OpenZFS Migrating on-premises ZFS or Linux file servers

Memory hook: ordinary Linux shared files → EFS; Windows shared files → FSx for Windows File Server; the question names HPC, NetApp or ZFS → the matching FSx.

Several Windows EC2 instances sharing data use file storage (the same share accessed by path, like \\fsx\share\reports), not block storage.

S3 isn’t a file system: it can’t be mounted as a shared read/write directory for many instances. Mountpoint for S3 can mount a bucket but doesn’t support operations like modifying existing files. CMS content or website images that many instances read and write → EFS.

S3 performance

Technique Use
Multipart upload Upload large files in parallel parts, recommended from about 100 MB
Transfer Acceleration Uploads from distant users, through edge locations and the AWS backbone
Byte-range fetch Download parts of an object in parallel, or read only part of it
Multiple prefixes Each prefix has its own request-rate limit; spreading across prefixes raises total throughput
CloudFront Frequent downloads by global users, cached at the edge

Each prefix supports roughly 5,500 GET/HEAD and 3,500 PUT/POST/DELETE requests per second; beyond that you get 503 Slow Down. A prefix is the part of the key before the last /, and there’s no limit on how many you have: 20,000 GETs per second need at least 4 prefixes, or CloudFront in front.


3.2 Compute

EC2 instance families

Family Prefix Question signal
General purpose M, T Web servers, general apps; T can burst and suits low baseline load
Compute optimized C CPU-heavy: batch processing, video encoding, scientific computing, game servers
Memory optimized R, X In-memory databases, real-time big data analytics, large caches
Storage optimized I, D High local disk IOPS: NoSQL, data warehouses
Accelerated computing P, G, Inf, Trn GPUs, ML training and inference, graphics rendering

Instance names with a g (like c7g) are Graviton, ARM-based and usually cheaper for the same performance.

AWS physical hierarchy

Region (e.g. ca-central-1)
└── Availability Zone (one or more separate data centers, independent power and network)
    └── Data center (one building, thousands of racks)
        └── Rack (one cabinet sharing power and switches → one failure unit)
            └── Physical server (host)
                └── EC2 instance

A rack is not an AZ; it’s a much smaller unit inside one. Multi-AZ isolates at the AZ level; placement groups work one level down, deciding whether instances inside an AZ sit close together or spread apart.

Placement groups

Cluster: packed together, fastest network   Spread: each on its own rack    Partition: isolated groups
[■■■■■■][■■■■■■]                           [■  ][■  ][■  ][■  ]          ┌Part 1┐ ┌Part 2┐
 One AZ; one failure can hit them all       Up to 7 per AZ                  [■■■][■■■] [■■■][■■■]
Type Scope Placement Question signal
Cluster One AZ only Instances packed on neighboring hardware HPC, tightly coupled computing, lowest latency and highest throughput
Spread Can span AZs in a Region Each instance on a different rack A few critical instances, max 7 per AZ per group
Partition Can span AZs in a Region A set of racks forms a partition; partitions share no racks; max 7 partitions per AZ Large distributed systems like Hadoop, Kafka, Cassandra
  • All three trade off network performance against fault isolation.
  • None can span Regions.
  • HPC often pairs with EFA (Elastic Fabric Adapter) for fast node-to-node communication (MPI).
  • How to use: create the placement group under Network & Security in the EC2 console and choose a type, then select it under Advanced details when launching instances. Placement groups are free.
  • Launch all instances in a cluster group at once, with one instance type. Launching in batches can fail with insufficient capacity; the fix is to stop all instances in the group and start them all again together.
  • You can’t change the type of an existing placement group.

Can you see the actual racks?

Mostly no. You only declare a placement strategy; AWS decides which hardware to use.

Type What you can control or see
Cluster Only a guarantee of closeness, no rack information
Spread Only a guarantee of separate racks, not which ones
Partition You can see and choose the partition number

A partition number works like a rack number in your own data center. HDFS, Cassandra and Kafka are rack-aware: tell them each node’s “rack” with the partition number and they place replicas in different partitions.

Example (Kafka):

# Create a placement group with 3 partitions
aws ec2 create-placement-group --group-name kafka-pg --strategy partition --partition-count 3

# Choose a partition at launch (otherwise instances are spread evenly)
aws ec2 run-instances --image-id ami-xxxx --instance-type m7g.large --count 2 \
  --placement "GroupName=kafka-pg,PartitionNumber=1"

# From inside the instance, look up its partition
curl -s -H "X-aws-ec2-metadata-token: $TOKEN" \
  http://169.254.169.254/latest/meta-data/placement/partition-number
# Kafka broker config: use the partition number as the rack
broker.rack=partition-1

For a topic with replication factor 3, the three replicas land on brokers in three different partitions; if every rack in one partition fails, two replicas remain.

Dedicated Host vs Dedicated Instance

Option What it is Question signal
Dedicated Host A whole physical server is yours, with visible host ID, sockets and cores Licenses billed per socket or core (BYOL), control over which server instances run on
Dedicated Instance Runs on hardware dedicated to you, but you can’t see or choose which Compliance forbids sharing hardware with other customers

Auto Scaling policies

Policy How it works Question signal
Target tracking Keeps a metric at a target, e.g. CPU at 50% The simplest, most common default answer
Step scaling Adds or removes instances in steps based on how far an alarm is exceeded Finer-grained, tiered responses
Scheduled Scales at fixed times Known peaks, e.g. every Monday morning
Predictive Forecasts from history and scales out ahead of time Regular, cyclical traffic
  • New instances take long to start → a warm pool of pre-initialized instances.
  • Extra work before launch or termination (e.g. copying logs) → lifecycle hooks.
  • Scheduled or predictive: with scheduled you decide how many instances yourself; if the question says no one has time to analyze how much capacity is needed, choose predictive, which forecasts from historical load and can launch capacity ahead of time.

Lambda performance

Problem Fix
Runs slowly Increase memory; CPU scales up with it (max 10 GB)
Cold start latency Provisioned concurrency, pre-initialized execution environments
One function eats all the concurrency and starves others Reserved concurrency to cap it (also guarantees it a share)
Task runs over 15 minutes Move to Fargate, ECS or AWS Batch

3.3 Databases

Pick the right type of database first

Type Service Question signal
Relational RDS, Aurora Transactions, JOINs, fixed schema, SQL
Key-value DynamoDB Huge request volumes, millisecond latency, access by key, serverless
In-memory cache ElastiCache (Redis / Memcached) Caching hot data, session storage, leaderboards
Durable in-memory database MemoryDB for Redis Redis speed with data that must not be lost
Document DocumentDB JSON documents, MongoDB-compatible
Graph Neptune Social graphs, recommendations, fraud detection, “friends of friends”
Wide column Keyspaces Cassandra-compatible
Time series Timestream IoT sensor data, metrics
Data warehouse Redshift Large analytical queries (OLAP), BI reports

OLTP vs OLAP: everyday transactions (placing orders, updates) are OLTP → RDS, Aurora, DynamoDB; summarizing large amounts of data is OLAP → Redshift.

Two ways to fill a cache

Lazy loading (cache-aside)             Write-through
App reads data                          App writes data
  ↓ check first                           ↓ write to both
ElastiCache                             Database + ElastiCache
  ├ hit → return it                       ↓ later reads
  └ miss → query DB, write to cache       cache always has the latest data
Lazy loading Write-through
Pro Caches only data that’s actually read Cached data is never stale
Con First read is slow; data can go stale Writes are slower; much cached data may never be read

In practice the two are often combined, with a TTL on cached items.

Redis vs Memcached

Redis Memcached
Data structures Rich: lists, sets, sorted sets and more Simple key-value only
High availability Replicas and Multi-AZ automatic failover No replicas
Persistence Backup and restore None
Threading Mostly single-threaded Multi-threaded
Question signal Leaderboards, sessions, HA or persistence needed Just the simplest cache, scaling with threads

Choose Redis most of the time unless the question explicitly asks for a simple cache with no HA.

Leaderboard → Redis sorted set: the bottleneck is the data structure, not concurrency. Updating a score, getting the top N and finding a rank are all O(log N); Memcached has only key-value pairs and can’t sort.

Two DynamoDB points that come up often

Consistency: DynamoDB keeps copies in several AZs within a Region.

Eventually consistent read (default) Strongly consistent read
Value returned May be stale, usually consistent within a second The latest successful write
Cost Half the read capacity Double, ConsistentRead=true
GSI Supported Not supported

“Reads don’t return the latest data” → use strongly consistent reads. “Eventual consistency is fine” in the question → brief stale reads are acceptable, so DynamoDB can trade them for performance and scale.

Hot partitions: each physical partition handles about 3,000 RCU and 1,000 WCU. One key is throttled while the table’s total capacity isn’t used up → adding table capacity won’t help; choose a higher-cardinality partition key, or use write sharding (add a random suffix to spread writes, and query the shards in parallel and merge on read). DAX only speeds up reads, and a GSI on the same key is just as hot.

Common performance problems and fixes

Problem Fix
Heavy read load on a relational database Read replicas, or ElastiCache
The same queries run over and over ElastiCache
DynamoDB reads need microsecond latency DAX, with almost no code changes
Many Lambda functions open too many database connections RDS Proxy
Spiky, hard-to-predict load Aurora Serverless v2, or DynamoDB on-demand
Steady, predictable load DynamoDB provisioned + auto scaling, cheaper
One very hot DynamoDB key being throttled Redesign the partition key so requests spread evenly

Going deeper: what a proxy really is

A proxy is a middleman between client and server: to the client it looks like the server, and to the server it looks like the client. Neither side has to change, because it speaks the same protocol. At heart it’s one added layer of indirection.

Because all traffic passes through it, it can do things to that traffic:

Capability Meaning AWS example
Reuse Many clients share a few backend connections RDS Proxy
Caching Remember results and return them directly CloudFront, DAX
Distribution Spread requests over several servers ALB, NLB
Filtering Block malicious requests WAF
Hiding Hide the servers or clients behind it Private EC2 behind an ALB
Transformation TLS termination, protocol or header changes ALB terminating HTTPS
Masking failures The backend changes and clients don’t notice RDS Proxy handling failover
Forward proxy Reverse proxy
Acts for The client The server
Hides The client The server
Examples A corporate egress proxy Nginx, ALB, CloudFront, API Gateway

RDS Proxy vs a cache:

Cache (ElastiCache, DAX) RDS Proxy
Stores Query results No data, only connections
When a request arrives On a hit it returns directly, without touching the database Every query still runs on the database
Solves Heavy reads, repeated queries Too many connections, slow connection setup, failover

How RDS Proxy works:

  • Every database connection uses database memory and a thread, and opening one costs a TCP handshake, a TLS handshake and authentication. Each concurrent Lambda execution environment opens its own connection, so 1,000 concurrent invocations can mean 1,000 connections.
  • RDS Proxy keeps a small pool of long-lived connections to the database and hands client requests to them in turn.
  • It’s an application-layer (layer 7) program, not an OS feature, working like the open-source PgBouncer or ProxySQL. It has to understand the database protocol to know when a transaction ends and the connection can return to the pool.
  • Pinning: when a client sets session-level state (SET variables, temporary tables), that connection stays bound to the client; lots of pinning reduces reuse.
  • Faster failover: the app stays connected to the proxy, and the proxy connects to the new primary itself, with no waiting for DNS.

Does a proxy add latency? One extra hop does add a little. But RDS Proxy saves the handshakes of opening a connection each time (possibly tens of milliseconds) and keeps database load healthy, so end to end it’s often faster. The test: does the time it saves exceed the hop it adds?

When it isn’t worth it: long-running app servers with their own connection pools (such as .NET or Java apps); few, stable connections; extreme latency sensitivity. RDS Proxy fits best with Lambda-style workloads that open many short-lived connections frequently.


3.4 Networking

CloudFront vs Global Accelerator

CloudFront (CDN, caches at the edge)    Global Accelerator (no cache, optimizes the path)
Global users (HTTP/HTTPS)               Global users (TCP/UDP)
  ↓                                       ↓ connect to 2 static anycast IPs
Nearest edge location                   Nearest edge location
  ├ cache hit → return it                 ↓ over the AWS backbone
  └ miss → fetch from S3 / ALB          Nearest healthy Region
CloudFront Global Accelerator
Protocol HTTP/HTTPS TCP/UDP
Caching Yes No
Entry point A domain name 2 static anycast IPs
Question signal Static content, video, website acceleration Games, VoIP, non-HTTP, static IPs for allow lists, cross-Region failover in seconds

Memory hook: cacheable content → CloudFront; uncacheable, non-HTTP, or static IPs needed → Global Accelerator.

Several origins behind CloudFront: one distribution uses cache behaviors to route by path, e.g. /api/* → ALB (managed policy CachingDisabled, always goes to the origin), default * → S3 (cached). Dynamic content is worth putting behind CloudFront even uncached: TLS handshakes complete nearby, traffic rides the AWS backbone, and WAF runs at the edge. When the same file goes to many people worldwide, cache it; don’t turn caching off.

API Gateway’s three endpoint types

Type Suits
Edge-optimized Users around the world; requests enter the nearest CloudFront edge location
Regional Users in the same Region, or you put your own CloudFront in front
Private Reachable only inside a VPC through an interface endpoint

Connecting an on-premises data center

Option Characteristics Question signal
Site-to-Site VPN Over the internet, encrypted, set up in minutes, variable bandwidth and latency Quick setup, low cost, temporary
Direct Connect Dedicated line, off the internet, stable bandwidth and latency, takes weeks to provision Stable high bandwidth, low latency, large data transfers
Direct Connect + VPN Encryption on top of the dedicated line Stable and encrypted (Direct Connect itself isn’t encrypted)
VPN as Direct Connect backup Fails over to the VPN if the line goes down High availability while controlling cost
Direct Connect gateway A global resource; one line reaches VPCs in several Regions The data center needs VPCs in several Regions
A VPN from each of two customer gateway devices Each VPN has two tunnels on the AWS side, but one on-premises device is a single point of failure Removing the VPN’s single point of failure

VPC peering connects only VPC to VPC, not a data center. A DX gateway by itself doesn’t connect two data centers to each other (that’s SiteLink). VPC peering is an AWS-managed logical connection, already highly available, and two VPCs can have only one peering connection.

Putting the application closer to users

Option What it is Question signal
Local Zone An extension of a Region in a city near users, running full apps on EC2, EBS, ALB and more Single-digit millisecond latency, can’t or won’t run in the Region
Wavelength Zone Inside a telecom carrier’s 5G network Ultra-low latency for 5G mobile devices (connected cars, AR)
Outposts AWS racks installed in your own data center Data must stay on premises, but you want AWS services
CloudFront edge locations, regional edge caches Cache content only; a regional edge cache is a second cache tier between the edge and the origin Content delivery; can’t run applications

Between VPCs and inside a VPC

Service Use Key point
VPC peering Point-to-point between two VPCs Not transitive: with A-B and B-C peered, A and C still can’t talk
Transit Gateway Hub and spoke for many VPCs and on-premises networks Replaces a tangle of peering when there are many VPCs
PrivateLink Exposes one service privately to other VPCs Exposes one service, not a whole network; the provider builds an endpoint service on an NLB and consumers create interface endpoints; works with overlapping CIDRs, one-way
VPC sharing (AWS RAM) Several accounts place resources in subnets of the same VPC Central network management instead of dozens of VPCs
Gateway endpoint Private access to S3 and DynamoDB Free, uses route tables
Interface endpoint Private access to other AWS services An ENI in your subnet, billed hourly and per GB

Going deeper: VPCs, gateways and NAT from first principles

VPC: your private network in AWS, like a walled campus.

  • Its own private address range (e.g. 10.0.0.0/16)
  • Subnets: address blocks carved out of it (e.g. 10.0.1.0/24), each in one AZ
  • Route tables: decide where traffic goes
  • Doors: the various gateways; guards: security groups and NACLs
  • Underneath, it’s software-defined networking on shared physical networks; every packet is tagged with its VPC, so customers are isolated and duplicate private IPs don’t clash

Gateway: a machine can send packets directly only to machines on its own network; anything addressed elsewhere goes to the default exit. A gateway is the forwarding point where two networks meet, the door to another network. Your home Wi-Fi router is your home network’s gateway.

Route table: each row says “for this destination, hand off to this next hop”.

Destination       Next hop
10.0.0.0/16       local        ← inside the VPC, deliver directly
0.0.0.0/0         igw-xxxx     ← everything else, to the Internet Gateway
  • Public subnet: its route table has 0.0.0.0/0 → IGW.
  • Private subnet: it doesn’t.
  • Public and private are decided by the route table, not by the subnet itself.

NAT: private IPs can’t be routed on the internet, so a reply wouldn’t know which 10.0.1.5 to return to. NAT rewrites the address at the exit and keeps a mapping table:

Outbound: 10.0.1.5:43210 → 8.8.8.8:443
          NAT rewrites to 52.10.20.30:61000 → 8.8.8.8:443 and records 61000 ↔ 10.0.1.5:43210
Return:   8.8.8.8:443 → 52.10.20.30:61000
          NAT looks it up and rewrites to → 10.0.1.5:43210

The key property: connections can only be initiated from inside. A packet arriving unprompted from outside has no entry in the table and is dropped.

Internet
  ↕
Internet Gateway
  ↕
┌───────────────── VPC 10.0.0.0/16 ─────────────────┐
│ Public subnet (0.0.0.0/0 → IGW)                      │
│   ALB (reachable from outside)  NAT Gateway (public IP) │
│   ↑ outbound only                                     │
│ Private subnet (0.0.0.0/0 → NAT Gateway)              │
│   EC2 app (can download updates, unreachable from outside) │
└────────────────────────────────────────────────────┘
NAT gateway point Detail
Where it goes A public subnet
High availability Lives in one AZ; put one in each AZ and point each AZ’s private subnets at their own
Cost Hourly plus per GB processed; for heavy S3 traffic use a gateway endpoint instead
Direction Outbound only; for inbound access use an ALB or a public IP
IPv6 No NAT needed; for outbound-only use an egress-only internet gateway

Going deeper: route tables and subnet associations

  1. Every subnet is associated with exactly one route table.
  2. One route table can be associated with many subnets.
  3. A subnet without an explicit association uses the VPC’s main route table.
  4. A subnet uses only one table; rules aren’t merged or inherited.

Routes are chosen by longest prefix match: for each packet, find all routes matching its destination IP and pick the most specific (longest prefix). Order in the table doesn’t matter (unlike NACLs, which match by rule number).

Destination                 Next hop
10.0.0.0/16                 local
pl-xxxx (S3 IP ranges)      vpce-xxxx
0.0.0.0/0                   nat-xxxx

To S3 → matches pl-xxxx and 0.0.0.0/0; pl-xxxx is more specific → via the endpoint
To google.com → matches only 0.0.0.0/0 → via NAT
To 10.0.2.8 → matches local → inside the VPC

Reading the console: look at the Target prefixes on the Routes tab to see what kind of table it is, then at Subnet associations to see which subnets use it.

Target prefix What it is
local Inside the VPC, in every table
igw- Internet Gateway (public)
nat- NAT Gateway (private, can initiate outbound)
vpce- Gateway endpoint (destination is a pl- prefix list)
pcx- VPC peering
tgw- Transit Gateway
vgw- Virtual private gateway (VPN / Direct Connect)

A table with no 0.0.0.0/0 → its subnets can’t reach outside at all, common for databases.

A common setup:

Route table Key routes Associated subnets Meaning
rtb-public 0.0.0.0/0 → igw- public-a, public-b One shared table for public subnets
rtb-private-a 0.0.0.0/0 → nat-a, pl-s3 → vpce- app-a Private subnet in AZ a, using its own AZ’s NAT
rtb-private-b 0.0.0.0/0 → nat-b, pl-s3 → vpce- app-b Private subnet in AZ b, using its own AZ’s NAT
rtb-db local only db-a, db-b Database subnets with no outside access

Going deeper: the S3 gateway endpoint

  • It can’t be reached from the internet. It’s a private path from the VPC to S3 that only machines inside the VPC can use.
  • S3 isn’t inside your VPC; it’s a public service with public addresses.
No endpoint:   private EC2 → NAT Gateway → Internet Gateway → S3 (NAT charges per GB)
With endpoint: private EC2 → gateway endpoint → S3 (free, no NAT or IGW)
  • How it works: when you create it, AWS adds a row pl-xxxx (S3's address ranges) → vpce-xxxx to the route tables you choose. Like an IGW or NAT, it’s a next hop in the route table, one that leads only to S3.
  • You create it yourself: it’s a VPC resource, not a bucket setting. VPC console → Endpoints → service com.amazonaws.<region>.s3, type Gateway → choose the VPC and route tables. Create one per VPC; subnets whose route tables aren’t associated still go through NAT.
  • It reaches only S3 in the same Region.
  • Access control: an endpoint policy limits which buckets can be reached; a bucket policy with aws:SourceVpce requires access through a specific endpoint.
Cost After adding a gateway endpoint
S3 storage and request charges Still charged
Same-Region data transfer from S3 to EC2 Already free
NAT gateway data processing charges Eliminated
Gateway endpoint Interface endpoint
How it works A next hop in the route table An ENI with a private IP in your subnet, built on PrivateLink
Services Only S3 and DynamoDB Most AWS services, S3 included
Cost Free Hourly and per GB
Access from on premises No Yes, over VPN or Direct Connect

3.5 Data ingestion and transformation

A typical data lake pipeline

Sources: real-time events (clickstreams, logs, IoT) / on-premises systems (file servers, databases)
  ↓ ingest
Kinesis (Data Streams / Firehose) / DataSync (online) / Snowball (offline)
  ↓
S3 data lake (raw data + processed data)
  ↓ transform and catalog
Glue (ETL + Data Catalog) / EMR (Spark / Hadoop)
  ↓ query and visualize
Athena (SQL on S3) / Redshift (data warehouse) / QuickSight (BI reports)

Real-time streams: the Kinesis family

Service Characteristics Question signal
Kinesis Data Streams Real-time, you write the consumers, replayable, scales by shard Real-time processing, multiple consumers, replay, custom logic
Amazon Data Firehose Near real-time (buffers), fully managed, delivers straight to S3, Redshift, OpenSearch and more Streaming data into S3 with minimal operations, can convert to Parquet
Managed Service for Apache Flink Real-time computation on streams (aggregations, windowed analysis) Real-time SQL or complex stream processing

Memory hook: Data Streams is a pipe, and you attach your own processor; Firehose is a courier that delivers to the destination for you.

Moving data into AWS

Service Use Question signal
DataSync Online migration or scheduled sync of files over the network (NFS, SMB, HDFS → S3, EFS, FSx) Enough bandwidth, automated or recurring sync
Snowball Edge AWS ships a device; you fill it and ship it back Huge data volumes, network too slow
AWS Transfer Family Managed SFTP, FTPS and FTP servers storing files directly in S3 or EFS Partners must upload over SFTP, no SFTP server to maintain. Internal use only → an internal endpoint (reached over VPN or Direct Connect); process files after upload → a managed workflow calling Lambda; sign-in can use AD (AD Connector)
Storage Gateway On-premises apps use cloud storage transparently Hybrid cloud where on-premises access continues
  • Deciding on Snowball: data size ÷ real bandwidth. 100 TB over 100 Mbps takes about three months; 30 TB over 1 Gbps takes about 3 days, so the network is faster.
  • Continuing nightly sync after the migration → DataSync; Snowball is a one-time move.
  • Snowball Edge is no longer open to new customers, so expect it less in newer questions.
  • Migration strategies (the 7 Rs): rehost (lift and shift, move as-is to EC2 with no architecture change, local disks become EBS), replatform (small changes, such as a managed database), refactor (rewrite as cloud-native), repurchase, retire, retain, relocate. The question says lift and shift → pick the option closest to the original architecture.
Similar-sounding services Problem solved
AWS Transfer Family The other party can only transfer files over SFTP/FTPS/FTP
S3 Transfer Acceleration Long-distance uploads to S3 are too slow
AWS DataSync Online migration or recurring sync of large numbers of files
Storage Gateway type What on premises sees Use
S3 File Gateway An NFS/SMB file share Files actually stored in S3
Volume Gateway cached mode iSCSI block volumes Full data in AWS, hot data cached locally, cold data has latency
Volume Gateway stored mode iSCSI block volumes Full data stays on premises, backed up asynchronously as EBS snapshots; all data needs low latency
Tape Gateway A virtual tape library Replacing physical tape backups

Data transfer services vs VPN/Direct Connect: VPN and Direct Connect are the road (network connectivity); services like DataSync are the moving company (which files to move, incremental sync, verification, retries, preserving permissions, throttling, scheduling). DataSync can run over the internet, VPN or Direct Connect; Snowball bypasses the network. A common combination: Direct Connect provides the path and DataSync syncs on a schedule over it.

Transformation and analytics

Service Use Question signal
Glue Serverless ETL; the Data Catalog records schemas; crawlers discover schemas automatically ETL, data catalog, serverless
EMR Managed Hadoop/Spark clusters Big data processing, existing Spark/Hadoop jobs
Athena SQL directly on S3, billed per data scanned Ad-hoc queries, serverless, no data warehouse
Redshift Data warehouse for complex analytical queries Large structured data, frequent complex BI queries
Lake Formation Permissions and governance for a data lake Column-level and row-level access control on a data lake
QuickSight BI visualization Dashboards and reports
OpenSearch Search and log analytics Full-text search, log analysis

Making Athena cheaper and faster: convert to a columnar format like Parquet and partition by fields like date, so only the needed columns and partitions are scanned.

  • Redshift Spectrum: already using Redshift and need to JOIN local tables with data in S3 without loading it → define tables in the Glue Data Catalog and CREATE EXTERNAL SCHEMA in Redshift. No Redshift, just querying S3 → Athena.
  • Don’t use big-data tools for small jobs: a few MB per file, done in tens of seconds, event-triggered → Lambda. Glue (serverless Spark) and EMR (Spark/Hadoop clusters) are for large batches; they start slowly and cost more. Spark is a distributed computing framework; PySpark versus Scala is just the language and doesn’t change the choice.

Going deeper: data warehouses and pipelines (a software engineer’s view)

The problem: an application’s OLTP database is designed for the work at hand: reading and writing a few rows by primary key in milliseconds, caring only about current state. Analytical questions scan billions of rows and combine several systems (orders, payments, third-party ad data, logs). Running them on the production database slows the live system, and scattered data can’t be joined.

The solution:

  • Data pipelines: extract data from each system, clean it, combine it, convert formats, and load it somewhere built for analysis (ETL: Extract, Transform, Load).
  • A data warehouse: stores organized, structured historical data, with a query engine optimized for wide scans and aggregation.
  • An analogy to CQRS: the data warehouse is the company-wide read model, and data pipelines keep it in sync with the write models.

Columnar storage:

Row storage (OLTP)                        Columnar storage (data warehouse)
123 | Alice | Toronto   | $50 | 11-01     id:     123, 124, 125, …
124 | Bob   | Vancouver | $20 | 11-01     name:   Alice, Bob, Carol, …
125 | Carol | Toronto   | $80 | 11-02     city:   Toronto, Vancouver, Toronto, …
                                          amount: 50, 20, 80, …   ← a total reads only this column
Look up order 123: one block, whole row   date:   11-01, 11-01, 11-02, …
Total amount: reads every field, wasteful Same type per column, so it also compresses well

Redshift uses columnar storage, and Parquet is a columnar file format, which is why Athena on Parquet is fast and cheap.

Data lake vs data warehouse:

Data warehouse (Redshift) Data lake (S3)
Stores Cleaned, structured data Raw data in any format: CSV, JSON, logs, images
Schema Defined before writing (schema-on-write) Interpreted when read (schema-on-read)
Cost Higher Very cheap
Users Business analysts, BI reports Data engineers, data scientists
Good for Stable reports and BI queries Storing everything first, exploration, machine learning

Many companies use both: raw data lands in the lake first, and curated core data then goes into the warehouse.

Glue Data Catalog: S3 is just a pile of files. The catalog records metadata: table names, column names and types, where the data sits in S3, how it’s partitioned. With it, Athena can query files as tables with SQL. Crawlers scan files and infer schemas automatically.

Lake Formation: S3 permissions work at the level of buckets, prefixes and objects, but one Parquet file holds every column and row, so S3 can’t express “can’t see the credit card column” or “can see only Canadian rows”. Lake Formation, built on the Glue Data Catalog, manages permissions at the database, table, column and row level, like GRANT in a database. Athena, Redshift Spectrum, EMR and Glue all enforce its permissions when querying.

Concept In one sentence
OLTP database The application’s working memory, current state only
Data pipeline The assembly line that moves and organizes data from each system
Data warehouse / data lake The company’s long-term memory, optimized for analysis
Data Catalog Tells query engines what the files are
Lake Formation Controls who sees which tables, columns and rows

Going deeper: Kafka vs SQS, and why companies self-host open source

SQS (queue) Kafka (distributed log)
After consumption Message deleted Kept until it expires
Several systems reading the same data Needs SNS fan-out Built in; each consumer group reads independently
Replaying history No Yes, by moving the offset back
Ordering FIFO per group Within each partition
Operations Fully managed You manage brokers, storage, scaling, upgrades

The closest AWS service to Kafka is Kinesis Data Streams. (A Kafka partition is a topic shard, unrelated to EC2 placement group partitions.)

Why companies choose open source and run it themselves: at very large scale, pay-per-use managed services cost more (but count the operations team’s time: “free as in puppy”); features from the open-source ecosystem; avoiding lock-in, multi-cloud or hybrid cloud; history and existing expertise; compliance and data location.

Fully managed, proprietary   Managed open source   Self-operated in the cloud
SQS / Kinesis           →    Amazon MSK        →   Kafka installed on EC2
ECS                     →    Amazon EKS        →   Kubernetes installed on EC2
←── less operations, more lock-in          more operations, more control and portability ──→

The exam almost always favors the least operational overhead: “migrate existing Kafka with as few changes as possible” → MSK; “already using Kubernetes” → EKS; only decoupling is needed → SQS/SNS.


Question signals

Signal in the question Think first of
Several Linux EC2 instances sharing files across AZs EFS
Windows file shares, SMB, AD FSx for Windows File Server
HPC, ML training, a high-performance file system integrated with S3 FSx for Lustre
Critical database, highest IOPS, lowest latency io2 Block Express
Sequential I/O, throughput first st1
Slow S3 uploads from global users Transfer Acceleration + multipart upload
Lowest latency between HPC nodes Cluster placement group + EFA
A few critical instances isolated from each other’s hardware failures Spread placement group
Kafka, Cassandra, HDFS Partition placement group
Licenses billed per socket or core Dedicated Host
Traffic peaks at known times Scheduled scaling
Lambda cold starts Provisioned concurrency
Many Lambda functions exhausting connections RDS Proxy
DynamoDB microsecond reads DAX
Repeated queries, heavy read load ElastiCache
Social graphs, friends of friends Neptune
Large-scale analytics, BI Redshift
UDP, static IPs, fast cross-Region failover Global Accelerator
Global acceleration of static content CloudFront
Stable bandwidth to the data center, off the internet Direct Connect
Private subnets reaching S3 while saving NAT costs S3 gateway endpoint
Streaming data into S3 near real-time, Parquet conversion, least operations Amazon Data Firehose
Real-time processing, replay, multiple consumers Kinesis Data Streams
Huge data volumes, network too slow Snowball Edge
Partners must use SFTP AWS Transfer Family
Occasional SQL on S3, serverless Athena (+ partitions + Parquet)
Column- and row-level permissions on a data lake Lake Formation
Temporary, regenerable data, highest I/O Instance store
IOPS configured separately from capacity, cheapest gp3
S3 returns 503 Slow Down Spread across prefixes / CloudFront
Leaderboard, top N Redis sorted set
DynamoDB returns stale data Strongly consistent reads
Global users calling an API API Gateway edge-optimized
Data center reaching VPCs in several Regions Direct Connect gateway
SaaS exposing a service privately, overlapping CIDRs PrivateLink
Redshift + querying S3 without loading Redshift Spectrum

Practice questions

3.1 Storage

Q1. A Linux web application runs on several EC2 instances across 3 AZs and needs to share one directory of uploaded files. What should it use?

  • A. A gp3 EBS volume on each instance
  • B. EFS
  • C. Instance store
  • D. FSx for Windows File Server
Answer

B. The key is “shared across AZs”. An EBS volume is tied to one AZ and usually attaches to one instance; instance store is a temporary local disk; FSx for Windows is for Windows/SMB.

Q2. A critical OLTP database runs on EC2 and needs sustained high IOPS and sub-millisecond latency, and the data must be durable. Which storage?

  • A. st1
  • B. sc1
  • C. io2 Block Express
  • D. Instance store
Answer

C. st1 and sc1 are HDD, suited to sequential I/O. Instance store has very high IOPS, but “must be durable” rules it out.

Q3. Users around the world upload multi-GB video files to an S3 bucket in US East, and uploads are slow. How do you improve it?

  • A. Turn on S3 Transfer Acceleration and use multipart upload
  • B. Change the storage class to S3 Standard-IA
  • C. Turn on S3 Versioning
  • D. Cache the videos with CloudFront
Answer

A. D is a common trap: CloudFront mainly speeds up downloads; uploads use Transfer Acceleration.

3.2 Compute

Q4. An HPC application communicates constantly between EC2 instances and needs the lowest network latency and the highest node-to-node throughput. How should it be deployed?

  • A. A spread placement group across several AZs
  • B. A cluster placement group with EFA-capable instances
  • C. A partition placement group
  • D. Larger general-purpose instances in different Regions
Answer

B. HPC node-to-node communication → Cluster + EFA.

Q5. An internal reporting system gets a surge of traffic at 9 a.m. every Monday and little at other times. What’s the best way to scale?

  • A. Scheduled scaling, scaling out before Monday morning
  • B. Keep the peak instance count all the time
  • C. Target tracking only, scaling out once CPU rises
  • D. Switch to a larger instance type
Answer

A. A peak at a known, fixed time → scheduled scaling, scaling out ahead of time.

Q6. A user-facing Lambda API is noticeably slow on the first request after a period of inactivity. How do you fix it?

  • A. Increase the function timeout
  • B. Set reserved concurrency
  • C. Configure provisioned concurrency
  • D. Move the function to another Region
Answer

C. Cold starts → provisioned concurrency. Reserved concurrency only caps concurrency and doesn’t fix cold starts.

Q7. A 30-node Cassandra cluster runs in a single AZ. The team wants a hardware failure in one group to affect only some nodes, and the application must know which group each node is in so it can spread replicas. Which placement group?

  • A. Cluster
  • B. Spread
  • C. Partition
  • D. No placement group; spread nodes across Regions
Answer

C. “Isolated groups” plus “the application knows each node’s group” → Partition, which exposes partition numbers. Spread allows at most 7 instances per AZ per group, too few for 30 nodes.

Q8. A small application has 4 critical EC2 instances, and a rack failure must affect at most one of them. What’s the best approach?

  • A. Put the 4 instances in a spread placement group
  • B. Put the 4 instances in a cluster placement group
  • C. Switch to a larger instance type
  • D. Attach an io2 volume to each instance
Answer

A. A few critical instances, each on a different rack → Spread.

Q9. A cluster placement group already has 8 running instances. Launching 4 more of the same type fails with insufficient capacity. What’s most likely to work?

  • A. Launch the 4 instances in another Region
  • B. Stop all instances in the group, then start all 12 together
  • C. Change the placement group to the spread type
  • D. Attach larger EBS volumes to the new instances
Answer

B. The error means the hardware near the current instances has no room. Stopping everything and starting all 12 at once lets AWS find a hardware area that can hold all 12; this is AWS’s recommended fix.

The problems with C: you can’t change the type of an existing placement group; Spread puts instances on separate racks, defeating the low-latency purpose of Cluster; and Spread allows at most 7 per AZ per group, so 12 won’t fit.

3.3 Databases

Q10. A serverless application has many concurrent Lambda functions hitting RDS MySQL, and at peak the database runs out of connections. What’s the best fix?

  • A. Move RDS to a larger instance
  • B. Put RDS Proxy between Lambda and RDS
  • C. Create a read replica
  • D. Give Lambda a longer timeout
Answer

B. “Many Lambda functions” plus “connections exhausted” → RDS Proxy for connection pooling.

Q11. An e-commerce app stores product data in DynamoDB, read-heavy and write-light. It needs microsecond read latency with minimal code changes. What should it use?

  • A. ElastiCache for Memcached
  • B. DynamoDB Accelerator (DAX)
  • C. Replace DynamoDB with RDS
  • D. Turn on DynamoDB global tables
Answer

B. “DynamoDB” plus “microseconds” plus “minimal code changes” is practically the definition of DAX.

Q12. A social platform needs to quickly answer “among this user’s friends of friends, who also likes the same brand?” Which database fits best?

  • A. Amazon Neptune
  • B. Amazon Redshift
  • C. Amazon RDS for PostgreSQL
  • D. Amazon Timestream
Answer

A. Multi-hop relationship queries are the classic use case for a graph database.

3.4 Networking

Q13. A global multiplayer game uses UDP, with players on every continent. It needs lower latency, static IPs, and fast failover if a Region fails. What should it use?

  • A. CloudFront
  • B. Global Accelerator
  • C. Route 53 latency routing
  • D. One NLB per Region, with players choosing manually
Answer

B. UDP, static IPs, fast failover → Global Accelerator. CloudFront supports only HTTP/HTTPS.

Q14. A company’s data center sends large amounts of data to AWS every day and needs stable bandwidth, predictable latency, and no public internet. How should it connect?

  • A. Site-to-Site VPN
  • B. AWS Direct Connect
  • C. VPC peering
  • D. Upload directly to S3 over the internet
Answer

B. Stable bandwidth, off the internet → Direct Connect. VPN runs over the internet with variable bandwidth.

Q15. EC2 instances in private subnets read and write lots of S3 data through a NAT gateway, and NAT data processing charges are high. How do you cut costs and keep traffic off the internet?

  • A. Move the EC2 instances to a public subnet
  • B. Create an S3 gateway endpoint
  • C. Use Global Accelerator
  • D. Use a larger NAT gateway
Answer

B. An S3 gateway endpoint is free, keeps traffic on the AWS network, and avoids NAT data processing charges.

3.5 Data ingestion and transformation

Q16. Website clickstream data must land in S3 in near real time, converted to Parquet for later analysis, with the least operational work. What should you use?

  • A. Kinesis Data Streams with a custom consumer writing to S3
  • B. Amazon Data Firehose with format conversion, delivering to S3
  • C. SQS + EC2 workers
  • D. A daily DataSync job
Answer

B. “Near real time, into S3, convert to Parquet, least operations” is the definition of Firehose.

Q17. A company must move 500 TB from its data center to S3 within a few weeks, over only 100 Mbps of bandwidth. What should it do?

  • A. DataSync over the existing network
  • B. Snowball Edge devices for offline transfer
  • C. S3 Transfer Acceleration
  • D. Set up Site-to-Site VPN and upload
Answer

B. 500 TB over 100 Mbps takes more than a year; shipping devices is the only option.

Q18. The data team occasionally runs SQL over large volumes of logs in S3, doesn’t want to manage any servers, and wants lower query costs. What’s the best approach?

  • A. Load the data into RDS and query it
  • B. Run a long-lived EMR cluster
  • C. Query with Athena, converting logs to Parquet partitioned by date
  • D. Load the logs into Redshift and keep the cluster running
Answer

C. Athena is serverless and billed by data scanned; partitioning plus Parquet cuts the data scanned, the cheapest combination for querying S3.


Domain 4: Design Cost-Optimized Architectures (20%)

Domain 4 has four parts: 4.1 Storage · 4.2 Compute · 4.3 Databases · 4.4 Networking (+ cost management tools)

Many services appeared earlier; here the angle changes: which option is cheapest while still meeting the requirements.

Overall approach: commit to steady workloads for a discount, pay per use for spiky or idle ones, and turn things off when they aren’t needed.


4.1 Storage costs

S3 storage classes, ordered by “temperature”

The further down, the cheaper the storage, but retrieval is slower and there are more restrictions:

Storage class Retrieval time Minimum storage duration Good for
Standard Milliseconds None Frequent access
Standard-IA Milliseconds 30 days Infrequent access, but needed immediately
One Zone-IA Milliseconds 30 days Same, for data that can be regenerated
Glacier Instant Retrieval Milliseconds 90 days Archives accessed about once a quarter
Glacier Flexible Retrieval Minutes to hours 90 days Archives that can wait
Glacier Deep Archive 12 to 48 hours 180 days Long-term compliance retention, almost never read
Intelligent-Tiering Milliseconds (default tiers) None Moves objects between tiers automatically by access; no retrieval fees, a small monitoring fee

Cost traps:

  • IA and Glacier have retrieval fees: put frequently accessed data there and the total cost goes up.
  • Minimum storage duration: delete an object from Standard-IA on day 5 and you still pay for 30 days; Deep Archive is 180 days.
  • One Zone-IA lives in one AZ: only for data you can regenerate if lost, like thumbnails or transcoded copies.
  • Small files don’t suit IA: every object is billed as at least 128 KB.
  • Glacier Flexible Retrieval speeds: Expedited (1–5 minutes, most expensive), Standard (3–5 hours), Bulk (5–12 hours, cheapest).
Signal in the question Choice
Frequent access Standard
Unknown or changing access patterns, optimize automatically Intelligent-Tiering
Rare access, but needed immediately Standard-IA
Rare access, can be regenerated, cheapest One Zone-IA
Archive, occasionally needed immediately Glacier Instant Retrieval
Archive, retrieval can wait hours Glacier Flexible Retrieval
Kept for years for compliance, almost never read, cheapest Glacier Deep Archive

Ask two questions first: How often is it used? How long can you wait when you need it? Used twice a year with weeks of notice → can wait hours → Glacier Flexible Retrieval, cheaper than One Zone-IA. Might be needed any time and must come back at once → Standard-IA or Glacier Instant Retrieval. Don’t use One Zone-IA when data is hard to regenerate.

Lifecycle rules: cooling data automatically

Day 0           Day 30             Day 90                  Year 7
Standard   →   Standard-IA   →   Glacier Deep Archive   →   Delete
Action Use
Transition Move to a cheaper storage class after a number of days
Expiration Delete objects when they expire
Delete old versions With Versioning on, old versions keep taking space and cost money
Clean up incomplete multipart uploads Parts left by failed uploads are billed too and easy to overlook
  • Unsure of access patterns? Analyze first with S3 Storage Class Analysis or S3 Storage Lens.
  • Requester Pays: the downloader pays request and transfer costs; good for sharing large datasets.

EBS, EFS and backups

Scenario Approach
Still on gp2 Move to gp3, usually cheaper, with IOPS adjustable separately
Instance deleted, volume still there Delete unattached EBS volumes; they keep billing
Many snapshots, rarely restored Move to EBS Snapshots Archive, much cheaper, restore takes 24–72 hours
Create and delete snapshots by rule Amazon Data Lifecycle Manager
Many rarely accessed files in EFS EFS lifecycle management, moving them to the Infrequent Access or Archive tier
Backups kept long term AWS Backup lifecycle, moving old backups to cold storage

Going deeper: can you still read S3 if its Region goes down?

S3 data lives only in the Region you choose. If the whole Region is unavailable and you didn’t copy the data elsewhere beforehand, you wait for it to recover. But the data usually isn’t lost:

Meaning S3 Standard design target
Durability Will the data be lost? 11 nines
Availability Can you reach it right now? 99.99%
  • S3 Standard stores data in at least 3 AZs within a Region, so a single AZ failure doesn’t matter; One Zone-IA is the exception.
  • But all copies are in one Region. A real example: in February 2017, S3 in us-east-1 was down for several hours; no data was lost, but it couldn’t be read.

Copying to another Region ahead of time:

Primary Region (ca-central-1)        Standby Region (us-east-1)
bucket-a  ── CRR, asynchronous ──→    bucket-b
   ↑                                     ↑
 Normal reads and writes          Read from here when the primary is down
Method What it does Note
Cross-Region Replication (CRR) Newly written objects are copied asynchronously to another Region Versioning must be on at both ends; objects that existed before it was turned on aren’t copied
S3 Batch Replication Copies objects that existed before replication was turned on A one-time backfill of old data
Replication Time Control (RTC) 99.99% of objects replicated within 15 minutes, with an SLA When replication delay matters
Multi-Region Access Points One global endpoint that routes to the nearest bucket; failover controls switch between primary and standby The app doesn’t track two bucket names
CloudFront origin failover An origin group with buckets in two Regions; if the primary errors, reads go to the secondary User-facing downloads
  • Bucket names are globally unique, so the standby bucket needs another name; for writes on both sides, set up two-way replication.
  • It all comes down to RPO and RTO: CRR is asynchronous → RPO isn’t zero (RTC bounds it); the more automatic the switch, the shorter the RTO.

Going deeper: AWS Backup vs CRR

AWS Backup can also copy S3 backups to another Region; that’s the backup and restore DR strategy. The key point: the cross-Region copies must be made ahead of time on a schedule; once the Region is down, you can’t start a backup from it.

Normally (on a schedule):
ca-central-1                              us-east-1
S3 bucket → AWS Backup backup ── copy ──→ Copy in a backup vault

When the primary Region is down:
                                          Restore from the copy → new S3 bucket → app reads from it
  • AWS Backup supports S3 and requires Versioning.
  • Continuous backups: restore to any point within 35 days; periodic backups: snapshots on a schedule.
  • Supports cross-Region and cross-account copies.
CRR (replication) AWS Backup cross-Region copy (backup)
What’s on the other side A bucket you can read right away A backup copy you must restore first
RPO Very low; with RTC, within 15 minutes Depends on backup frequency
RTO Short, just switch reads Longer, restore first
Accidental deletion or corrupted data The mistake is replicated too Restore to a point before the problem
Ransomware and malicious deletion Weaker Vault Lock locks backups so nobody can delete them
Cost Higher; the other side is full S3 storage Lower

Replication isn’t backup: replication stays in sync, so deleted, corrupted or ransomware-encrypted data syncs over too; backups keep past points in time you can return to. In practice, many use both.

Signal in the question Think first of
Read data as soon as possible after a Region failure, very low RPO S3 CRR
A specific replication delay requirement or an SLA Replication Time Control
Existing old objects must be replicated too S3 Batch Replication
One global endpoint with automatic routing and failover Multi-Region Access Points
User-facing downloads with automatic origin failover CloudFront origin failover
Central backups for many services, cross-Region or cross-account AWS Backup
Restore to before an accidental deletion or corruption AWS Backup, or S3 Versioning
Backups nobody can delete, ransomware protection AWS Backup Vault Lock
Longer recovery time is acceptable, lowest cost AWS Backup cross-Region copy

4.2 Compute costs

Purchasing options

Option Discount Commitment Good for
On-Demand Full price None, billed per second Short-term, unpredictable
Savings Plans Compute up to about 66%, EC2 Instance up to about 72% An hourly spend for 1 or 3 years Steady baseline load
Reserved Instances Up to about 72% A specific instance configuration for 1 or 3 years Steady baseline load
Spot Up to about 90% None; can be reclaimed with 2 minutes’ notice Interruptible work

Savings Plans vs Reserved Instances

Option Max discount What you commit to Flexibility Applies to
Compute Savings Plans About 66% An hourly spend Highest: any instance family, size, Region, OS EC2, Fargate, Lambda
EC2 Instance Savings Plans About 72% An hourly spend Locked to an instance family and Region; size, OS and tenancy can change EC2 only
Standard RI About 72% An instance configuration Low, essentially fixed EC2, RDS and others
Convertible RI About 66% An instance configuration Can change instance family, lower discount EC2
  • More flexibility, less discount.
  • Sure to stay in one instance family and Region (size or OS may change) → EC2 Instance Savings Plans, the biggest discount.
  • Might change instance family or Region, or move to Fargate or Lambda → Compute Savings Plans.

Payment options: all upfront, partial upfront, no upfront. The more you pay upfront, the bigger the discount.

Using Spot

Point Detail
Reclaimed AWS takes capacity back when it needs it, with 2 minutes’ notice
Good for Batch jobs, CI/CD, big data, rendering, stateless web tiers, work that can checkpoint
Not for Databases, or work that can’t be interrupted and has no checkpoints
Better availability Use several instance types and AZs so they’re less likely to be reclaimed together
Spot Fleet / EC2 Fleet Request a mix of instance types at once; picks ones with capacity and low prices
ASG mixed instances policy Mix On-Demand and Spot in one Auto Scaling group

The most common combination

Instances
  ↑   ┌─ Peaks → Spot (stateless, interruptible) or On-Demand
  │   │
  │───┴─────────────── Steady baseline → Savings Plans / RI
  └────────────────────────────→ Time

Other ways to save

Method Use
AWS Compute Optimizer Recommends better instance types and sizes from CloudWatch metrics (EC2, ASG, EBS, Lambda, Fargate)
Graviton Switch to ARM instances, usually cheaper for the same performance
Scheduled shutdown Stop dev and test environments at night and on weekends, e.g. with Instance Scheduler or EventBridge Scheduler
Cost Explorer recommendations How much Savings Plans or RI to buy, based on historical usage
EMR clusters on demand Running only a few hours a day → a transient cluster that terminates when done; primary and core nodes (core holds HDFS data) On-Demand, only task nodes (compute only) on Spot

Lambda, Fargate or EC2: which is cheapest?

Service Billing Cheapest when
Lambda Per request and execution time; nothing when idle Low-frequency, bursty, mostly idle
Fargate Per allocated vCPU and memory, per second Container workloads without managing instances
EC2 Per instance running time Sustained steady high load, with Savings Plans

Trap: Lambda isn’t always cheapest. Sustained 24/7 high load on Lambda can cost far more than EC2 + Savings Plans.

Conversely, for very small data processing jobs (a few MB per file, done in tens of seconds, triggered by S3 events), Lambda is cheapest; Glue and EMR start slowly and have expensive minimum billing units, and are meant for large batches.

Existing licenses billed per socket or core + long-term, predictable use → Dedicated Host, with Reserved pricing cheaper than On-Demand.


4.3 Database costs

RDS and Aurora

Scenario How to save
Production database running steadily 24/7 RDS Reserved Instances
Dev and test databases used only during work hours Stop the instance after hours; RDS can stay stopped at most 7 days, then starts automatically
Used only a day or two a month Snapshot and delete the instance after use, restore from the snapshot next time (stopping doesn’t last past 7 days, and storage is still billed)
Managed, but with OS or privileged access RDS Custom (Oracle, SQL Server); self-managing on EC2 is the most operational work
DMS replication volume varies daily DMS Serverless, which provisions and scales capacity automatically
Load swings up and down, often idle Aurora Serverless v2, billed by actual capacity (ACUs), scaling down when idle
Aurora I/O charges are a large share of cost Aurora I/O-Optimized, no separate I/O charges (usually worth it when I/O exceeds about 25% of total cost)
Heavy read load, thinking of a bigger instance Add ElastiCache first; it’s often cheaper than upgrading
Oracle or SQL Server licenses too expensive Migrate to Aurora or RDS for PostgreSQL/MySQL: Schema Conversion Tool for the schema, DMS for the data

DynamoDB

Scenario How to save
Unpredictable traffic, a new app, often idle On-demand mode, pay per request
Steady, predictable traffic Provisioned + auto scaling, plus reserved capacity
Rarely accessed data, large storage Standard-IA table class: cheaper storage, slightly pricier reads and writes
Expired data needs cleaning up TTL deletes automatically, and those deletes are free

Backups and analytics

Scenario How to save
Keeping database backups long term Automated backups last at most 35 days; for longer, use manual snapshots or AWS Backup, moving old backups to cold storage
Historical data analyzed only occasionally Export RDS snapshots to S3 (Parquet) and query with Athena
Redshift used only part of the time Pause the cluster, or use Redshift Serverless
Just occasional queries Athena, no always-on data warehouse

Going deeper: licensing for RDS for SQL Server

Model How it’s billed Editions
License Included License cost is part of the instance’s hourly price Enterprise, Standard, Web, Express
Bring Your Own Media (BYOM) Use existing licenses (requires Software Assurance + License Mobility); RDS doesn’t charge for the SQL Server license, but infrastructure and Windows licensing are billed as usual Enterprise, Standard, Developer
  • Billed per vCPU: SQL Server and Windows license costs scale with vCPU count, so bigger instances pay more in licenses. At the same size, Standard and Enterprise often cost several times as much as PostgreSQL.
  • Higher editions cost more: Enterprise > Standard > Web > Express.
  • Web edition: only for public-facing websites and web apps, not internal systems.
  • Express edition: free and usable in production, but with many limits (e.g. 10 GB max per database).
  • Multi-AZ: no extra licensing requirement, but you still pay for the standby’s infrastructure.
  • Optimize CPU: on newer instances such as m7i, r7i, m8i and r8i, reduce vCPUs while keeping memory, which directly lowers license costs for memory-heavy databases.
  • Steadily running instances can also use Reserved Instances.

Developer Edition (non-production):

  • Free, with the same features as Enterprise, for non-production use only. RDS has supported it since December 2025; you pay only for infrastructure.
  • How: download the installer from Microsoft → upload to S3 → create a custom engine version (CEV) → launch an instance.
  • Limits: no read replicas; a CEV can’t be shared across Regions or accounts.

What “production” means (defined by Microsoft’s license terms, not AWS):

An application environment that end users access (for example, a website), used for more than gathering feedback or acceptance testing.

The key is whether real users are using it for real business.

Usually non-production, Developer is fine Production, Developer not allowed
Local development, automated CI tests, QA Systems real users are using
UAT: end users doing acceptance testing (explicitly allowed by the terms) Environments connected to the production database
Training environments without production data DR or backup copies of production (always running, ready to take over)
Demos that don’t process real business data Environments synced nightly from production for business users’ reports
Servers pulled into production at peak times
  • A DR copy of production counts as production.
  • Gray area: testing with a copy of production data. An older licensing guide said production data couldn’t be used; others argue testing-only use is fine. The safe path is to mask the data first, or confirm with Microsoft or whoever owns licensing at your company.
  • The terms change between SQL Server versions, and compliance is the user’s responsibility.

Exam signals: commercial database licenses too expensive → migrate to Aurora or RDS for PostgreSQL/MySQL; keeping existing licenses billed per socket or core → EC2 Dedicated Host.

Going deeper: the Parquet file format

Apache Parquet is an open-source columnar file format: the idea of columnar storage turned into a file, built for analytical queries.

Internal structure:

orders.parquet
├── Row group 1 (rows from 11-01 to 11-15)
│     [id] [city] [amount] [date]   ← one column chunk per column
├── Row group 2 (rows from 11-16 to 11-30)
│     [id] [city] [amount] [date]
└── Footer: schema + min / max / null count for each column chunk

SELECT SUM(amount) FROM orders WHERE date >= '2026-11-16'
→ Read the footer first: row group 1's max date is 11-15, skip the whole group
→ In row group 2, read only the amount and date columns
Mechanism Effect
Columnar storage Read only the columns the query uses
Skipping by statistics Use the footer’s min/max to skip row groups that can’t match (predicate pushdown)
Encoding Dictionary encoding (store repeated values once, then IDs) and run-length encoding (store a count for runs of the same value)
Compression After encoding, compress with Snappy, Zstd and so on; similar data compresses well
Built-in schema Column types are in the file, so no parsing text into types as with CSV
CSV JSON Parquet
Layout Rows Rows Columns
Human-readable Yes Yes No, binary
Type information None Some Yes, in the file
File size Large Larger, field names repeat on every row Much smaller
Querying a few columns Reads whole rows Reads whole rows Reads only the needed columns
Changing one row Awkward Awkward Practically no, rewrite the file
Good for Data exchange, import and export APIs, logs Analytics, data lakes

Why Athena on Parquet saves money: Athena bills by data scanned. Querying 2 columns of a 1 TB, 50-column CSV table scans about 1 TB; Parquet is smaller to begin with, reads just 2 columns and skips row groups, so it may scan only tens of GB or less. Add partitions by date and whole files can be skipped.

Limits:

  • Not for frequent updates; it can’t serve as an OLTP database.
  • The small-file problem: lots of tiny files slow queries; a few hundred MB per file is the usual guidance.
  • For updates, deletes and transactions on a data lake, use a table format like Apache Iceberg (still Parquet underneath); Athena supports Iceberg.
Producing Parquet on AWS Scenario
Amazon Data Firehose format conversion Convert incoming streaming JSON to Parquet or ORC automatically
Glue ETL Batch-convert CSV and JSON to Parquet
Athena CTAS CREATE TABLE AS SELECT to rewrite an existing table as Parquet
EMR / Spark Large-scale data processing
RDS snapshot export to S3 The export is Parquet

Similar formats: ORC is also columnar and comes from the Hive ecosystem; Avro is row-based and common in streaming, e.g. with Kafka.


4.4 Networking costs

Data transfer charges

The core rule: data into AWS is free, traffic within AWS costs more the farther it goes, and data out of AWS to the internet costs the most.

Path Cost
Internet → AWS (inbound) Free
Within one AZ, over private IPs Free
AWS origin (S3, ALB, EC2) → CloudFront Free
Across AZs (same Region) Low, charged on both sending and receiving
Across Regions (CRR, cross-Region read replicas) Medium
AWS → internet (outbound) Highest
NAT gateway Extra hourly and per-GB processing charges, often overlooked

Easy-to-miss details:

  • Traffic over public IPs is charged: two EC2 instances in the same Region talking over public or Elastic IPs pay even within one AZ; only private IPs are free.
  • RDS Multi-AZ replication traffic is free; cross-Region read replica replication traffic is charged.
  • CloudFront is often cheaper than downloading straight from S3: origin fetches are free, outbound per-GB prices are usually lower, and cache hits don’t go back to the origin.

Common ways to save on networking

Scenario How to save
Private subnets accessing S3 or DynamoDB heavily Gateway endpoint, free, bypasses NAT
Private subnets accessing other AWS services heavily Interface endpoint, usually cheaper than NAT at high volume
One NAT gateway used by instances in several AZs One NAT gateway per AZ, avoiding cross-AZ charges and improving availability
Global users downloading lots of static content CloudFront
Connecting a few VPCs VPC peering: no hourly charge, same-AZ traffic free
Connecting many VPCs Transit Gateway: charged per attachment and per GB, but simple to manage
Sustained heavy transfer with the data center Direct Connect, lower outbound per-GB price than the internet
Temporary, light connection to the data center Site-to-Site VPN, quick to set up, low cost
External users downloading a large dataset you share S3 Requester Pays

Cost management tools

Tool Use
Cost Explorer View and analyze past spend, forecast future spend, recommend Savings Plans and RIs
AWS Budgets Set budgets and alert when actual or forecast spend crosses a threshold; can also trigger actions
Cost Anomaly Detection Uses machine learning to find unusual spending increases
Cost allocation tags Tag resources to split the bill by project, team or environment
Cost and Usage Report (Data Exports) The most detailed billing data, exported to S3 and analyzable with Athena
Trusted Advisor Checks for idle resources, unattached EBS volumes, unused Elastic IPs and more
Compute Optimizer Recommends better instance types and sizes
Organizations consolidated billing Combined usage across accounts earns volume discounts; RIs and Savings Plans are shared across accounts

Memory hook: look back with Cost Explorer, manage ahead with Budgets, catch anomalies with Anomaly Detection, split by project with tags.

When a question says “doesn’t want to maintain fixed thresholds”, it’s ruling out Budgets → Cost Anomaly Detection. The two are often used together: Budgets caps spend, Anomaly Detection catches anomalies.


Question signals

Signal in the question Think first of
Unpredictable access, save automatically, no retrieval fees S3 Intelligent-Tiering
Rarely accessed but needed immediately S3 Standard-IA
Regenerable, rarely accessed, needed immediately S3 One Zone-IA
Kept for years for compliance, almost never read Glacier Deep Archive
Data cools over time S3 Lifecycle rules
gp2 volumes Move to gp3
Steady baseline, may change instance types or move to Fargate or Lambda Compute Savings Plans
Steady baseline, staying in one instance family and Region (size or OS may change), biggest discount EC2 Instance Savings Plans
Interruptible, can checkpoint, no deadline pressure Spot
Steady baseline + daily peaks, stateless Savings Plans/RI for the baseline + Spot for peaks (several instance types)
Are instance sizes right? Compute Optimizer
Dev and test environments used only during work hours Scheduled stop and start
Database load swings up and down, often idle Aurora Serverless v2
Unpredictable DynamoDB traffic On-demand mode
Steady DynamoDB traffic Provisioned + auto scaling + reserved capacity
Commercial database licenses too expensive SCT + DMS to Aurora / RDS PostgreSQL
Private subnets reaching S3 or DynamoDB, high NAT costs Gateway endpoint
Several AZs going through one NAT gateway One NAT gateway per AZ
Global downloads of static content, high outbound costs CloudFront
Connecting a few VPCs, cheapest VPC peering
Connecting many VPCs Transit Gateway
Costs by project Cost allocation tags
Alert when forecast spend crosses a threshold AWS Budgets
Sudden unusual spending increase Cost Anomaly Detection
RDS used only a day or two a month Snapshot + delete, restore when needed
Managed database + OS access RDS Custom
Small files, short jobs, event-triggered Lambda, not Glue / EMR

Practice questions

4.1 Storage costs

Q1. Application logs are queried often for the first 30 days; for the next 60 days they’re rarely accessed but must be available immediately; after that they’re kept 7 years for compliance, almost never read, and a 48-hour retrieval is fine. What’s the cheapest approach?

  • A. Keep everything in S3 Standard
  • B. Lifecycle: Standard-IA after 30 days, Glacier Deep Archive after 90 days, delete after 7 years
  • C. Put everything in Glacier Deep Archive from the start
  • D. Lifecycle: One Zone-IA after 30 days, delete after 7 years
Answer

B. Three phases map to three storage classes: frequent use → Standard; rare access but needed immediately → Standard-IA; long-term compliance retention → Deep Archive; delete after 7 years. The problem with D: 7 years in One Zone-IA costs far more than Deep Archive, and it’s in one AZ only, so compliance data would risk loss.

Q2. A data platform stores many objects. Some suddenly become popular, others go untouched for a long time, and the team can’t predict which. It wants to cut costs automatically without paying extra for retrieval. Which storage class?

  • A. S3 Standard-IA
  • B. S3 Intelligent-Tiering
  • C. S3 Glacier Flexible Retrieval
  • D. S3 One Zone-IA
Answer

B. “Can’t predict” plus “no retrieval fees”. Standard-IA has retrieval fees, so popular files read over and over end up costing more.

Q3. An image site stores originals in S3 Standard and also generates thumbnails. Thumbnails are rarely accessed but must display immediately, and lost ones can be regenerated from the originals. Where should thumbnails go to save the most?

  • A. S3 Standard
  • B. S3 Standard-IA
  • C. S3 One Zone-IA
  • D. S3 Glacier Deep Archive
Answer

C. “Can be regenerated if lost”. Immediate display rules out Glacier, and regenerable data doesn’t need to pay for copies in several AZs.

4.2 Compute costs

Q4. A company has a production app running steadily 24/7, expected to stay for at least 3 years. During that time, the team plans to move some workloads from EC2 to Fargate and Lambda. It wants a large discount while staying flexible. What should it buy?

  • A. 3-year Standard RIs
  • B. 3-year Compute Savings Plans
  • C. Spot Instances
  • D. On-Demand for everything
Answer

B. Compute Savings Plans commit to an hourly spend, so the discount still applies after moving to Fargate or Lambda. Standard RIs lock in an EC2 instance configuration, and the commitment is wasted once workloads move.

Q5. A nightly batch job runs for a few hours, can resume from a checkpoint after interruption, and has no tight deadline. What’s the cheapest approach?

  • A. On-Demand Instances
  • B. 1-year Reserved Instances
  • C. Spot Instances
  • D. Dedicated Hosts
Answer

C. “Can resume from a checkpoint” plus “no tight deadline” → interruptible, and Spot is cheapest.

Q6. A stateless web app runs in an Auto Scaling group, normally needing 4 instances and scaling to 12 at the daily peak. What’s cheapest while staying reliable?

  • A. On-Demand for everything
  • B. Spot for everything
  • C. Cover the 4-instance baseline with Savings Plans, and use Spot for peak instances with several instance types
  • D. Buy 3-year Reserved Instances for 12 instances
Answer

C. Commit for a discount on the baseline, use Spot for the peaks. B, all Spot, is too risky: a reclaim could take out even the baseline. D pays for 8 idle instances most of the day.

4.3 Database costs

Q7. A dev team’s RDS test database is used only on weekdays from 9 a.m. to 6 p.m. and sits idle otherwise. What’s cheapest?

  • A. Buy a 3-year RDS Reserved Instance
  • B. Use EventBridge Scheduler and Lambda to stop the database after hours and start it before work
  • C. Add a read replica
  • D. Turn on Multi-AZ
Answer

B. It’s used 45 of 168 hours a week, so shutting it down the rest of the time saves about 70%. An RI is paid for all 24 hours. It restarts every day, so the automatic restart after 7 days stopped doesn’t matter.

Q8. A new application uses DynamoDB. Traffic is unpredictable: sometimes no requests for hours, occasionally sudden spikes. What’s the cheapest configuration?

  • A. Provisioned mode with fixed capacity sized for the peak
  • B. On-demand mode
  • C. Provisioned mode with reserved capacity
  • D. Migrate to RDS MySQL
Answer

B. “Unpredictable” plus “no requests for hours” → on-demand, which costs nothing when there are no requests.

Q9. A company runs an app on RDS for Oracle, and Oracle licensing is expensive. It wants to cut costs substantially and depend less on commercial databases. What’s the best approach?

  • A. Buy Reserved Instances for the Oracle instance
  • B. Convert the schema with the Schema Conversion Tool, then migrate the data to Aurora PostgreSQL with DMS
  • C. Move Oracle to EC2 and manage it yourself
  • D. Put ElastiCache in front
Answer

B. A only gives a discount, and the license cost remains. C still pays for Oracle licenses on EC2, with more operational work.

4.4 Networking costs

Q10. An app runs in private subnets in 3 AZs, but only AZ-a has a NAT gateway, and all AZs send outbound traffic through it. The bill shows high cross-AZ transfer charges. What’s the best improvement?

  • A. Create a NAT gateway in each AZ and route each AZ’s private subnets to their own AZ’s NAT gateway
  • B. Use a larger NAT gateway
  • C. Move all instances to AZ-a
  • D. Connect the AZs with VPC peering
Answer

A. Each AZ using its own NAT gateway removes cross-AZ charges and the single point of failure. C also saves money but gives up high availability.

Q11. Global users download lots of images and videos straight from an S3 bucket. Outbound transfer costs are high and downloads are slow. How do you lower cost and improve speed at the same time?

  • A. Turn on S3 Transfer Acceleration
  • B. Put CloudFront in front of S3
  • C. Replicate the data to several Regions with CRR
  • D. Use Global Accelerator
Answer

B. S3-to-CloudFront origin fetches are free, CloudFront’s outbound per-GB price is usually lower, cache hits don’t go back to the origin, and downloads get faster. A speeds up uploads and costs extra.

Q12. A company has 3 VPCs that need to reach each other. Traffic is light, and no more VPCs will be added. What’s cheapest?

  • A. Transit Gateway
  • B. VPC peering between each pair of the 3 VPCs
  • C. Site-to-Site VPN between the VPCs
  • D. Direct Connect for every VPC
Answer

B. Connecting 3 VPCs pairwise takes just 3 peering connections, with no hourly charge. Transit Gateway makes more sense with many VPCs.

Q13. The finance team wants to see AWS spend by project and be alerted when a project’s forecast spend for the month exceeds $5,000. What should it do?

  • A. Set up a single CloudWatch billing alarm
  • B. Apply cost allocation tags and use AWS Budgets to set per-tag budgets with forecast alerts
  • C. Check Trusted Advisor manually every week
  • D. Use Compute Optimizer
Answer

B. Splitting costs by project → tags; alerting on forecast spend → Budgets. A CloudWatch billing alarm only watches actual total spend; it can’t split by project or alert on forecasts.


Exam-day strategy

  • 65 questions in 130 minutes, about 2 minutes each. On the first pass, flag questions you’re unsure of and don’t get stuck.
  • Leave 15 minutes at the end to revisit flagged questions. Change an answer only if you find a clear reason.
  • For multiple-response questions, check how many answers to choose.
  • When two options both “work”, reread the last sentence of the question: most cost-effective, least operational overhead, most secure, fewest changes. That sentence often decides the answer.

← All notes