Upload Web App to My Domain Godaddy

This Blog has been moved from Medium to blogs.tensult.com . All the latest content will be bachelor in that location. Subscribe to our newsletter to stay updated.

In this commodity, I'thou going to explain to yous how you can Host Static website on S3 using a custom domain. Amazon S3 is a highly available and scalable solution.

Amazon S3 Overview

  1. Amazon S3 allows people to store objects (files) in "buckets" (directories).
  2. Buckets must have a globally unique name.
  3. Buckets are defined at the regional level.

Amazon Route53 Overview

  1. Route53 is a Managed DNS (Domain Name Organisation).
  2. DNS is a drove of rules and records which helps the client understand how to attain a server through URLs.
  3. In AWS the well-nigh mutual records are A=URL to IPv4, CNAME=URL to URL, Alias: URL to AWS resource.
  4. Yous pay $0.50 per calendar month per hosted zone.

Working of DNS Route53

When an terminate-user hits a website in its browser say example.com as the domain is purchased from GoDaddy.

And so the DNS asking will go to the GoDaddy server and what we volition do is nosotros tell Godaddy don't manage it yourself let AWS route53 service manage the DNS.

Then the request will go to AWS Route53 Service and it volition host all the DNS requests for our website and the website is hosted on S3. It will become the DNS IP address from the S3 and ultimately nosotros will become the response with the given IP accost and then the terminate-user browsers will directly connect over HTTP or HTTPS to the S3 backend where the website is hosted.

What do we need?

  1. A domain proper name from GoDaddy.
  2. S3 saucepan with the same name as the domain name.
  3. S3 bucket with www subdomain proper name.
  4. AWS Route53 Public Hosted zone.
  5. Static website content.

STEPS

  1. Create an S3 saucepan with a proper name the same every bit your domain name.

example.com bucket

ii. Create another S3 bucket with www subdomain.

world wide web.example.com bucket

iii. Configure S3 main domain bucket to redirect to www subdomain

Select pick 2 and give www subdomain proper name.

iv. Upload website contents to www subdomain bucket.

five. Configure www bucket for website hosting.

Select option one

half-dozen. Add a saucepan policy to brand the bucket contents public.

          {
"Version": "2012-10-17",
"Argument": [
{
"Sid": "PublicReadGetObject",
"Event":"Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::www.instance.com/*"
}
]
}

7. Create AWS route53 public hosted zone with the same proper name as the domain name.

8. Update GoDaddy NS with AWS provided NS.

Update your AWS NS in GoDaddy

9. In AWS Route53 create a recordset for the main domain and select Allonym Checkbox to Yep and point it to S3 chief bucket.

Select Alias checkbox to Yeah

Select S3 bucket website URL in Alias Target

10. In AWS Route53 create a recordset for www subdomain and betoken to S3 www bucket.

Select S3 bucket website URL

eleven. Access the website using your domain name.

Brief Explanation of the to a higher place steps is :

Nosotros demand to have two s3 buckets now; why ii?

Considering generally when yous assess your website you lot will put a name say example.com merely it is an ideal manner to host a website is with www subdomain that is www.example.com.

So how information technology is run in the AWS world? You create s3 buckets with both names and and so you have this domain S3 saucepan redirect the request to www subdomain.

So for that we need two S3 buckets one with main domain and one with world wide web subdomain and then we will configure the principal bucket to redirect traffic to www subdomain and we will actually host all our contents or upload to www subdomain bucket and we will configure this S3 bucket for website hosting in S3.

Now later on we do this next thing we demand to tell Godaddy that all the DNS will be managed by the AWS Route53 service. And for that, we will create the Route53 public Hosted zone which volition give united states the name servers of amazon site. We will update the NS to Godaddy DNS which will finer tell GoDaddy that if y'all go an enquiry for domain proper name example.com only forward the request to amazon NS.

Then in the Amazon Route53 public hosted zone, nosotros volition create record sets for these two domains, master domain and www subdomain which points to corresponding S3 Buckets.

Note: It'south of import that the S3 bucket needs to exist the same equally the domain name.

Go to Route53 service of amazon and you should create a public hosted zone with the same proper noun as your domain proper name.

And so here I already created a hosted zone. If you click this and you see two records which are created by amazon are NS and SOA considering this NS resolves your domain proper name to an IP address. Now copy NS to your GoDaddy DNS management.

At present we demand to create a RecordSet and signal it to S3 by using Alias target and point it to S3. Same way, add recordset for world wide web subdomain & point it to S3 bucket.

Ok, so after completing the higher up-mentioned steps, we tin can verify that your website is running at the address www.example.com

Conclusion

I hope this guide helps you to host a static website on S3 using a custom domain. Share your queries in the comments section and look out for our next mail every bit we share some of our learnings.

inglesibrody.blogspot.com

Source: https://medium.com/tensult/aws-hosting-static-website-on-s3-using-a-custom-domain-cd2782758b2c

0 Response to "Upload Web App to My Domain Godaddy"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel