< Blog

Signing-Up for Amazon CloudFront

By now you know that my plan was to setup Content Delivery Network (CDN) to use the Microsoft Azure CDN service. Unfortunately over a four-month period I could never get Microsoft Azure and CDN to work together, so I turned to Amazon CloudFront.

Long story short, in frustration, I decided to setup Amazon CloudFront, which is Amazon’s version of a CDN mostly because a friend of mine @ToddLamo told me that it was easy to setup.

He was right! It took about two hours from start to finish. Okay, it may have taken more time than that, but a good chunk of that time was documenting the process for this blog post.

Let’s get started! If you don’t have an Amazon account, you’ll need to create one. After I show you how to create an account and setup CloudFront Distributions, I’ll show you how to create an Identity & Access Management (IAM) account. In my next blog post, I will show you how I added the CDN (HTTPS) storage to WordPress.

Creating an Account on Amazon Web Services (AWS)

I’m going to start by setting-up the Free Account.

Amazon CloudFront-Create a Free Account

Click on Create a Free Account.

Amazon CloudFront-Sign In

Enter your email address and then select, “I am a new user.” Next select, “Sign in using our secure server.”

Amazon CloudFront-Login Credentials

Fill in your name and email address, as per the instructions, and then provide a secure password. Then click on Create account.

Amazon CloudFront-Contact Information

Next complete the contact details and enter the security check information. Make sure to select the check box for the AWS Customer Agreement before clicking on the Create Account and Continue button.

Amazon CloudFront-Payment Information

Enter your credit card information. Once completed click Continue.

Amazon CloudFront-Identity Verification

At this step, Identity Verification, I entered my office number and then clicked on Call Me Now.

Amazon CloudFront-Identity Verification-2

Within a minute my phone rang. I then entered the PIN on the keypad.

Amazon CloudFront-Identity Verification-3

As soon as the PIN was entered my Identity Verification was completed. I then clicked on Continue to select your Support Plan.

Amazon CloudFront-Support Plan

I selected the Basic plan and clicked Continue. This step completes the registration process. Now you go back to the AWS’ home page.

Amazon CloudFront

Amazon CloudFront-AWS Home Page

Back at the AWS home page, click on the Sign in to the CloudFront console button.

Amazon CloudFront-AWS Sign In

Enter your password and click on, Sign in using our secure server.

Amazon CloudFront-Create Distribution

Click Create Distribution.

Amazon CloudFront-Get Started

Click Get Started under the Web section.

Amazon CloudFront-Create Distribution-2

In the Origin Domain Name space enter your domain name. In this example, I am using www.garthian.com. Adding the origin domain name will auto-populate the Origin ID. Next, select the Match Viewer radio button under Origin Protocol Policy.

Amazon CloudFront-Distribution Settings

Since I’m using a CNAME for my site, I scrolled down to the Distribution Settings section. In the Alternate Domain Names (CNAMEs) field, I entered the CNAME.

Amazon CloudFront-Create Distribution-3

Next, scroll down to the bottom of the page and click on the Create Distribution button. Doing so will return you to CloudFront Distributions.

Amazon CloudFront-Status

Wait until the Status (see the purple arrow) is marked as completed. While this is finishing-up you can move onto the next step. Setting-up an Identity & Access Management (IAM) account.

Identity & Access Management (IAM)

Amazon CloudFront-IAM

In the top-left corner of the page click on Services. Then click on IAM.

Amazon CloudFront-Add User

Select the Users node and then click on Add user.

Amazon CloudFront-Access Type

In the User name field enter a user name and then make sure to select the Programmatic access check box under Access type. Click on the Next: Permissions button.

Amazon CloudFront-Permissions

Click on Attach existing policies directly.

Amazon CloudFront-Permissions-2

Select the check box next to CloudFrontFullAccess and then scroll down to the bottom of the page and click on the Next: Review button.

Amazon CloudFront-Create User

Click on the Create user button.

Amazon CloudFront-Close

Finally success! Make note of your Access key ID and Secret access key. I like to copy and paste these into Notepad. Click Close when you are done.

Amazon CloudFront-CloudFront

Next I’ll confirm that the CloudFront distribution deployment completed. Click on Services in the top-left corner of the page and then click on CloudFront.

Amazon CloudFront-Deployed

Confirm that your status says Deployed. Click on the ID link.

Amazon CloudFront-General Tab

Make a note of your Domain Name; I like to copy and paste it into Notepad. You will need this information for the next blog post on how to add CDN into WordPress. I will also show you how to set-up CloudFront in order to use HTTPS. In the final blog post of this set, I will show you my website’s speed test/performance results and tell you about the lessons that I learned.

If you have any questions, please feel free to contact me @GarthMJ.