There are several methods to host your website or web app on AWS, whether you’re developing a web app for a Fortune 500 company, launching a WordPress site for a small business, or simply trying to quickly prototype a concept.
This is a challenge for new users of AWS since, while having all available options at their disposal, it can be challenging to know which alternatives to use and when each is suitable.
Another fundamental aspect of AWS is that there are frequently several methods to do the same task, and some services behave similarly. Determining which AWS hosting package is best for you may be overwhelming, even for an experienced user like me.
You’ve come to the right article if any of this rings a bell. The most common website hosting alternatives, which one is best for your use case, and a brief explanation of how they operate will all be covered in this essay. So let’s get going.
Option 1: Hosting for static S3 websites
Simple Storage Service, sometimes known as Amazon S3, is a general-purpose tool for storing unprocessed data items on the cloud. It is affordable, dependable, and simple to use.
Setting up website hosting with S3 is now simpler than ever, thanks to the people at Amazon. By pressing a few buttons, you can create a website from your index.html file (with an external link!). The AWS website has excellent instructions available here.
After uploading your index.html file and setting up S3 to serve your content via a URL, there are a few more steps to take.
Map Domains Using Route 53
To obtain a customised URL like “mywebsite.com,” you must set up a custom domain name using Amazon Route 53. This is because the URL by default is ugly and resembles something like this: http://bucket-name.s3-website-Region.amazonaws.com – Yuck!
The procedure of setting up a custom domain name is not very difficult. Change your DNS settings, including your NS and A records, to point to your hosted S3 file by heading to the Route53 dashboard. There are several excellent tutorials on the subject that you may use, including this one provided by AWS.
In reality, regardless of the choice you make, you will have to deal with DNS mapping. Therefore I advise you to familiarise yourself with it.