Amazon CloudFront — CDN & Edge Delivery
Amazon CloudFront is AWS's content delivery network (CDN): it caches copies of your content at hundreds of edge locations close to users, so requests travel a short distance instead of all the way back to your origin server. This cuts latency for global visitors and offloads traffic from your origin (an S3 bucket, an Application Load Balancer, or any custom web server). For the CLF-C02 exam the danger is mixing CloudFront up with look-alike services — S3 Transfer Acceleration, Global Accelerator, Route 53, and ELB — and misunderstanding caching, TTL, signed URLs, and how it pairs with WAF and Shield.
Q1 A media company serves the same set of product images and videos to users across North America, Europe, and Asia from a single S3 bucket in us-east-1. Asian users complain pages load slowly. Which service most directly fixes this by serving cached copies closer to users?
- Amazon Route 53 latency-based routing
- Amazon CloudFront
- S3 Transfer Acceleration
- Elastic Load Balancing
- A — Route 53 is DNS; latency-based routing only points a user to the nearest endpoint you actually have. With one bucket in one Region there is no closer endpoint, so it cannot help here.
- C — Transfer Acceleration speeds up uploads INTO a bucket over long distances; it does not cache or accelerate downloads to global viewers.
- D — ELB only distributes traffic across servers within a Region; it does nothing to move content closer to far-away users.
Q2 A global team uploads very large video files from offices in Australia and Brazil into an S3 bucket located in Ireland, and the uploads are slow. Which AWS feature is purpose-built to speed up these long-distance uploads?
- S3 Transfer Acceleration
- Amazon CloudFront
- AWS Global Accelerator
- Amazon Route 53
- B — CloudFront caches content for delivery to viewers (downloads). It is not the tool you enable to accelerate the act of uploading source files into a bucket.
- C — Global Accelerator improves routing for application traffic via anycast IPs (TCP/UDP), typically to ALBs/NLBs/EC2 — not for accelerating S3 bucket uploads.
- D — Route 53 is DNS; it resolves names to addresses and does nothing to make file transfers faster.
Q3 A real-time multiplayer game uses non-cacheable TCP and UDP traffic and needs consistent, low-latency routing to backend servers, plus static anycast IP addresses. The content cannot be cached. Which service fits best?
- Amazon CloudFront
- S3 Transfer Acceleration
- AWS Global Accelerator
- Amazon Route 53
- A — CloudFront is a caching CDN optimized for cacheable web/HTTP content. Real-time, non-cacheable game traffic is not a caching workload.
- B — Transfer Acceleration only speeds up transfers to/from an S3 bucket; it is not a general traffic-routing service for game servers.
- D — Route 53 is DNS-based and resolves at name-lookup time; it does not provide static anycast IPs or continuous optimized packet routing.
Q4 A developer wants only paying subscribers to be able to download premium PDF files served through CloudFront, and the link should expire after a set time. Which CloudFront feature provides this?
- Origin Access Control on the S3 bucket
- Signed URLs (or signed cookies)
- A higher cache TTL on the distribution
- AWS WAF rate-based rules
- A — Origin Access Control locks the S3 bucket so it is reachable only through CloudFront (not directly). It protects the origin but does not decide which end users may download a file.
- C — TTL controls how long content stays cached before checking the origin; it has nothing to do with who is allowed to access it.
- D — WAF rate-based rules block abusive request floods; they do not provide per-user, time-limited access to a specific file.
Q5 A team updates a CSS file in their S3 origin, but users keep receiving the old version through CloudFront for hours. Which setting most directly controls how long CloudFront keeps serving the cached copy before it checks the origin again?
- The Time to Live (TTL) for the cache behavior
- The number of edge locations in the distribution
- The Route 53 record's DNS TTL
- The S3 bucket's storage class
- B — You do not choose how many edge locations exist; CloudFront uses its global edge network automatically. Edge count is unrelated to cache freshness.
- C — The DNS TTL in Route 53 controls how long a name-to-address mapping is cached, not how long CloudFront caches your CSS file.
- D — S3 storage class (Standard, Glacier, etc.) affects cost/retrieval of stored objects, not CloudFront's caching duration.
Q6 Which statement best describes the relationship between CloudFront edge locations and AWS Regions?
- Edge locations are the same thing as Availability Zones inside a Region
- Each Region contains exactly one edge location
- Edge locations replace the need for an origin entirely
- Edge locations are separate, far more numerous sites used to cache and deliver content closer to users than Regions are
- A — Availability Zones are isolated data centers inside a Region for high availability; edge locations are a different concept focused on content delivery.
- B — There is no one-edge-per-Region rule; edge locations vastly outnumber Regions and exist in many cities.
- C — Edge locations cache content but still need an origin (S3, ALB, custom server) to fetch the original/uncached content from.
Q7 A company wants to add a managed firewall that inspects incoming HTTP/HTTPS requests for SQL injection and cross-site scripting at the CloudFront edge, before traffic reaches the application. Which service should they attach to the CloudFront distribution?
- AWS Shield Standard
- AWS WAF (Web Application Firewall)
- Amazon GuardDuty
- AWS Config
- A — Shield defends against DDoS (volumetric/flooding) attacks. Shield Standard is automatic, but it does not inspect request content for SQL injection or XSS — that is WAF's job.
- C — GuardDuty is a threat-detection service that analyzes logs/activity for suspicious behavior; it does not sit inline filtering web requests.
- D — AWS Config tracks and audits resource configuration changes; it is a compliance/inventory tool, not a request firewall.
Q8 When you create a CloudFront distribution, you must point it at one or more "origins." Which of the following is a valid CloudFront origin?
- An Amazon Route 53 hosted zone
- An Amazon VPC security group
- An Amazon S3 bucket, an Application Load Balancer, or a custom HTTP server
- An IAM role
- A — Route 53 is a DNS service; a hosted zone holds DNS records, it does not serve content, so it cannot be an origin.
- B — A security group is a virtual firewall controlling network access; it is not a content source.
- D — An IAM role grants permissions; it serves no content and cannot be an origin.
Q9 A web app has static assets (images, JS, CSS) that rarely change and dynamic API responses personalized per user. How can CloudFront help with BOTH types of content?
- CloudFront can only serve static content, so dynamic requests must bypass it entirely
- CloudFront caches static content at the edge and can also accelerate dynamic content by routing it over the AWS network with little or no caching
- CloudFront caches everything for the same fixed duration regardless of content type
- CloudFront converts dynamic content into static content automatically
- A — CloudFront is not static-only; it handles dynamic content too, just with little or no caching, so dynamic traffic does not need to bypass it.
- C — You can set different TTLs and cache behaviors per path/pattern; it is not one fixed duration for everything.
- D — CloudFront does not transform dynamic content into static content; it just delivers it efficiently.
Q10 A startup hosts a static website in an S3 bucket and wants to (1) reduce global latency and (2) stop users from reaching the bucket directly, forcing all traffic through CloudFront. Which combination addresses both goals?
- Enable S3 Transfer Acceleration and make the bucket public
- Use Route 53 failover routing to the bucket
- Move the bucket to a different Region closer to most users
- Put CloudFront in front of the bucket and restrict the bucket so it is accessible only via CloudFront
- A — Transfer Acceleration speeds uploads, not global downloads, and making the bucket public does the opposite of blocking direct access.
- B — Route 53 failover routing is for availability/DNS, not caching or restricting direct bucket access.
- C — Moving the bucket to one Region helps users near that Region but not a truly global audience, and it still does not block direct access.
Q11 An online store experiences traffic spikes when a sale launches. After putting CloudFront in front of the origin, the origin server's load drops noticeably even though total visitor numbers are unchanged. Why?
- Many requests are served from cached copies at edge locations, so fewer requests reach the origin
- CloudFront automatically scales the origin servers up
- CloudFront blocks repeat visitors to reduce load
- CloudFront compresses the database to handle more queries
- B — CloudFront does not scale your origin servers; that would be Auto Scaling. CloudFront simply serves cached responses without hitting the origin.
- C — CloudFront does not block repeat visitors; it serves them faster from cache.
- D — CloudFront does not compress or manage your database; it caches and delivers content.
Q12 A company already uses an Application Load Balancer to spread traffic across EC2 instances in one Region. They add CloudFront in front of it. What does CloudFront add that the ALB alone did not provide?
- It distributes requests across the EC2 instances
- It performs DNS resolution for the domain name
- It caches content at global edge locations to reduce latency for distant users
- It replaces the need for the ALB
- A — Distributing requests across EC2 instances is the ALB's job, not CloudFront's; CloudFront uses the ALB as its origin.
- B — DNS resolution is Route 53's role, not CloudFront's; CloudFront delivers content, it does not resolve domain names.
- D — CloudFront does not replace the ALB; they complement each other — CloudFront at the edge, ALB balancing the backend.
Q13 Which scenario is the WEAKEST fit for using Amazon CloudFront?
- Delivering frequently downloaded software installers to users worldwide
- Serving a popular static marketing website to a global audience
- A purely internal database that is queried only by application servers inside the same Region, with no external content delivery
- Streaming video to viewers across many countries
- A — Distributing software installers worldwide is a classic CDN use case — cache once, serve many users from the edge.
- B — A global static website is exactly what CloudFront is built to accelerate.
- D — Video streaming to many countries benefits strongly from edge caching and CloudFront's media delivery features.
Q14 A team needs to push an urgent fix: an outdated file is still being served from CloudFront's cache and they cannot wait for the TTL to expire. What is the appropriate way to force CloudFront to serve the new version immediately?
- Delete and recreate the entire distribution
- Lower the Route 53 DNS TTL
- Switch the origin from S3 to an ALB
- Create a cache invalidation for the affected file path(s)
- A — Deleting and recreating the distribution is drastic, slow, and unnecessary; it also changes the distribution domain and breaks links.
- B — DNS TTL controls how long the domain's address is cached by resolvers; it has nothing to do with the cached file content at the edge.
- C — Changing the origin type does not clear already-cached objects; the stale copies remain until invalidated or expired.
Q15 A solutions team wants users to be automatically directed to the closest healthy regional endpoint of a multi-Region application, based on DNS resolution and health checks. Which AWS service performs this routing decision?
- Amazon Route 53
- Amazon CloudFront
- Elastic Load Balancing
- S3 Transfer Acceleration
- B — CloudFront caches and delivers content at the edge; it is not the service that resolves domain names to regional endpoints.
- C — ELB distributes traffic among targets within a single Region; it does not route users across Regions via DNS.
- D — Transfer Acceleration only speeds up S3 transfers; it makes no DNS routing decisions.
Q16 Which statement about AWS Shield and CloudFront is accurate for the CLF-C02 exam?
- Shield only works after you manually install an agent on each edge location
- Shield replaces the need for CloudFront caching
- Shield filters HTTP requests for SQL injection at the application layer
- AWS Shield Standard provides automatic, no-cost protection against common DDoS attacks for CloudFront, while Shield Advanced adds enhanced protection for a fee
- A — Shield is a managed AWS service; there is no agent to install on edge locations — protection is built in.
- B — Shield is DDoS protection; it does not provide caching and cannot replace CloudFront's content-delivery role.
- C — Inspecting requests for SQL injection at the application layer is AWS WAF's job, not Shield's. Shield handles DDoS, WAF handles request filtering.