Prepare to master AWS Amazon CloudFront with these 30 thoughtfully crafted MCQs. Covering topics like creating distributions, origin types, caching behaviors, and viewer-origin policies, this guide will boost your understanding and confidence. Perfect for AWS certification aspirants, these questions focus on real-world scenarios to help you excel in CloudFront configuration and optimization.
Multiple-Choice Questions
1. Setting Up CloudFront
What is the primary purpose of Amazon CloudFront? a) To optimize database queries b) To deliver content with low latency c) To monitor application health d) To manage serverless functions
Which AWS service is commonly used as an origin for CloudFront distributions? a) Amazon DynamoDB b) Amazon EC2 c) AWS Glue d) Amazon QuickSight
A CloudFront distribution can have multiple: a) Cache invalidations b) Edge locations c) Origin servers d) Buckets
What is a key requirement when creating a CloudFront distribution? a) Selecting a region b) Specifying an origin c) Configuring Lambda functions d) Enabling logging
Which of the following is optional during the initial setup of a CloudFront distribution? a) Selecting an origin b) Configuring cache behaviors c) Enabling SSL/TLS d) Setting up access logs
2. Origin Types: S3, EC2, HTTP Servers
Which origin type is best suited for static content like images and videos? a) Amazon EC2 b) Amazon S3 c) HTTP server d) DynamoDB
What is required to use an Amazon S3 bucket as a CloudFront origin? a) Enabling public access to the bucket b) Configuring bucket policies c) Adding an SSL certificate d) Launching a CloudFormation stack
How can you secure an origin when using an EC2 instance? a) Use a NAT Gateway b) Configure an IAM role c) Enable Origin Access Control (OAC) d) Attach a security group
HTTP servers as origins require: a) Integration with AWS Lambda b) Static IP addresses c) A publicly routable DNS name d) Connection to an Amazon VPC
What happens if multiple origins are configured for a CloudFront distribution? a) CloudFront uses the first one by default b) Origin failover occurs automatically c) Cache behaviors decide the origin selection d) All origins are queried simultaneously
3. Configuring Cache Behaviors
Cache behaviors in CloudFront define: a) Compression settings b) Request and response rules c) Cache control policies d) Distribution lifecycle states
Which setting can be configured per cache behavior? a) Price class b) Logging c) TTL values d) Custom error responses
How does CloudFront decide which cache behavior to apply? a) Based on request headers b) By analyzing DNS records c) By matching the URL path pattern d) Randomly
To allow only HTTPS requests, you should: a) Configure viewer protocol policies b) Set up Lambda@Edge c) Use WAF rules d) Modify TTL values
How can you force CloudFront to fetch updated content from the origin? a) Create a new distribution b) Update the origin configuration c) Perform a cache invalidation d) Increase TTL values
4. Customizing Viewer and Origin Policies
Viewer policies control: a) How long content stays in the cache b) The protocols viewers use to access content c) The geographic restrictions for content d) Access to Amazon S3 buckets
An origin policy typically involves: a) Setting distribution pricing b) Configuring custom error responses c) Determining how CloudFront communicates with the origin d) Configuring edge function triggers
Which viewer policy allows both HTTP and HTTPS traffic? a) Redirect to HTTPS b) HTTPS only c) Allow all d) Force HTTP
How can you restrict CloudFront content to authorized users only? a) Enable SSL/TLS encryption b) Use signed URLs or cookies c) Block HTTP traffic d) Configure price classes
What is the purpose of Origin Access Control (OAC)? a) To enforce HTTPS for viewers b) To secure origin communication c) To manage CloudFront edge locations d) To customize cache invalidations
Which policy type allows setting HTTP methods like GET, POST, or DELETE? a) Viewer policy b) Cache behavior policy c) Origin policy d) Field-level encryption policy
You can restrict content access based on geographic locations using: a) Cache invalidations b) Geo-restriction settings c) Lambda@Edge functions d) TTL rules
Custom error pages are configured in: a) Origin policies b) Cache behaviors c) Viewer policies d) Distribution settings
How does CloudFront handle requests for content not in its cache? a) Returns a 404 error b) Fetches the content from the origin c) Invalidates cache automatically d) Redirects to an alternate origin
To enable cross-origin resource sharing (CORS) for a CloudFront distribution, you must: a) Use a custom SSL certificate b) Update origin response headers c) Configure edge locations d) Change viewer policies
Answers Table
Qno
Answer
1
b) To deliver content with low latency
2
b) Amazon EC2
3
c) Origin servers
4
b) Specifying an origin
5
c) Enabling SSL/TLS
6
b) Amazon S3
7
b) Configuring bucket policies
8
c) Enable Origin Access Control (OAC)
9
c) A publicly routable DNS name
10
c) Cache behaviors decide the origin selection
11
b) Request and response rules
12
c) TTL values
13
c) By matching the URL path pattern
14
a) Configure viewer protocol policies
15
c) Perform a cache invalidation
16
b) The protocols viewers use to access content
17
c) Determining how CloudFront communicates with the origin