Blog

Take a stroll ...

How we host CLOUDAMBLE.com

S3, Route 53, IQ, storage, hosting

CLOUDAMBLE.com happened after seeing post about AWS IQ - "From AWS: AWS IQ enables customers to quickly find, engage, and pay AWS Certified third-party experts for on-demand project work"

Brief exploration on expert sign-up process, led to conclusion that we needed a personal site! ofcourse free-tier gives you S3 hosting but visiting site like cloudamble.com.s3-website-us-east-1.amazonaws.com wouldn't look too professional, we are trying to build a brand :)

In this post, I will show how we used Amazon Web Services (AWS) to host CLOUDAMBLE.com on Amazon Simple Storage Service (S3), let's get started:
S3 Bucket Setup
Go to AWS console and navigate to S3 under Storage
Click "Create" bucket and enter [cloudamble.com] for "Bucket name", note this has to be unique globally and should match your custom domain name
Click "Properties" section, click the "Static Website Hosting"
Select "Use this bucket to host a website", enter "index.html" or your home page
S3 by default applies principle of least privilege access i.e. all public access is turned-off, you will need to explicitly enable the read access
Click on [cloudamble.com] bucket, click "Edit block public access settings" button, and then un-check "Block all public access" option
Click on [cloudamble.com] bucket, click "Bucket Policy button" and add the following JSON

"Version": "2012-10-17",
												"Id": "Policy1573750674956",
												"Statement": [
													{
														"Sid": "Stmt1573750663261",
														"Effect": "Allow",
														"Principal": "*",
														"Action": "s3:GetObject",
														"Resource": "arn:aws:s3:::[BUCKET-NAME]/*"
													}
												]
											

Route 53 Setup
We registered domain using Route 53 which automatically creates a public hosted zone record, next step is to create an "A" record to point to your S3 bucket
Go to AWS console and navigate to Route 53 under Networking & Content Delivery
Click on the "Hosted Zones", click "Create Record Set", make following entries, leave "Name" as blank, "Type" select "A - IPV4 Address", "Alias" select "Yes", "Alias Target" enter your bucket S3 website endpoint (note AWS will populate this automatically)
Handling non-WWW Redirects
We will need this in case someone types CLOUDAMBLE.com in browser, AWS S3 provides flexibility to handle this scenario
Click "Create" bucket and provide and enter [www.cloudamble.com] for "Bucket name"
Click "Properties" section, click the "Static Website Hosting"
Select "Redirect requests", enter [cloudamble.com], and select "Redirect all requests"
S3 Upload Website
Select [cloudamble.com] bucket and click "Upload" button, you can upload entire folder(s)
Verify that site is functioning using custom domain address in browser
Next Step
We will be introducing AWS CloudFront to our site which is content delivery network (CDN) service, a new blog post will follow once those changes are implemented
* Please note AWS keeps pushing frequent updates to the console UI, options might change with time