On going project. Learning and applying what I am learning from freecodecamp.org
This page goes over the steps to create the website. Planning on using [[_HTML | HTML]], [[three.js]] to create some depth in the website.
- https://docs.aws.amazon.com/AmazonS3/latest/userguide/website-hosting-custom-domain-walkthrough.html#website-hosting-custom-domain-walkthrough-domain-registry
- https://victoria.dev/blog/hosting-your-static-site-with-aws-s3-route-53-and-cloudfront/
Used AWS Route 53 to register a domain
- Logged in into https://console.aws.amazon.com
- Navigated to https://console.aws.amazon.com/route53/home#DomainRegistration
- Choose a name: itspanko.com
- Payed 12 USD
- Since I used amazons domain they will manage the Route 53 configurations
To support requests from both the root domain and subdomain, you create two buckets
- Configured the first bucket, the root, with settings in table 1:
- Pressed -> Create Bucket
- Clicked itspanko.com in main dashboard.
- Created a file called [[test.html]]
- Clicked the bucket in the dashboard
- Clicked upload and uploaded the file
- Created another bucket, with name www.itspanko.com, see table 1.
Setting | Value |
---|---|
Bucket Name | itspanko.com |
AWS Region | US East (Ohio) us-east-2 |
Object Ownership | ACLs Disbaled |
Bucket Versioning | Enable |
Tags (1) | CoreData |
Default Encryption | Disable |
Table 1. First Bucket Config |
Configuring appropriate bucket to host website
- Clicked on itspanko.com bucket.
- Properties -> Static website hosting -> Enable
- Hosting type: host a static website.
- Index document: [[test.html]]
- Save Changes
- Navigated to permissions -> Block public access
- Unchecked Block all public access
- Navigated to Bucket policy and paste info
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::itspanko.com/*"
}
]
}
- Navigated back to second bucket: www.itspanko.com
- Navigated to properties -> Static website hosting -> Enable
- Selected redirect and pasted in: itspanko.com
Connecting Route53 to the Amazon S3 domain
- Navigated to Route53 Dashboard page.
- Choose Hosted zones.
- Choose Create record.
- Choose Switch to wizard.
- Choose Simple routing, and choose Next.
- Choose Define simple record.
- In Record name, accept the default value
- In Value/Route traffic to, choose Alias to S3 website endpoint.
- Choose the Region.
- Choose the S3 bucket.
- In Record type, choose A โ Routes traffic to an IPv4 address and some AWS resources.
- For Evaluate target health, choose No.
- Choose Define simple record.
Adding an alias record for subdomain (www.itspanko.com)
- Under Configure records, choose Define simple record.
- In Record name for your subdomain, typed
www
. - In Value/Route traffic to, choose Alias to S3 website endpoint.
- Choose the Region.
- Choose the S3 bucket.
- In Record type, choose A โ Routes traffic to an IPv4 address and some AWS resources.
- For Evaluate target health, choose No.
- Choose Define simple record.
- On the Configure records page, choose Create records
Created a certificate using AWS certificate manager
- Navigated to Security Identity and Compliance -> Certificate Manager
- Requested a new public certificate
- Under fully qualified domain name:
itspanko.com
*.itspanko.com
- Clicked Request
- Clicked on Certificate ID
- Clicked Create records in Route 53
- Clicked Create records