Are you preparing to take the AWS Certified Solutions Architect Professional certification test? This space will contain articles that cover topics covered in the Solutions Architect Professional certification exam. This article will explain AWS CloudFront, one of the most important Amazon web services. Subscribe to our blog to receive more information on this topic.
Get AWS Certified Solutions Architect Professional – A Free Test
Also read: How to prepare yourself for the AWS Certified Solutions Architect professional exam
This topic addresses the High Availability/Business Continuity topic as mentioned in the table below and as highlighted in AWS Solutions Architect Professional certification blueprint:

What is AWS CloudFront and how does it work?
AWS CloudFront can be used to deliver content to users all over the world via edge locations. Let’s look at some of the key terms used by CloudFront.
Origin Server – This is where you store the original versions on one or more origin server. An origin server is where you will find the definitive version of an object. Other Amazon Web Services could be origin servers, such as an Amazon S3 bucket or an Amazon EC2 instance. CloudFront can also have its own origin.
Distribution – This CloudFront aspect is responsible for routing requests from the user to an edge location to the origin server. You can create two types of distributions: web distributions for HTTP/HTTPS or RTMP distributions for RTMP, and their variants
Edge Cache – These caches are points that are located all over the world to speed up the delivery of content to end users. These caches can hold the data that was recently requested. If the data is not available at an edge location, it will be requested via the origin server.
TTL – Amazon CloudFront allows you to set a minimum time-live (Min TTL), maximum TTL (Max TTL), and default TTL to determine how long CloudFront caches objects at edge locations
Query String parameters – Query strings parameters are often used for returning customized content created by a script running at the origin server
AWS CloudFront CDNDynamic Content
AWS CloudFront can also deliver dynamic content. Below are some key points to consider when delivering dynamic content.
Low TTL – Amazon CloudFront uses your files’ expiration periods (through cache control headers), to determine if it needs to verify the origin to update the file. You can set a shorter expiration period if you anticipate that files will change often. Amazon CloudFront allows you to set a short expiration period.
Query String parameters – These parameters can be used to return custom content created by a script running at the origin server. Optionally, you can configure query strings to be sent to the origin servers and included in the cached object’s unique identity.
Forward headers from the origin – Amazon CloudFront can forward all (or a portion of) request headers directly to your origin server. These headers include information such as the device or country used by your visitors to access your content.
Protocol detection – Amazon CloudFront can be configured to include the protocol (HTTP or HTTPS) of your user’s request in the cache key to uniquely identify an object within the cache.
HTTP Cookies – Amazon CloudFront allows dynamic content to be delivered using HTTP cookies.
How to Create a CloudFront Distribution
Let’s now look at the steps that can be used for creating a CloudFront distribution
Step 1: Login to the AWS console. First, create an origin. Let’s make the origin an S3 bucket. Let’s move on to the S3 section.

Step 2: Next, let us create a bucket. Click on Create bucket.

Step 3: Give the bucket a name and indicate the region. Click on the Next button.

Step 4: Next, when you reach the page ‘Set Permissions,’ ensure that the entity ‘Everyone has the Read permission.

Finally, click on the “Create” button at the bottom of your screen.

Step 5: Next, let’s upload an item to the S3 bucket. Click on the “Upload” button to upload an object to the bucket.

Any file can be added to the “Upload” section.

Click on the Next button.
In the permission section, make sure that the entity ‘Everyone has the Read permission. Finally, click on the Upload button.

Step 6: Now, let’s create the CloudFront distribution. Go to Cloudfront in the AWS console.

Step 7: Next, click on ‘Create distribution’

Choose the web distribution

Cho