-1

I bought my domain from google suite and realized I couldn't host my own html websites on it, so I went to AWS S3 bucket and deposited them there. Now the problem is how to connect these two services together, so I can use the domain I bought from google and the websites I've uploaded on AWS.

I was going to configure nameservers but google support told me the server would be down for 7 days, so that's a no-no for me. He suggested that I configure with cname and A record, but where do I get these pieces of information?

ricola
  • 61
  • 2
  • 9

1 Answers1

2

In S3, you need to enable virtual hosting of bucket and then use bucketname.s3.amazonaws.com as CName in your DNS configurations. However there is a limitation where lets say you bought the domain my.bucketname.com, you need to rename your bucket name as my.bucketname.com.

Other option is to use AWS Cloudfront and connect S3 as an origin. Then you will get a CName from Cloudfront which you can map in your DNS configurations without any constrains as above.

Ashan
  • 18,898
  • 4
  • 47
  • 67
  • Since I had trouble with the first option I tried proceeding with the second one. I was able to get my cloudfront.net page working but still couldn't connect to my domain. Cname I had to enter by myself www.mywebsite.com so I don't know how that is provided by cloudfront. So my understanding is I only need to configure cname in my DNS configurations and don't need an a record? – ricola Aug 08 '17 at 08:45
  • You also need to add your domain www.mywebsite.com in CloudFront settings as well. To do it, edit the CloudFront distribution. – Ashan Aug 08 '17 at 08:46
  • My cloudfront distribution settings are: Alternate Domain Names (CNAMEs) = mywebsite.com; Domain Name: XXX.cloudfront.net. Which value do I add my domain? – ricola Aug 08 '17 at 09:21
  • For DNS Cname mapping use XXX.cloudfront.net – Ashan Aug 08 '17 at 09:57
  • DNS for record type CNAME I used XXX.cloudfront.net, but still failed to connect... – ricola Aug 08 '17 at 10:15
  • It might take some time for DNS propagation – Ashan Aug 08 '17 at 12:03