← GlobeSec.ai
GlobeSec SAP-C02 Caching

AWS Solutions Architect Professional — Caching

60 refresher questions — CloudFront, origins & OAC, signed URLs, CloudFront Functions, Lambda@Edge, ElastiCache & scaling to extreme rates

0/60
Correct Answers
0 / 60 answered

Pick an answer to see the explanation. Fundamental questions refresh the basics; Advanced questions are short SAP-style scenarios.

CloudFront OriginsFundamental
Q1.What is the main way Amazon CloudFront improves read performance for global users?
AIt copies the origin bucket into every AWS Region
BIt routes each user to the closest healthy Region by DNS
CIt gives users static anycast IPs into the AWS network
DIt caches content at edge locations near the viewers
✓ Correct: D. It caches content at edge locations near the viewers

How to think about it: CloudFront = CDN: content is cached at edge locations close to users.

Why D is correct: Requests are served from a nearby edge cache, cutting latency and load on the origin.

Why the others are wrong:
A) It copies the origin bucket into every AWS Region — That describes replication, not a CDN; CloudFront caches objects for a TTL.
B) It routes each user to the closest healthy Region by DNS — That is Route 53 latency or geoproximity routing, not caching.
C) It gives users static anycast IPs into the AWS network — Static anycast IPs are a Global Accelerator feature.
CloudFront OriginsFundamental
Q2.Which of these can be configured as a CloudFront origin?
AOnly S3 buckets in the us-east-1 Region
BOnly services that have a public static IP
CAn S3 bucket, a load balancer, or any custom HTTP server
DOnly resources inside the same AWS account
✓ Correct: C. An S3 bucket, a load balancer, or any custom HTTP server

How to think about it: Origins = S3, VPC origins (ALB, NLB, EC2), MediaPackage, any HTTP server.

Why C is correct: CloudFront can front S3, ALB, NLB, EC2, media services and any reachable HTTP endpoint.

Why the others are wrong:
A) Only S3 buckets in the us-east-1 Region — Origins can be in any Region and need not be S3.
B) Only services that have a public static IP — Origins are addressed by DNS names, and VPC origins can even be private.
D) Only resources inside the same AWS account — Custom origins can be any HTTP server, even outside AWS.
CloudFront OriginsFundamental
Q3.An ALB and its EC2 targets sit in private subnets and must be served through CloudFront without any internet exposure. What should be used?
AA CloudFront VPC origin pointing at the internal ALB
BA NAT gateway in the ALB's subnet
CAn S3 origin with Origin Access Control
DA public ALB with an allow rule for 0.0.0.0/0
✓ Correct: A. A CloudFront VPC origin pointing at the internal ALB

How to think about it: Private ALB, NLB or EC2 behind CloudFront = CloudFront VPC origins.

Why A is correct: VPC origins let CloudFront reach ALBs, NLBs or instances in private subnets with no public endpoint.

Why the others are wrong:
B) A NAT gateway in the ALB's subnet — A NAT gateway handles outbound traffic and cannot accept CloudFront requests.
C) An S3 origin with Origin Access Control — OAC protects S3 buckets, not load balancers in a VPC.
D) A public ALB with an allow rule for 0.0.0.0/0 — That exposes the application directly to the internet.
CloudFront OriginsFundamental
Q4.Without VPC origins, what must be true when CloudFront uses an ALB in front of EC2 instances as a custom origin?
ABoth the ALB and the instances must have public IPs
BThe ALB can be internal if the instances are public
CThe instances must be in a placement group
DThe ALB must be public; the instances can stay private
✓ Correct: D. The ALB must be public; the instances can stay private

How to think about it: Classic custom origin: ALB public, instances can be private and only allow the ALB's security group.

Why D is correct: CloudFront reaches the ALB over the internet, and the instances only need to allow the ALB.

Why the others are wrong:
A) Both the ALB and the instances must have public IPs — Instances behind the ALB do not need public addresses.
B) The ALB can be internal if the instances are public — An internal ALB is unreachable from the edge without VPC origins.
C) The instances must be in a placement group — Placement groups affect instance proximity, not CloudFront reachability.
CloudFront OriginsFundamental
Q5.Which origin type is used to deliver video on demand or live streams produced by AWS Elemental services?
AAn Amazon Kinesis data stream
BA DynamoDB table
CAn Amazon EFS file system
DAn AWS Elemental MediaPackage endpoint
✓ Correct: D. An AWS Elemental MediaPackage endpoint

How to think about it: Video packaging origin = MediaPackage endpoint (Elemental Media services).

Why D is correct: MediaPackage prepares streaming formats and is a native CloudFront origin for VOD and live video.

Why the others are wrong:
A) An Amazon Kinesis data stream — Kinesis streams ingest data records and are not a viewer-facing origin.
B) A DynamoDB table — DynamoDB is a database and cannot serve as an HTTP origin.
C) An Amazon EFS file system — EFS is mounted by compute, not addressed directly by CloudFront.
CloudFront OriginsFundamental
Q6.Static content must be fast for users worldwide and can be a few hours stale. Dynamic data must be low-latency in two Regions and updated in near real time. Which pairing fits?
ACloudFront with a TTL of zero for both content types
BCloudFront for static content, S3 CRR for the two-Region data
CS3 CRR to every Region for the static content
DGlobal Accelerator in front of a single bucket for both
✓ Correct: B. CloudFront for static content, S3 CRR for the two-Region data

How to think about it: Global, TTL-cached static = CloudFront. Near-real-time copies in a few Regions = S3 CRR.

Why B is correct: CloudFront caches globally for a TTL, while CRR keeps fresh read copies in chosen Regions.

Why the others are wrong:
A) CloudFront with a TTL of zero for both content types — Zero TTL removes the caching benefit for static content.
C) S3 CRR to every Region for the static content — Replicating to every Region is costly and still lacks edge caching.
D) Global Accelerator in front of a single bucket for both — Global Accelerator does not cache content or replicate data.
CloudFront OriginsAdvanced
Q7.A static site on S3 must stay up even if its primary Region has a problem. What CloudFront design gives Region-level failover?
AA single origin with a long default TTL
BTwo distributions with Route 53 weighted records
CAn origin group over two CRR-synced buckets
DS3 Transfer Acceleration on the primary bucket
✓ Correct: C. An origin group over two CRR-synced buckets

How to think about it: CloudFront failover = origin group (primary + secondary), with CRR keeping the second bucket in sync.

Why C is correct: If the primary returns errors, CloudFront retries the request on the secondary origin.

Why the others are wrong:
A) A single origin with a long default TTL — Long TTLs hide short outages but fail once objects expire.
B) Two distributions with Route 53 weighted records — Weighted records split traffic but do not fail over on origin errors.
D) S3 Transfer Acceleration on the primary bucket — Acceleration speeds uploads and adds no failover.
CloudFront OriginsAdvanced
Q8.An origin group is configured. When does CloudFront send a request to the secondary origin?
AOn a round-robin basis for every other request
BWhen the primary returns a chosen error code or times out
CWhen the primary's CPU utilization passes a threshold
DOnly when a Route 53 health check fails
✓ Correct: B. When the primary returns a chosen error code or times out

How to think about it: Origin group failover triggers on chosen HTTP error codes or connection failures from the primary.

Why B is correct: You pick the status codes, such as 500 or 503, that trigger the retry on the secondary.

Why the others are wrong:
A) On a round-robin basis for every other request — Origin groups are for failover, not load balancing.
C) When the primary's CPU utilization passes a threshold — CloudFront does not see origin CPU; it reacts to HTTP responses.
D) Only when a Route 53 health check fails — Origin group failover works from CloudFront's own response handling.
CloudFront OriginsFundamental
Q9.Does CloudFront support WebSocket connections to the origin?
ANo, WebSocket requires Global Accelerator
BOnly for S3 origins
COnly when Lambda@Edge proxies the connection
DYes, it supports WebSocket connections
✓ Correct: D. Yes, it supports WebSocket connections

How to think about it: CloudFront supports WebSocket as well as HTTP and HTTPS.

Why D is correct: CloudFront can carry WebSocket traffic between viewers and the origin.

Why the others are wrong:
A) No, WebSocket requires Global Accelerator — Global Accelerator can carry it too, but CloudFront supports WebSocket natively.
B) Only for S3 origins — S3 does not serve WebSocket; support is for custom origins.
C) Only when Lambda@Edge proxies the connection — No function is needed for WebSocket support.
CloudFront AccessFundamental
Q10.A private S3 bucket must be readable only through CloudFront. What is the current recommended setup?
AEnable S3 static website hosting with a custom header
BMake the bucket public and rely on a hard-to-guess URL
COrigin Access Control plus a bucket policy allowing the distribution
DAttach a security group to the S3 bucket
✓ Correct: C. Origin Access Control plus a bucket policy allowing the distribution

How to think about it: Lock S3 to CloudFront = Origin Access Control (OAC) + bucket policy (OAI is legacy).

Why C is correct: OAC signs requests to S3, and the bucket policy only allows that distribution.

Why the others are wrong:
A) Enable S3 static website hosting with a custom header — Website endpoints are public and do not support OAC.
B) Make the bucket public and rely on a hard-to-guess URL — A public bucket can be read directly, bypassing CloudFront.
D) Attach a security group to the S3 bucket — S3 buckets do not use security groups.
CloudFront AccessFundamental
Q11.Why is Origin Access Control preferred over the older Origin Access Identity?
AOAC removes the need for any bucket policy
BOAC lets the bucket stay public while still being protected
COAC works with SSE-KMS encrypted objects and all Regions
DOAC caches objects for longer than OAI
✓ Correct: C. OAC works with SSE-KMS encrypted objects and all Regions

How to think about it: OAC beats OAI: supports SSE-KMS, all Regions and more request types.

Why C is correct: OAC supports KMS-encrypted objects, newer Regions and methods such as PUT, which OAI does not.

Why the others are wrong:
A) OAC removes the need for any bucket policy — OAC still relies on a bucket policy granting the CloudFront service.
B) OAC lets the bucket stay public while still being protected — Neither feature needs a public bucket; the goal is a private one.
D) OAC caches objects for longer than OAI — Caching TTLs are set by cache policies, not by the access method.
CloudFront AccessAdvanced
Q12.A custom origin ALB must reject any request that did not come through CloudFront. What is a common approach?
AUse a geo restriction allow list on the distribution
BAdd a secret custom header and require it on the ALB
CUse a CloudFront signed URL for the ALB
DEnable OAC on the ALB origin
✓ Correct: B. Add a secret custom header and require it on the ALB

How to think about it: Block direct ALB hits = CloudFront adds a secret custom header, and the ALB only forwards requests with it.

Why B is correct: Requests without the header are rejected, so direct access to the ALB fails.

Why the others are wrong:
A) Use a geo restriction allow list on the distribution — Geo restriction controls viewers by country; it does not protect the ALB.
C) Use a CloudFront signed URL for the ALB — Signed URLs control viewer access to CloudFront, not who can reach the ALB.
D) Enable OAC on the ALB origin — OAC is for S3 and some AWS origins, not for an ALB.
CloudFront AccessAdvanced
Q13.An origin's security group should accept traffic only from CloudFront. How can this be done without maintaining an IP list by hand?
AAllow the distribution's DNS name in the security group
BAllow the AWS-managed CloudFront prefix list
CUse a network ACL that allows only port 443
DAllow the IP addresses of the users' ISPs
✓ Correct: B. Allow the AWS-managed CloudFront prefix list

How to think about it: Allow only CloudFront IPs = AWS-managed CloudFront origin-facing prefix list in the security group.

Why B is correct: AWS keeps this prefix list updated with CloudFront's origin-facing IP ranges.

Why the others are wrong:
A) Allow the distribution's DNS name in the security group — Security groups match IPs, prefix lists and groups, not DNS names.
C) Use a network ACL that allows only port 443 — A port rule does not limit traffic to CloudFront's addresses.
D) Allow the IP addresses of the users' ISPs — Origin traffic comes from CloudFront, not directly from users.
CloudFront AccessFundamental
Q14.Licensing rules require that a video library not be viewed from certain countries. Which CloudFront feature handles this?
ACloudFront signed cookies per region
BGeographic restriction with a block list of countries
CRoute 53 geolocation routing
DPrice Class 100 on the distribution
✓ Correct: B. Geographic restriction with a block list of countries

How to think about it: Country allow or block list = CloudFront geo restriction.

Why B is correct: CloudFront uses a Geo-IP database to block or allow viewers by country.

Why the others are wrong:
A) CloudFront signed cookies per region — Signed cookies control who can access content, not where they are.
C) Route 53 geolocation routing — Geolocation routing picks a record by location but does not block content.
D) Price Class 100 on the distribution — Price classes limit edge locations for cost, not viewer countries.
CloudFront AccessFundamental
Q15.Paying subscribers should get time-limited access to premium files served through CloudFront. What should the application issue?
AA geo restriction allow list
BA longer cache TTL on the premium objects
CS3 bucket ACLs granting each subscriber read access
DCloudFront signed URLs with an expiry time
✓ Correct: D. CloudFront signed URLs with an expiry time

How to think about it: Time-limited access via CloudFront = signed URLs (one file) or signed cookies (many files).

Why D is correct: The application signs the URL after checking the user, and CloudFront rejects it after it expires.

Why the others are wrong:
A) A geo restriction allow list — Geo restriction filters by country, not by subscription.
B) A longer cache TTL on the premium objects — TTL controls caching, not who may access the content.
C) S3 bucket ACLs granting each subscriber read access — ACLs are disabled by default and do not scale per subscriber.
CloudFront AccessFundamental
Q16.Subscribers must access hundreds of files in a members-only area without each URL being signed separately. What fits best?
ACloudFront signed cookies
BS3 pre-signed URLs for each file
COrigin Access Control
DA separate CloudFront signed URL per file
✓ Correct: A. CloudFront signed cookies

How to think about it: Many files for one user = signed cookies. One file = signed URL.

Why A is correct: One set of signed cookies grants access to many files without changing every URL.

Why the others are wrong:
B) S3 pre-signed URLs for each file — These also need one signature per object and skip CloudFront caching.
C) Origin Access Control — OAC secures CloudFront-to-S3 access, not viewer access.
D) A separate CloudFront signed URL per file — That works but means signing every URL, which is what they want to avoid.
CloudFront AccessFundamental
Q17.What is the recommended way to manage the public keys CloudFront uses to verify signed URLs?
ATrusted key groups that IAM users can manage
BACM certificates attached to the distribution
CIAM access keys of the application's role
DCloudFront key pairs created by the root user
✓ Correct: A. Trusted key groups that IAM users can manage

How to think about it: Signed URL keys = trusted key groups managed through IAM (root key pairs are legacy).

Why A is correct: Key groups are managed with IAM permissions and APIs, so the root user is not needed.

Why the others are wrong:
B) ACM certificates attached to the distribution — ACM certificates provide HTTPS, not URL signing.
C) IAM access keys of the application's role — IAM access keys sign S3 pre-signed URLs, not CloudFront signed URLs.
D) CloudFront key pairs created by the root user — Root-user key pairs still work but are legacy and not recommended.
CloudFront AccessAdvanced
Q18.How does a CloudFront signed URL differ from an S3 pre-signed URL?
ACloudFront signed URLs work only for S3 origins
BCloudFront's covers any origin; S3's acts as the signing principal
CS3 pre-signed URLs are cached at edge locations
DOnly S3 pre-signed URLs can have an expiration time
✓ Correct: B. CloudFront's covers any origin; S3's acts as the signing principal

How to think about it: CloudFront signed URL = any origin, cached, IP and date filters. S3 pre-signed = acts as the signing IAM principal.

Why B is correct: CloudFront URLs can filter by path, IP and dates; S3 pre-signed URLs act with the signer's permissions.

Why the others are wrong:
A) CloudFront signed URLs work only for S3 origins — They protect content from any origin behind the distribution.
C) S3 pre-signed URLs are cached at edge locations — S3 pre-signed URLs go straight to S3 and get no CloudFront caching.
D) Only S3 pre-signed URLs can have an expiration time — Both kinds of URL carry an expiry.
CloudFront AccessFundamental
Q19.Which protection does CloudFront provide automatically at no extra cost?
AAmazon GuardDuty threat detection
BAWS Shield Advanced with a response team
CAWS Shield Standard against common DDoS attacks
DAWS WAF rules blocking SQL injection
✓ Correct: C. AWS Shield Standard against common DDoS attacks

How to think about it: Every distribution gets AWS Shield Standard for network and transport-layer DDoS.

Why C is correct: Shield Standard is included for CloudFront and protects against common layer 3 and 4 attacks.

Why the others are wrong:
A) Amazon GuardDuty threat detection — GuardDuty is a separate service, not a built-in CloudFront feature.
B) AWS Shield Advanced with a response team — Shield Advanced is a paid subscription.
D) AWS WAF rules blocking SQL injection — WAF can be attached, but its web ACLs and rules are configured and billed separately.
CloudFront AccessAdvanced
Q20.A public site behind CloudFront is hit by SQL injection attempts and floods of requests from a few IPs. What should be attached to the distribution?
AAn AWS WAF web ACL with managed rules and a rate-based rule
BA security group on the CloudFront distribution
CA network ACL on the origin subnet
DA CloudFront geo restriction block list
✓ Correct: A. An AWS WAF web ACL with managed rules and a rate-based rule

How to think about it: Layer 7 filtering + per-IP rate limits at the edge = AWS WAF web ACL on CloudFront.

Why A is correct: WAF inspects requests at the edge, blocking injection patterns and IPs that exceed a rate.

Why the others are wrong:
B) A security group on the CloudFront distribution — Distributions do not have security groups, and they cannot inspect SQL.
C) A network ACL on the origin subnet — NACLs filter by IP and port and cannot recognize SQL injection.
D) A CloudFront geo restriction block list — Blocking countries does not stop attacks coming from allowed countries.
CloudFront OpsFundamental
Q21.A company wants to reduce CloudFront costs and accepts that users in the most expensive regions may see higher latency. What should it change?
AEnable origin shield in every Region
BLower the default TTL on all behaviors
CTurn on S3 Transfer Acceleration
DSelect a lower price class such as Price Class 100
✓ Correct: D. Select a lower price class such as Price Class 100

How to think about it: Fewer edge locations to save money = lower price class (All > 200 > 100).

Why D is correct: Lower price classes use only the cheaper edge regions, reducing data transfer cost.

Why the others are wrong:
A) Enable origin shield in every Region — Origin Shield adds a caching layer and its own charges.
B) Lower the default TTL on all behaviors — Shorter TTLs cause more origin fetches and can increase cost.
C) Turn on S3 Transfer Acceleration — Acceleration is an S3 upload feature with extra fees.
CloudFront OpsFundamental
Q22.Which CloudFront price class offers the best performance by using every edge location?
APrice Class 100
BPrice Class 200
CPrice Class Regional
DPrice Class All
✓ Correct: D. Price Class All

How to think about it: Price Class All = every edge, best latency, highest cost.

Why D is correct: It uses all edge locations, giving the best performance at the highest price.

Why the others are wrong:
A) Price Class 100 — Class 100 uses only the least expensive regions.
B) Price Class 200 — Class 200 drops the most expensive regions.
C) Price Class Regional — There is no price class with this name.
CloudFront OpsFundamental
Q23.When an origin returns a 503 error, users should see a branded HTML page and the origin should not be hit repeatedly. What should be configured?
AA Route 53 failover record for the distribution
BA custom error response with an error caching minimum TTL
CAn S3 lifecycle rule for the error page
DA Lambda@Edge viewer request function that retries
✓ Correct: B. A custom error response with an error caching minimum TTL

How to think about it: Friendly error page + fewer origin retries = custom error response with Error Caching Minimum TTL.

Why B is correct: CloudFront returns your error page and caches the error for the TTL, sparing the origin.

Why the others are wrong:
A) A Route 53 failover record for the distribution — DNS failover works at the record level, not for per-response error pages.
C) An S3 lifecycle rule for the error page — Lifecycle rules manage object storage, not HTTP error handling.
D) A Lambda@Edge viewer request function that retries — Retrying on every request increases origin load instead of reducing it.
CloudFront OpsFundamental
Q24.Where do CloudFront's regional edge caches sit in the request path?
AIn front of the edge locations, closer to viewers
BBetween edge locations and the origin
COnly in us-east-1 for all traffic
DInside the customer's VPC next to the origin
✓ Correct: B. Between edge locations and the origin

How to think about it: Viewer > edge location > regional edge cache > origin.

Why B is correct: Regional edge caches hold objects that dropped out of edge caches, reducing origin fetches.

Why the others are wrong:
A) In front of the edge locations, closer to viewers — Edge locations are the closest tier to viewers.
C) Only in us-east-1 for all traffic — Regional edge caches are spread across many locations worldwide.
D) Inside the customer's VPC next to the origin — Regional edge caches are part of the CloudFront network, not customer VPCs.
CloudFront OpsAdvanced
Q25.CloudFront cache hit ratio is low because each request carries different tracking query strings and headers that the origin ignores. What is the best fix?
ARemove the unneeded values from the cache key
BLower the default TTL to one second
CIncrease the price class to Price Class All
DAdd a second origin in another Region
✓ Correct: A. Remove the unneeded values from the cache key

How to think about it: Low hit ratio from noisy headers or query strings = trim the cache key (cache policy or normalize in a CloudFront Function).

Why A is correct: A smaller cache key makes requests for the same object match, raising the hit ratio.

Why the others are wrong:
B) Lower the default TTL to one second — A shorter TTL lowers the hit ratio further.
C) Increase the price class to Price Class All — More edge locations do not fix a fragmented cache key.
D) Add a second origin in another Region — Extra origins do not change how requests are keyed in the cache.
CloudFront OpsFundamental
Q26.Can CloudFront serve HTTPS to viewers while also using HTTPS to the origin?
ANo, traffic to the origin is always plain HTTP
BOnly when the origin is an S3 website endpoint
COnly with Lambda@Edge rewriting the request
DYes, it can use HTTPS on both the viewer and origin sides
✓ Correct: D. Yes, it can use HTTPS on both the viewer and origin sides

How to think about it: CloudFront terminates viewer HTTPS and can use HTTPS to the origin too (end to end).

Why D is correct: You set viewer and origin protocol policies separately, and both can require HTTPS.

Why the others are wrong:
A) No, traffic to the origin is always plain HTTP — Origin protocol policy can be HTTPS only.
B) Only when the origin is an S3 website endpoint — S3 website endpoints support only HTTP to the origin.
C) Only with Lambda@Edge rewriting the request — No function is needed; it is a distribution setting.
CloudFront OpsAdvanced
Q27.A global API on API Gateway needs custom caching behavior, WAF rules and its own CloudFront settings. Which setup gives the most control?
AA Regional API behind your own CloudFront distribution
BAn HTTP API with Global Accelerator for caching
CAn edge-optimized API endpoint with default settings
DA private API endpoint exposed through a NAT gateway
✓ Correct: A. A Regional API behind your own CloudFront distribution

How to think about it: Need your own CloudFront settings = Regional API endpoint behind your own distribution.

Why A is correct: With your own distribution you control cache behaviors, WAF, origins and other settings.

Why the others are wrong:
B) An HTTP API with Global Accelerator for caching — Global Accelerator does not cache content.
C) An edge-optimized API endpoint with default settings — Edge-optimized uses an AWS-managed distribution you cannot customize.
D) A private API endpoint exposed through a NAT gateway — Private APIs are for VPC access, and NAT does not accept inbound traffic.
CloudFront OpsFundamental
Q28.Users worldwide upload files to an S3 bucket. Besides distributing content, how else can CloudFront help here?
AAccept uploads at edge locations and forward them to the S3 origin
BConvert the uploads into EBS snapshots
CStore the uploads permanently in edge caches
DReplicate the bucket to every Region automatically
✓ Correct: A. Accept uploads at edge locations and forward them to the S3 origin

How to think about it: CloudFront also works as an ingress: uploads enter at the nearest edge and ride the AWS network to S3.

Why A is correct: CloudFront supports PUT and POST, so uploads enter the AWS network close to the user.

Why the others are wrong:
B) Convert the uploads into EBS snapshots — CloudFront has no connection to EBS snapshots.
C) Store the uploads permanently in edge caches — Edge caches hold copies for a TTL; they are not durable storage.
D) Replicate the bucket to every Region automatically — CloudFront does not replicate buckets; S3 replication does.
Edge FunctionsFundamental
Q29.Which statement best describes CloudFront Functions?
AFunctions that can trigger on origin request and origin response
BContainers that run next to the origin
CPython or Node.js code run at regional edge caches
DLightweight JavaScript run at edge locations on viewer events
✓ Correct: D. Lightweight JavaScript run at edge locations on viewer events

How to think about it: CloudFront Functions = lightweight JavaScript, sub-ms, viewer events only, millions of requests per second.

Why D is correct: They start in under a millisecond and scale to millions of requests per second.

Why the others are wrong:
A) Functions that can trigger on origin request and origin response — Origin triggers are only available to Lambda@Edge.
B) Containers that run next to the origin — Edge functions are not containers and run in CloudFront's network.
C) Python or Node.js code run at regional edge caches — That describes Lambda@Edge.
Edge FunctionsFundamental
Q30.Which CloudFront event triggers are available to Lambda@Edge?
AAll four viewer and origin events
BOnly on a cache miss at the edge location
COnly origin request and origin response
DOnly viewer request and viewer response
✓ Correct: A. All four viewer and origin events

How to think about it: Lambda@Edge = all four: viewer request/response and origin request/response.

Why A is correct: Lambda@Edge can run at any of the four points in the request flow.

Why the others are wrong:
B) Only on a cache miss at the edge location — Viewer triggers run on every request, cached or not.
C) Only origin request and origin response — Lambda@Edge supports viewer events as well.
D) Only viewer request and viewer response — That is the limit for CloudFront Functions, not Lambda@Edge.
Edge FunctionsFundamental
Q31.In which Region must Lambda@Edge functions be authored before CloudFront replicates them?
AUS East (N. Virginia), us-east-1
BThe Region closest to most viewers
CThe Region of the origin
DAny Region, deployed separately to each
✓ Correct: A. US East (N. Virginia), us-east-1

How to think about it: Lambda@Edge is authored in us-east-1, then replicated worldwide.

Why A is correct: Lambda@Edge functions are created in us-east-1 and CloudFront copies them to its locations.

Why the others are wrong:
B) The Region closest to most viewers — Viewer location does not affect where the function is created.
C) The Region of the origin — The origin Region does not matter for Lambda@Edge authoring.
D) Any Region, deployed separately to each — You author once in us-east-1; CloudFront handles replication.
Edge FunctionsFundamental
Q32.Which languages does Lambda@Edge support?
ANode.js and Python
BAny Lambda runtime, including Java and container images
CJavaScript only
DGo and Rust compiled to WebAssembly
✓ Correct: A. Node.js and Python

How to think about it: Lambda@Edge = Node.js and Python. CloudFront Functions = JavaScript only.

Why A is correct: Lambda@Edge supports these runtimes for edge code.

Why the others are wrong:
B) Any Lambda runtime, including Java and container images — Lambda@Edge supports a limited set of runtimes and no container images.
C) JavaScript only — JavaScript-only describes CloudFront Functions.
D) Go and Rust compiled to WebAssembly — These are not Lambda@Edge runtimes.
Edge FunctionsFundamental
Q33.Which task is the best fit for CloudFront Functions rather than Lambda@Edge?
ACalling DynamoDB to personalize each response
BChanging the response returned by the origin on a cache miss
CReading and changing the HTTP request body
DRewriting URLs and normalizing the cache key on viewer requests
✓ Correct: D. Rewriting URLs and normalizing the cache key on viewer requests

How to think about it: Simple, fast header, URL or cache key changes = CloudFront Functions.

Why D is correct: This is lightweight logic with no network calls, ideal for CloudFront Functions.

Why the others are wrong:
A) Calling DynamoDB to personalize each response — Network access to other services needs Lambda@Edge.
B) Changing the response returned by the origin on a cache miss — Origin response triggers are only available to Lambda@Edge.
C) Reading and changing the HTTP request body — CloudFront Functions cannot access the request body.
Edge FunctionsFundamental
Q34.An edge function must call a third-party service over the network and use the AWS SDK. Which option is required?
ALambda@Edge
BA CloudFront origin request policy
CA CloudFront cache policy
DCloudFront Functions
✓ Correct: A. Lambda@Edge

How to think about it: Network access, AWS SDK, third-party libraries = Lambda@Edge.

Why A is correct: Lambda@Edge has network access and can include libraries such as the AWS SDK.

Why the others are wrong:
B) A CloudFront origin request policy — Origin request policies choose what is forwarded, but run no code.
C) A CloudFront cache policy — Cache policies control caching, not code execution.
D) CloudFront Functions — CloudFront Functions have no network access and tiny package limits.
Edge FunctionsFundamental
Q35.What is a key isolation and limits difference between CloudFront Functions and Lambda@Edge?
ALambda@Edge has the smaller memory and time limits
BCloudFront Functions use process isolation
CBoth run with identical memory limits
DCloudFront Functions can run for up to 30 seconds
✓ Correct: B. CloudFront Functions use process isolation

How to think about it: CF Functions = process-based, tiny memory, sub-ms. Lambda@Edge = VM-based, more memory and seconds of runtime.

Why B is correct: They allow about 2 MB of memory and sub-millisecond runs, while Lambda@Edge runs in VMs with far more.

Why the others are wrong:
A) Lambda@Edge has the smaller memory and time limits — Lambda@Edge allows more memory and seconds of runtime.
C) Both run with identical memory limits — CloudFront Functions have much tighter limits.
D) CloudFront Functions can run for up to 30 seconds — Long runs like that are only possible with Lambda@Edge origin triggers.
Edge FunctionsFundamental
Q36.Which edge option is cheaper per request and has a free tier?
ACloudFront Functions
BAWS Fargate tasks at edge locations
CLambda functions behind API Gateway
DLambda@Edge
✓ Correct: A. CloudFront Functions

How to think about it: Cheapest edge code = CloudFront Functions (about 1/6 of Lambda@Edge price).

Why A is correct: They are priced far below Lambda@Edge per invocation and include a free tier.

Why the others are wrong:
B) AWS Fargate tasks at edge locations — Fargate does not run at CloudFront edge locations.
C) Lambda functions behind API Gateway — These are regional backends, not edge code.
D) Lambda@Edge — Lambda@Edge is charged per request and duration with no free tier.
Edge FunctionsAdvanced
Q37.A team wants a CloudFront Function on viewer requests to validate a JWT, and Lambda@Edge on origin requests to pick content from DynamoDB. Is this allowed?
AYes, because each function is attached to a different event type
BYes, but only if both are written in Python
CNo, a distribution can use only one kind of edge function
DNo, CloudFront Functions cannot inspect headers or tokens
✓ Correct: A. Yes, because each function is attached to a different event type

How to think about it: You can mix them in one behavior, but not on the same event type.

Why A is correct: CloudFront Functions and Lambda@Edge can work together as long as they do not share the same event.

Why the others are wrong:
B) Yes, but only if both are written in Python — CloudFront Functions use JavaScript only.
C) No, a distribution can use only one kind of edge function — Both kinds can be used in the same distribution.
D) No, CloudFront Functions cannot inspect headers or tokens — CloudFront Functions can read headers and validate tokens.
Edge FunctionsAdvanced
Q38.Requests for a large image should return a smaller version when the User-Agent shows a phone. The logic is a simple header check and path rewrite. What is the most cost-effective option?
AA Lambda@Edge origin response function
BSeparate distributions per device with Route 53
CA CloudFront Function that rewrites the path
DAn API Gateway endpoint per device type
✓ Correct: C. A CloudFront Function that rewrites the path

How to think about it: Device-based path rewrite on viewer request = CloudFront Function.

Why C is correct: Reading a header and changing the URI is light work that suits the cheapest edge option.

Why the others are wrong:
A) A Lambda@Edge origin response function — This works but costs more and runs after the origin has already been asked.
B) Separate distributions per device with Route 53 — DNS cannot see the User-Agent header.
D) An API Gateway endpoint per device type — A separate API adds latency and cost for a simple rewrite.
Edge FunctionsAdvanced
Q39.A global app serves a static site from S3 through CloudFront, and dynamic API calls must query a DynamoDB global table from code near users. What fits?
AAn S3 static website with JavaScript calling DynamoDB directly
BLambda@Edge functions that query the DynamoDB table
CCloudFront Functions that query the DynamoDB table
DCloudFront caching of every DynamoDB response for a day
✓ Correct: B. Lambda@Edge functions that query the DynamoDB table

How to think about it: Edge code that queries a database = Lambda@Edge (network access).

Why B is correct: Lambda@Edge runs near users and can call DynamoDB, keeping dynamic latency low.

Why the others are wrong:
A) An S3 static website with JavaScript calling DynamoDB directly — Exposing database calls from the browser is insecure and harder to control.
C) CloudFront Functions that query the DynamoDB table — CloudFront Functions cannot make network calls.
D) CloudFront caching of every DynamoDB response for a day — Dynamic data would be up to a day stale.
Edge FunctionsAdvanced
Q40.European users should be served from an S3 bucket in eu-west-2, others from us-east-1, using one distribution with buckets kept in sync. What logic chooses the origin?
AA lower price class for European edges
BGeo restriction with a block list
CA Lambda@Edge origin request function
DAn origin group with both buckets
✓ Correct: C. A Lambda@Edge origin request function

How to think about it: Pick origin per request with code = Lambda@Edge origin request modifying the origin.

Why C is correct: On a cache miss the function inspects the request and switches to the nearer bucket.

Why the others are wrong:
A) A lower price class for European edges — Price classes change edge coverage, not origin choice.
B) Geo restriction with a block list — Geo restriction blocks or allows viewers, it does not change the origin.
D) An origin group with both buckets — Origin groups only fail over on errors; they do not route by location.
Edge FunctionsFundamental
Q41.What is a common use case for edge functions on CloudFront?
AStoring session data permanently at the edge
BRunning nightly batch ETL jobs
CHosting a relational database at the edge
DA/B testing by sending users to different content versions
✓ Correct: D. A/B testing by sending users to different content versions

How to think about it: Edge functions = request/response changes, auth, A/B tests, bot filtering, redirects.

Why D is correct: Edge code can assign users to variants and rewrite requests with low latency.

Why the others are wrong:
A) Storing session data permanently at the edge — Edge functions have no persistent storage of their own.
B) Running nightly batch ETL jobs — Batch jobs belong in regional compute such as Glue or Batch.
C) Hosting a relational database at the edge — Edge functions do not host databases.
Edge FunctionsAdvanced
Q42.Every request must be checked for a valid token issued by a third-party OIDC provider, which requires calling the provider's endpoint. Where should the check run?
AA geo restriction allow list
BA CloudFront Function on viewer request
CA Lambda@Edge function on viewer request
DOrigin Access Control on the distribution
✓ Correct: C. A Lambda@Edge function on viewer request

How to think about it: Auth that needs a network call to an IdP = Lambda@Edge. Local JWT check only = CloudFront Function.

Why C is correct: It can reach the identity provider over the network before CloudFront serves the content.

Why the others are wrong:
A) A geo restriction allow list — Geo restriction knows the country, not the user's identity.
B) A CloudFront Function on viewer request — CloudFront Functions can verify a token locally but cannot call the provider.
D) Origin Access Control on the distribution — OAC secures CloudFront-to-S3 traffic, not viewer authentication.
ElastiCacheFundamental
Q43.What is the main reason to put ElastiCache in front of an RDS database?
ATo give RDS cross-Region replicas
BTo offload repeated reads from the database
CTo encrypt RDS data at rest
DTo replace RDS as the system of record
✓ Correct: B. To offload repeated reads from the database

How to think about it: ElastiCache = in-memory cache that offloads read-heavy database traffic with very low latency.

Why B is correct: Cached results reduce read load on RDS and speed up responses.

Why the others are wrong:
A) To give RDS cross-Region replicas — Cross-Region replicas are an RDS feature.
C) To encrypt RDS data at rest — Encryption at rest is an RDS setting, not a cache feature.
D) To replace RDS as the system of record — A cache is not the durable source of truth for relational data.
ElastiCacheFundamental
Q44.An application checks ElastiCache first, and on a miss reads RDS and writes the result into the cache. What is this pattern called?
ARead replicas
BWrite-behind with a queue
CLazy loading, also called cache-aside
DWrite-through caching
✓ Correct: C. Lazy loading, also called cache-aside

How to think about it: Check cache, on miss read DB and fill cache = lazy loading (cache-aside).

Why C is correct: Only data that is requested gets cached, filled on a cache miss.

Why the others are wrong:
A) Read replicas — Read replicas copy the database; they are not a cache pattern.
B) Write-behind with a queue — Write-behind buffers writes, not reads.
D) Write-through caching — Write-through updates the cache whenever the database is written.
ElastiCacheFundamental
Q45.What is a known drawback of lazy loading?
AEvery database write also writes to the cache
BIt cannot be used with Redis-compatible engines
CThe cache must hold the entire dataset
DCached data can go stale until it expires
✓ Correct: D. Cached data can go stale until it expires

How to think about it: Lazy loading: stale data and a miss penalty. Fix staleness with a TTL or write-through.

Why D is correct: Updates to the database are not pushed to the cache, so a TTL or invalidation is needed.

Why the others are wrong:
A) Every database write also writes to the cache — That describes write-through, which avoids staleness.
B) It cannot be used with Redis-compatible engines — Lazy loading works with any ElastiCache engine.
C) The cache must hold the entire dataset — Lazy loading caches only requested items.
ElastiCacheFundamental
Q46.Users of a web tier behind a load balancer lose their login when they hit a different instance. How does ElastiCache fix this?
AKeep sessions on instance store volumes
BStore session data in ElastiCache so any instance can read it
CCache sessions in CloudFront
DEnable stickiness so ElastiCache pins users to instances
✓ Correct: B. Store session data in ElastiCache so any instance can read it

How to think about it: Stateless web tier = put sessions in ElastiCache, readable by every instance.

Why B is correct: A shared session store lets any instance pick up the user's session.

Why the others are wrong:
A) Keep sessions on instance store volumes — Local storage is not shared and is lost when the instance stops.
C) Cache sessions in CloudFront — CloudFront caches content, not per-user server sessions.
D) Enable stickiness so ElastiCache pins users to instances — Stickiness is a load balancer feature, not ElastiCache.
ElastiCacheFundamental
Q47.Which statement about adopting ElastiCache is true?
AIt transparently caches every SQL query
BIt works only with DynamoDB tables
CThe application code must be changed to use the cache
DIt is enabled with a checkbox on the RDS instance
✓ Correct: C. The application code must be changed to use the cache

How to think about it: Using ElastiCache usually needs application code changes to read and write the cache.

Why C is correct: The app has to call the cache and decide what to store and when to invalidate.

Why the others are wrong:
A) It transparently caches every SQL query — ElastiCache does not intercept SQL traffic.
B) It works only with DynamoDB tables — ElastiCache can sit in front of any data source.
D) It is enabled with a checkbox on the RDS instance — ElastiCache is a separate service the application talks to.
ElastiCacheFundamental
Q48.A cache needs Multi-AZ automatic failover, read replicas and backups. Which ElastiCache engine type fits?
AMemcached
BDynamoDB Accelerator
CAmazon MemoryDB
DValkey or Redis OSS
✓ Correct: D. Valkey or Redis OSS

How to think about it: Replicas, failover, backups, persistence = Redis OSS / Valkey. Simple multi-threaded sharding = Memcached.

Why D is correct: These engines support replication, Multi-AZ automatic failover, snapshots and restore.

Why the others are wrong:
A) Memcached — Memcached nodes have no replication or automatic failover.
B) DynamoDB Accelerator — DAX caches DynamoDB only and is not an ElastiCache engine.
C) Amazon MemoryDB — MemoryDB is a separate durable in-memory database service, not an ElastiCache engine.
ElastiCacheFundamental
Q49.Which ElastiCache engine uses a multi-threaded architecture and spreads data across nodes by sharding, with no replication?
ARedis OSS with Multi-AZ
BValkey with read replicas
CMemcached
DRedis OSS with cluster mode disabled
✓ Correct: C. Memcached

How to think about it: Memcached = multi-threaded, sharding, no replicas, not persistent.

Why C is correct: Memcached partitions data across nodes and uses multiple threads per node.

Why the others are wrong:
A) Redis OSS with Multi-AZ — Multi-AZ failover relies on replicas, which is not Memcached.
B) Valkey with read replicas — Read replicas are a replication feature Memcached does not offer.
D) Redis OSS with cluster mode disabled — Cluster mode disabled has one shard with replicas, not multi-node sharding without replicas.
ElastiCacheAdvanced
Q50.A gaming app needs a real-time leaderboard ranked by score, highly available across AZs. Which choice fits?
AAn S3 object updated on each score change
BCloudFront with a short TTL
CElastiCache for Valkey or Redis OSS using sorted sets
DElastiCache for Memcached
✓ Correct: C. ElastiCache for Valkey or Redis OSS using sorted sets

How to think about it: Leaderboard = Redis/Valkey sorted sets, with Multi-AZ replicas.

Why C is correct: Sorted sets keep members ranked by score, and replicas give Multi-AZ availability.

Why the others are wrong:
A) An S3 object updated on each score change — S3 is not built for rapid in-place ranking updates.
B) CloudFront with a short TTL — CloudFront caches responses but cannot rank scores.
D) ElastiCache for Memcached — Memcached offers simple key-value storage without sorted sets or replicas.
ElastiCacheAdvanced
Q51.A read-heavy app shows stale prices after updates because of lazy loading. Reads must reflect writes quickly without hammering the database. What should be added?
ARemove the cache and read RDS directly
BWrite-through caching on every update
CSwitch the engine to Memcached
DIncrease the TTL on cached items
✓ Correct: B. Write-through caching on every update

How to think about it: Fresh cache after writes = write-through (often with lazy loading and a TTL).

Why B is correct: Updating the cache on each write keeps reads current while still serving from memory.

Why the others are wrong:
A) Remove the cache and read RDS directly — That gives fresh data but loses the performance benefit.
C) Switch the engine to Memcached — Changing engines does not fix the caching strategy.
D) Increase the TTL on cached items — A longer TTL keeps stale data even longer.
ElastiCacheAdvanced
Q52.A DynamoDB table has hot read keys and needs microsecond reads with no change to the DynamoDB API calls. What fits best?
ADynamoDB Accelerator (DAX)
BDynamoDB global tables
CCloudFront in front of the DynamoDB endpoint
DElastiCache for Memcached with lazy loading
✓ Correct: A. DynamoDB Accelerator (DAX)

How to think about it: DynamoDB cache with the same API = DAX. ElastiCache needs app cache logic.

Why A is correct: DAX is a DynamoDB-compatible in-memory cache, so existing calls work with a DAX client.

Why the others are wrong:
B) DynamoDB global tables — Global tables replicate data across Regions; they are not a cache.
C) CloudFront in front of the DynamoDB endpoint — DynamoDB APIs are signed calls not suited to CDN caching.
D) ElastiCache for Memcached with lazy loading — This works but needs new cache code in the application.
ElastiCacheFundamental
Q53.Why does a cache need an invalidation strategy?
ASo that the cache can scale out automatically
BSo that data is encrypted in transit
CSo that only current data is served when the source changes
DSo that the database can be deleted
✓ Correct: C. So that only current data is served when the source changes

How to think about it: Cache rule: decide how data expires (TTL, write-through, delete on update) so readers get current data.

Why C is correct: Without invalidation, the cache can keep returning outdated values.

Why the others are wrong:
A) So that the cache can scale out automatically — Scaling is about nodes and shards, not invalidation.
B) So that data is encrypted in transit — Encryption is a separate setting.
D) So that the database can be deleted — The database remains the source of truth.
Extreme RatesFundamental
Q54.Where should caching happen first for a global app facing extreme request rates?
AOnly in the compute layer
BAt the edge, with CloudFront
COnly in the database layer
DIn the client's DNS resolver
✓ Correct: B. At the edge, with CloudFront

How to think about it: Stop traffic as early as possible: CloudFront at the edge, then app and database caches.

Why B is correct: Serving from the edge removes load from every layer behind it.

Why the others are wrong:
A) Only in the compute layer — Caching only in compute still sends all traffic through the load balancers.
C) Only in the database layer — Database caches help, but traffic still hits every layer in front.
D) In the client's DNS resolver — DNS caching speeds name lookups, not application responses.
Extreme RatesFundamental
Q55.What is the default steady-state request throttle for API Gateway per account per Region?
AThere is no throttle by default
B10,000 requests per second
C100,000 requests per second
D1,000 requests per second
✓ Correct: B. 10,000 requests per second

How to think about it: API Gateway default = 10,000 requests per second (soft limit).

Why B is correct: This account-level default can be raised through a quota request.

Why the others are wrong:
A) There is no throttle by default — API Gateway applies account-level throttling by default.
C) 100,000 requests per second — That is far above the default and would need a quota increase.
D) 1,000 requests per second — 1,000 is the default Lambda concurrency, not the API Gateway throttle.
Extreme RatesFundamental
Q56.What is the default concurrent execution quota for AWS Lambda per account per Region?
A10,000 concurrent executions
B100 concurrent executions
C1,000 concurrent executions
DUnlimited concurrency
✓ Correct: C. 1,000 concurrent executions

How to think about it: Lambda default concurrency = 1,000 (soft limit, can be raised).

Why C is correct: This shared regional pool can be increased with a quota request.

Why the others are wrong:
A) 10,000 concurrent executions — That figure is the API Gateway throttle, not Lambda concurrency.
B) 100 concurrent executions — This is too low for the standard default.
D) Unlimited concurrency — Lambda concurrency is capped by a regional quota.
Extreme RatesFundamental
Q57.What is the write and read capacity of one provisioned Kinesis Data Streams shard?
AUnlimited, because shards scale automatically
B2 MB/s in and 1 MB/s out
C1 MB/s in and 2 MB/s out
D10 MB/s in and 10 MB/s out
✓ Correct: C. 1 MB/s in and 2 MB/s out

How to think about it: Per shard: 1 MB/s in (or 1,000 records/s) and 2 MB/s out.

Why C is correct: Each shard takes up to 1 MB/s or 1,000 records/s of writes and serves 2 MB/s of reads.

Why the others are wrong:
A) Unlimited, because shards scale automatically — Provisioned shards have fixed limits; you add shards to scale.
B) 2 MB/s in and 1 MB/s out — The figures are reversed; reads get the higher limit.
D) 10 MB/s in and 10 MB/s out — Per-shard limits are far lower than this.
Extreme RatesAdvanced
Q58.An S3 workload using SSE-KMS hits throttling errors at high request rates even though S3 itself is not limited. What should you do first?
ATurn on S3 Intelligent-Tiering
BEnable S3 Transfer Acceleration
CAdd more prefixes to the bucket
DEnable S3 Bucket Keys to cut KMS requests
✓ Correct: D. Enable S3 Bucket Keys to cut KMS requests

How to think about it: SSE-KMS at scale hits KMS request quotas. Fix = S3 Bucket Keys (or a KMS quota raise).

Why D is correct: Bucket Keys reuse a bucket-level key, greatly reducing calls to KMS.

Why the others are wrong:
A) Turn on S3 Intelligent-Tiering — Storage class has no effect on KMS requests.
B) Enable S3 Transfer Acceleration — Acceleration changes the network path, not KMS usage.
C) Add more prefixes to the bucket — More prefixes raise S3 limits but not the KMS call rate.
Extreme RatesAdvanced
Q59.A traffic spike arrives in seconds. Which compute choice scales fastest without waiting for instances to boot?
AAWS Lambda
BEC2 Dedicated Hosts
CECS on EC2 with capacity providers
DAn EC2 Auto Scaling group with a new launch template
✓ Correct: A. AWS Lambda

How to think about it: Scale speed: Lambda fastest, Fargate next, EC2 ASG and ECS on EC2 slowest (boot and bootstrap).

Why A is correct: Lambda adds execution environments in moments, with no instances to launch.

Why the others are wrong:
B) EC2 Dedicated Hosts — Dedicated Hosts add even more provisioning steps.
C) ECS on EC2 with capacity providers — ECS on EC2 may need new instances before tasks can be placed.
D) An EC2 Auto Scaling group with a new launch template — New instances must boot and run bootstrap scripts first.
Extreme RatesAdvanced
Q60.A workload needs millions of IOPS for temporary data on its instances. Which storage choice reaches that level?
AAn S3 bucket with one prefix
BAn EFS file system in General Purpose mode
CA single gp2 volume
DEC2 instance store NVMe volumes
✓ Correct: D. EC2 instance store NVMe volumes

How to think about it: Millions of IOPS = local NVMe instance store. EBS tops out far lower per volume.

Why D is correct: Local NVMe disks can deliver millions of IOPS for scratch data.

Why the others are wrong:
A) An S3 bucket with one prefix — S3 handles thousands of requests per second per prefix, not millions of IOPS.
B) An EFS file system in General Purpose mode — EFS is network storage with lower IOPS per client.
C) A single gp2 volume — gp2 is limited to 16,000 IOPS per volume.