skip to Main Content

I created aws S3 bucket as static web site. Everything works perfect. I’ve got the link like:

http://my-bucket-name.s3-website-us-east-1.amazonaws.com

I have my own domain registred by local registrator, it’s already works:

my-site.kiev.ua

This domain has some DNS servers settings

Name-server-1 ns1.servername.com
Name-server-2 ...
Name-server-3 ...

As I understand, I couldn’t move ‘kiev.ua’ ukranian domain to aws. When I tried, I’ve got the masssage:

UnsupportedTLD aws

How can I match this domain with aws S3 bucket static web site then? What I have to do?

2

Answers


  1. Chosen as BEST ANSWER

    This is the answer for http protocol. Create S3 bucket my-site.kiev.ua with public access and add S3 bucket policy (replace '[YOUR_BUCKET_NAME]' with your actual bucket name):

    {
      "Version": "2012-10-17",
      "Statement": [
        {
           "Sid": "PublicReadGetObject",
            "Effect": "Allow", 
            "Principal": "*", 
            "Action": "s3:GetObject", 
            "Resource": "arn:aws:s3:::[YOUR_BUCKET_NAME]/*" 
      } ] 
    }
    

    Then save and set static website hosting true. Create www.my-site.kiev.ua bucket without full access, just add redirect settings to previous bucket in static website hosting part.

    Then go to Route 53 -> Hosted zones -> Create hosted zone. Name my-site.kiev.ua (Public hosted zone) You will see new to fields with types NS and SOA. Copy 4 values from NS Value/Route traffic to and field by field match them with yours DNS-server settings (not in aws, on domain provider side). Then press

    Create record -> Simple routing -> Define simple record -> Match with S3 bucket my-site.kiev.ua -> Create records
    

    And finally create the same record for www connection


  2. You don’t have to have a DNS in AWS to be able to serve a website through your domain.

    Simpler option:
    Create a CNAME record at your DNS provider and point it to the website URL of the S3 bucket that you have. Not 100% sure, but you might have an SSL problem because the S3 website doesn’t have HTTPS

    Better option:

    1. Create the ACM certificate for your website (you will need to add a record in your DNS provider to confirm it)
    2. Create a CloudFront distribution with Origin pointing to your S3 bucket.
    3. Set Alternate Domain Name for your Distribution to my-site.kiev.ua
    4. Copy the CloudFront Distribution DNS name that AWS generates and add a CNAME record in your DNS provider for my-site.kiev.ua to point to this DNS name
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search