How to Host a Static Website on AWS S3 with Custom Domain and SSL (Step-by-Step Guide)


Introduction


it seems to be challenging to host a website by ourself with minimal cost and simple to host. in 
Above diagram shows how we can host a static website using AWS S3 ,Cloudfront, Domain name Provider in our case NameCheap and AWS certificate manager. In this blog we will see step by step process.

Step1.


Create a S3 bucket with same domain name and make this bucket public and upload your sample project inside that folder. in our example we have one page index.html which you can download from github.


Step2:

Request a certificate from AWS certificate manager for both ex: devdojox.com and www.devdojox.com.


Step3:

Once certificate issue add in your dns like cname name and cname value in our case it is namecheap.


Step4:

Go to AWS cloud front and start configuring your origin and different parameter.



Step5

Once everything is complete then we need to map cname with cloudfront in our DNS provider.