Abstract
Hello everyone it’s me candle. We will allocate original domain of Route53 to React hosted in S3.
Condition
- You have a domain at Route53
- You have a bucket with the same name as domain in S3
- Your React is already hosting on S3
Importantly, the bucket of S3 and the domain name acquired by Route53 must be the same name.If you have not created a bucket yet in S3 or React web app is not hosted in S3, please refer to the previous article.
Checking
The domain of Route53
I have joppot.info domain at Route53. I will allocate “reacttest.joppot.info” which is this sub domain to S3.
The bucket of S3
I had created the S3 bucket named “reacttest.joppot.info” and deployed React application to there.
http://reacttest.joppot.info.s3-website-ap-northeast-1.amazonaws.com
Allocate a domain
Actually this work is easy. Go to Route53 screen and select “Hosted zones” from the left menu.
Select the domain you want to allocate.
First push the “Create Record Set”. You will fill in these items afterwards.
- “Name” is empty if you don’t use sub domain.
- “Type” is “A – IPv4 address”
- “Alias” is “Yes”
- “Alias Target” is your created bucket name.
Finally click “Create” button to complete.
After few minutes, you will be able to access it in the allocated domain.
Conclusion
Now you can publish the React application rapidly.