How To Create A Static Website In AWS Serverless Options

In this article, you will learn how to create a static website in AWS serverless options.

Introduction

 
This article explains how to use a S3 service to store our website files and make it a serverless static Website. With the help of Route 53 domain Routing, we can access our website using our own domain from anywhere.
 
Follow the steps:
 
Kick Start!!
 
Select S3 from AWS Management Console under the services.
 
How To Create A Static Website In AWS Serverless Options
 
In S3 Dashboard, click Create Bucket in name of your domain which you want a publish static website to be called.
 
How To Create A Static Website In AWS Serverless Options
 
Type the domain name (example.org) in Bucket name, select the Region which you want, create new settings for this bucket or select existing Bucket and click Next
 
How To Create A Static Website In AWS Serverless Options
 
Select and fill the details and then click Next
 
How To Create A Static Website In AWS Serverless Options
 
Uncheck the Block Public Access to Buckets Files, because we need to access our Website from anywhere
 
How To Create A Static Website In AWS Serverless Options
 
Check the bucket details and Click the CreateBucket.
 
How To Create A Static Website In AWS Serverless Options
 
Here, we can see the Bucket and Upload the websites Files into the Bucket by Clicking the Upload
 
How To Create A Static Website In AWS Serverless Options
 
After uploading the files, select all files and Click Actions and select Make Public, to access all our Website files through index.html. (If we give public access only for index.html means images and animations will not work)
 
How To Create A Static Website In AWS Serverless Options
 
Click Make Public
 
How To Create A Static Website In AWS Serverless Options
 
Click Bucket Properties
 
How To Create A Static Website In AWS Serverless Options
 
Click Static Website Hosting
 
How To Create A Static Website In AWS Serverless Options
 
Click the Use this bucket to host a website
 
How To Create A Static Website In AWS Serverless Options
 
Enter index.html in the index document field and error.html in Error Document field.  Click Save.
 
How To Create A Static Website In AWS Serverless Options
 
We can see Bucket Hosting has been enabled and ready in Properties tab
 
How To Create A Static Website In AWS Serverless Options
 
Select Route 53 from AWS Management Console, under the services
 
How To Create A Static Website In AWS Serverless Options
 
Click Hosted Zones in Route 53 Dashboard.
 
How To Create A Static Website In AWS Serverless Options
 
Click your Domain
 
How To Create A Static Website In AWS Serverless Options
 
We can see the Domain Dashboard
 
How To Create A Static Website In AWS Serverless Options
 
Create an Alias Record set to route our website with S3 bucket.
 
Click Yes button to Alias in the Right side Record set creation Tab.  Now, we need to set Alias Target for Domain Routing.
 
In Alias Target Field, we can see our S3 Bucket example.org (S3-website) name.  Click it.
 
How To Create A Static Website In AWS Serverless Options
 
Click Create, to create our Alias record set.
 
How To Create A Static Website In AWS Serverless Options
 
Now, our A record Alias has been created.
 
How To Create A Static Website In AWS Serverless Options
 
Then, what is next!!  Checkout our browser example.org, its now working.
 
How To Create A Static Website In AWS Serverless Options
 

Summary

 
Finally, we have created one Bucket and made a static website, with our domain name and added the S3 Bucket for public routing in Route53.
 
Thank you for reading this article.  If you like this please like and share.