Transfer Site From Godaddy to Aws Upload Not Working.

This Blog has been moved from Medium to blogs.tensult.com . All the latest content will exist available there. Subscribe to our newsletter to stay updated.

In this article, I'm going to explain to you how you lot can Host Static website on S3 using a custom domain. Amazon S3 is a highly bachelor and scalable solution.

Amazon S3 Overview

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

Amazon Route53 Overview

  1. Route53 is a Managed DNS (Domain Proper name Arrangement).
  2. DNS is a collection of rules and records which helps the client empathise how to reach a server through URLs.
  3. In AWS the near common records are A=URL to IPv4, CNAME=URL to URL, Allonym: URL to AWS resource.
  4. You pay $0.l per calendar month per hosted zone.

Working of DNS Route53

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

And then the DNS request will get to the GoDaddy server and what nosotros volition do is nosotros tell Godaddy don't manage it yourself let AWS route53 service manage the DNS.

So the request will go to AWS Route53 Service and information technology volition host all the DNS requests for our website and the website is hosted on S3. It volition get the DNS IP address from the S3 and ultimately we will become the response with the given IP address and then the end-user browsers will straight connect over HTTP or HTTPS to the S3 backend where the website is hosted.

What practice we demand?

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

STEPS

  1. Create an S3 bucket with a name the same as your domain proper name.

example.com bucket

2. Create some other S3 saucepan with www subdomain.

www.example.com saucepan

3. Configure S3 chief domain bucket to redirect to world wide web subdomain

Select option ii and requite www subdomain name.

4. Upload website contents to world wide web subdomain bucket.

5. Configure www bucket for website hosting.

Select option one

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

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

7. Create AWS route53 public hosted zone with the same 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 Aye and point it to S3 main bucket.

Select Allonym checkbox to YES

Select S3 saucepan website URL in Alias Target

x. 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 proper noun.

Brief Explanation of the in a higher place steps is :

We need to have two s3 buckets now; why two?

Considering generally when you assess your website you volition put a name say example.com but it is an ideal manner to host a website is with world wide web subdomain that is www.example.com.

And so how it is run in the AWS world? You create s3 buckets with both names and then yous have this domain S3 bucket redirect the request to www subdomain.

So for that nosotros need 2 S3 buckets ane with primary domain and 1 with www subdomain and then we will configure the main bucket to redirect traffic to world wide web subdomain and we volition actually host all our contents or upload to world wide web subdomain saucepan and nosotros volition configure this S3 bucket for website hosting in S3.

At present after nosotros exercise this side by side thing we need to tell Godaddy that all the DNS will be managed past the AWS Route53 service. And for that, nosotros will create the Route53 public Hosted zone which volition requite usa the proper noun servers of amazon site. Nosotros volition update the NS to Godaddy DNS which will effectively tell GoDaddy that if you get an inquiry for domain proper noun case.com but forward the asking to amazon NS.

And then in the Amazon Route53 public hosted zone, nosotros volition create record sets for these ii domains, main domain and www subdomain which points to respective S3 Buckets.

Notation: It'south important that the S3 saucepan needs to be the same every bit the domain name.

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

So hither I already created a hosted zone. If you click this and you run into two records which are created past amazon are NS and SOA because this NS resolves your domain name to an IP accost. At present copy NS to your GoDaddy DNS management.

Now we need to create a RecordSet and point it to S3 by using Alias target and bespeak it to S3. Aforementioned way, add recordset for www subdomain & point it to S3 bucket.

Ok, and so after completing the above-mentioned steps, we tin verify that your website is running at the address www.instance.com

Conclusion

I hope this guide helps y'all to host a static website on S3 using a custom domain. Share your queries in the comments section and expect out for our side by side post as we share some of our learnings.

forsheefreat1954.blogspot.com

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

0 Response to "Transfer Site From Godaddy to Aws Upload Not Working."

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel