Courseiva
Networking and Content DeliveryeasyMultiple ChoiceObjective-mapped

CloudFront Geo Restriction

A company is using Amazon CloudFront to distribute content globally. The company wants to restrict access to content so that only users from specific countries can access it. Which CloudFront feature should be used?

Quick Answer

The answer is CloudFront geo restriction, which is the correct feature to restrict CloudFront access by country. This feature allows you to create a whitelist or blacklist of countries using a standard two-letter country code, enabling or denying access at the CloudFront edge location before any request reaches your origin. On the AWS Certified SysOps Administrator Associate SOA-C02 exam, this question tests your ability to distinguish between native CloudFront security features and more complex alternatives like AWS WAF or signed URLs. A common trap is confusing geo restriction with origin access identity, which only secures the origin, not the end user, or with signed URLs, which control individual request access rather than geographic boundaries. Remember the key distinction: geo restriction is the simplest, native method for country-based blocking, while WAF offers more granular control but is not the default answer for this specific use case. A helpful memory tip is to think of a "geo fence" — if you need to lock content to a map boundary, geo restriction is your direct tool.

⚠ Common exam trap

Candidates often confuse geo restriction with AWS WAF's geo-match conditions, but the question explicitly asks for a CloudFront feature, and geo restriction is the native, simpler option that does not require WAF integration.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Geo restriction

CloudFront's geo restriction feature (also known as geo-blocking) allows you to allow or block access to your content based on the geographic location of the viewer's IP address. This is the correct choice because the requirement is specifically to restrict access by country, which is exactly what geo restriction does by using a country-level allowlist or blocklist.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • AWS WAF

    Why it's wrong here

    AWS WAF is designed to protect web applications from common exploits like SQL injection and cross-site scripting, operating at Layer 7 to filter requests based on rules such as IP addresses or HTTP headers. While it can block specific IP ranges, it does not natively provide CloudFront's purpose-built country-level geo-restriction functionality for content access. WAF would be the correct choice for mitigating OWASP Top 10 threats or for custom IP blacklisting to protect an application.

  • Signed URLs

    Why it's wrong here

    Signed URLs provide temporary access to specific content, not country-based access control.

  • Geo restriction

    Why this is correct

    Geo restriction (geo-blocking) allows you to allow or deny access to content based on the viewer's country.

  • Origin Access Identity (OAI)

    Why it's wrong here

    OAI restricts access to the origin (e.g., S3 bucket) to only CloudFront, not viewers.

About these practice questions

One of 247 original SOA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on SOA-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company is using Amazon CloudFront to distribute content globally. They want to restrict access to their content so that only users from specific countries can access it. Which TWO actions can be taken to achieve this?

medium
  • A.Configure an S3 bucket policy with a condition for aws:SourceIp.
  • B.Configure CloudFront geo restriction (whitelist or blacklist) at the distribution level.
  • C.Use IAM policies to restrict access based on the user's location.
  • D.Use AWS WAF associated with CloudFront to create a rule that blocks requests based on geographic origin.
  • E.Set up an Application Load Balancer rule to deny traffic from certain IP ranges.

Why B: CloudFront geo restriction allows you to whitelist or blacklist countries at the distribution level, directly controlling access based on the geographic location of the viewer's IP address. This is a native CloudFront feature that does not require additional services, making it a straightforward solution for country-based access control.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SOA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SOA-C02 exam.