Launching a website on AWS
- Amazon S3
- Amazon Route 53
- Amazon CloudFront
- $3 for domain
-
Set up a custom domain name using Amazon Route 53: can use Amazon Route 53, a domain name system (DNS) service provided by Amazon Web Services, to create a unique and personalized domain name for website. This allows to have a web address that reflects brand or purpose.
-
Host website on an Amazon S3 Bucket: To make website accessible on the internet, can use an Amazon S3 Bucket, a scalable and cost-effective storage service. By storing website's files in an S3 Bucket, ensure that they are securely stored and easily retrievable.
-
Enable static website hosting and link the domain to the S3 bucket: Once website files are stored in the S3 Bucket, can enable static website hosting for the bucket. This feature allows to serve website's content directly from the S3 Bucket, and can then configure Amazon Route 53 to route traffic from custom domain to the S3 Bucket, making website accessible under chosen domain name.
-
Navigate to Route 53 in AWS by using the search
-
Press Register Domain and check desired domain availability. I used ryanonacloud.click and it was available.
-
Selected the domain and completed Pricing and Contact information. I turned off autorenew and set it up for 1 year. The Top level Domain(TLD) was the cheapest option for this project ".click" For the domain to fully register, this took about 15 minutes under this top level domain.
- Navigate to S3 and create a bucket. name the bucket after the domain that was created. I chose the region US East (N. Virginia) us-east-1 for less latency. Uncheck Block all Public Access so the bucket is accessible by others. Everything else I left default.
-
Navigate into bucket and then uploaded index.html file.
-
Added a Bucket Policy under permissions. Template below for the bucket policy. Change the [Bucket-Name] to the bucket name created.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::Bucket-Name/*"
]
}
]
}
- Route 53 - Under Hosted Zones - View the details of the domain and create record. I switched to the wizard and used the Simple Routing Policy.
- I followed the walkthrough Amazon provided: https://docs.aws.amazon.com/AmazonS3/latest/userguide/website-hosting-cloudfront-walkthrough.html