Guide to the Cloud Resume Challenge —Part 1: S3 and Cloudfront
This article series is a walkthrough of the steps & methods I used to create a cloud resume on AWS.
I firmly believe that learning Cloud and DevOps by doing projects is perhaps the best approach to gain meaningful skills. The goal of this article is to help anyone who is trying to complete the Cloud Resume Challenge.
The Cloud Resume Challenge is an ongoing challenge that motivates people to study and get hands-on experience with the cloud, all of it while building a project.
Check out my cloud resume here!
Be sure to understand the ‘why’ and not just the ‘how’ while going through the articles cause, you know, that’s the topmost requirement for a career in Cloud & DevOps.
In this article, we will see the setup of S3 and Cloudfront.
The main component of the project is the website on S3, so let’s start with it!
- Let’s create an S3 bucket, I am going to name this bucket “cloud-resume-challenger-shishir”. The following settings should be used—
-Bucket versioning — not required.
-Block public access — yes.
-Server-side encryption — not required.
- After the bucket has been created, we need to enable static website hosting. For this, go to ‘properties’ and enable static website hosting along with the following settings.
- Add some basic HTML code like given below and upload the content as “index.html”. For now, add a ‘hello-world’ HTML page. (We’ll modify this in later articles, right now the goal is to setup everything)
<h1>Hello World from Shishir.<h1>
- Find the static website endpoint for our bucket in the ‘properties’ section. Try to access it — you’ll see an error come up. Why are we getting this error? Because public access has been disabled. Don’t worry, we’ll be fixing it soon.
Cloudfront will be used to serve our S3 files. Let’s set up CloudFront now.
- The idea is to use Cloudfront for accessing our website. Cloudfront is an AWS service that helps in delivering data at low latency and high transfer speeds. It will be used to serve S3 objects without making the objects publicly accessible.
- Create a CloudFront distribution with the below settings. The rest of the settings can be kept as default.
Note: A new Origin Access Identity was created, Cloudfront populated the name on its own.
- After the distribution is created, Cloudfront will automatically update the policies of your S3 bucket to allow Cloudfront to access your S3 objects. The image below shows the updated policy of the bucket.
- Try to access your hello-world HTML website using the CloudFront URL now.
Congratulations! You have moved one step closer to the finish line.
In the next part, we are going to see -
- Buying a domain name from GoDaddy.
- Setup and Configuration of a domain name.
- Add the records in Route53
- Serve requests to our website using HTTPS instead of HTTP.
The next parts are coming soon.
If you found this article helpful — consider following me here. The things I share here are focused on Cloud & DevOps tools along with sharing a lot of tips and tutorials.