Arkinu
AWS service comparison

Amazon CloudFront vs AWS Global Accelerator: differences and when to use each

Amazon CloudFront
AWS Global Accelerator

Often confused on the examQuestions tend to offer one as a distractor for the other: look for the phrase in the scenario that tips the balance.

Networking and Content Delivery

Amazon CloudFront

Content delivery network (CDN) that delivers static and dynamic web content from edge locations around the world, caching copies retrieved from an origin such as an Amazon S3 bucket or an HTTP server. It reduces latency for users and improves content availability.

Exam phrases that point here

  • «reduce latency for users around the world who download static content»

    CloudFront stores copies of the content in edge locations spread across the world, so each user receives it from a nearby point instead of going all the way to the Region where the origin is.

    When not: If the application does not use HTTP (for example, games or VoIP over UDP) or the core requirement is static IP addresses and failover between Regions, AWS Global Accelerator fits better; it does not serve content from a cache but acts as a proxy for TCP or UDP packets at the edge.

  • «users can access the files in the bucket only through the CDN, not directly»

    With Origin Access Control, CloudFront signs its requests to Amazon S3 and the bucket policy admits only that distribution, so the bucket can remain private.

    When not: If there is no CDN in the scenario and the task is to give temporary access to a specific object, the clue points to Amazon S3 presigned URLs. And if the bucket is configured as a static website (website endpoint), OAC cannot be used.

  • «allow only authorized or paying users to access the content»

    CloudFront can serve private content only when the request is signed, using signed URLs or signed cookies.

    When not: If the requirement is for users to sign in and obtain credentials, think of Amazon Cognito. If access goes directly to S3, with no distribution, the tool is S3 presigned URLs.

  • «block access from certain countries»

    CloudFront geographic restrictions allow lists of allowed or blocked countries; blocked users get a 403 error.

    When not: If you also need to filter by IP, headers, or request rate, combine it with AWS WAF. If the goal is to respond differently depending on the user's location, not to block them, the clue points to Amazon Route 53 geolocation routing.

  • «protect the web application from DDoS attacks and malicious requests at the edge»

    All distributions include AWS Shield Standard at no additional cost, and AWS WAF can be associated with them to allow or block requests before they reach the origin.

    When not: If the scenario calls for advanced protection with a response team and cost protection during attacks, the answer is AWS Shield Advanced. If the application is not HTTP, the edge is not CloudFront but, for example, Global Accelerator.

  • «reduce the load on the origin server»

    Every object that CloudFront serves from its cache is a request the origin does not have to handle; Origin Shield adds a central caching layer that further reduces requests to the origin.

    When not: If the load comes from repeated queries to a database rather than from files or HTTP responses, the solution is usually Amazon ElastiCache or read replicas, not a CDN.

Often paired with

  • Amazon S3
  • Elastic Load Balancing (ELB)
Study Amazon CloudFront →

Networking and Content Delivery

AWS Global Accelerator

Service that gives your application static anycast IP addresses and routes user traffic over the AWS global network to healthy endpoints in one or more Regions, such as load balancers or EC2 instances. It improves the performance and availability of applications with users around the world.

Exam phrases that point here

  • «static IP addresses that clients can add to their allow list»

    Each accelerator gets two static IP addresses that do not change even if endpoints are moved or added in other Regions, so clients configure them only once.

    When not: If a fixed IP address for a single resource in one Region is enough, an Elastic IP address may do. And if the content is HTTP and cacheable, CloudFront also offers anycast static IP addresses; the clue alone does not decide.

  • «UDP traffic for games or VoIP for users around the world»

    Global Accelerator supports TCP and UDP and carries traffic over the AWS global network from the nearest edge location, with lower latency and jitter than over the internet.

    When not: If the content is HTTP and can be cached (images, videos, downloads), the usual answer is Amazon CloudFront.

  • «fail over to another Region in seconds without depending on clients' DNS cache»

    Clients always use the same IP addresses; when an endpoint fails health checks, the accelerator sends new connections to another Region without waiting for DNS records to expire.

    When not: If DNS-based failover is acceptable, Amazon Route 53 with failover routing and health checks may be enough and simpler. And if the problem is the database, the solution is in the data layer (for example, cross-Region replicas), not in network traffic.

  • «send a percentage of traffic to another Region to test a new version»

    The traffic dial of each endpoint group and the weights of each endpoint let you split traffic between Regions or versions, useful for blue/green deployments or A/B tests.

    When not: If everything happens within a single Region, an ALB with weighted target groups solves it. If a DNS-based split is acceptable, Route 53 weighted routing also works.

  • «assign each player to a specific instance and port»

    A custom routing accelerator deterministically maps each accelerator port to an IP address and port on an EC2 instance, based on the application's logic.

    When not: If you only need to spread load across equivalent servers, you do not need custom routing: a standard accelerator or a load balancer is enough.

Often paired with

  • Elastic Load Balancing (ELB)
  • Amazon EC2
Study AWS Global Accelerator →