How to Setup an Amazon AWS Static Page with Customized URL Instead of Default Endpoint

When utilizing Amazon AWS S3 for hosting static websites, the default URL provided is an S3 Endpoint. As a data scientist or software engineer, you might have come across situations where you need to replace this Endpoint with a more professional and user-friendly URL. This article provides a step-by-step guide to achieve this. The guide assumes that you already have an AWS account and basic knowledge of AWS services.

How to Setup an Amazon AWS Static Page with Customized URL Instead of Default Endpoint

When utilizing Amazon AWS S3 for hosting static websites, the default URL provided is an S3 Endpoint. As a data scientist or software engineer, you might have come across situations where you need to replace this Endpoint with a more professional and user-friendly URL. This article provides a step-by-step guide to achieve this. The guide assumes that you already have an AWS account and basic knowledge of AWS services.

Step 1: Create an S3 Bucket and Upload Your Website

Firstly, you need an S3 bucket to host your static website.

  • Navigate to the S3 service in your AWS console.
  • Click on “Create bucket”.
  • Provide a unique name for your bucket, such as “mywebsite.com”.
  • Select the appropriate region.
  • Keep the default settings and click “Create”.

After creating the bucket, upload your static website files to it.

Step 2: Enable Static Website Hosting

To make your bucket serve your static website:

  • Click on the bucket name.
  • Navigate to the “Properties” tab.
  • Scroll down to the “Static website hosting” section and click “Edit”.
  • Choose “Enable” and specify the “Index document” (usually “index.html”).
  • Save your changes.

Step 3: Set Bucket Policy

You must change your bucket’s permissions to allow public access.

  • Navigate to the “Permissions” tab.
  • Click “Bucket Policy”.
  • Add the following policy, replacing “mywebsite.com” with your bucket name:
{
"Version":"2012-10-17",
"Statement":[{
	"Sid":"PublicReadGetObject",
        "Effect":"Allow",
	  "Principal": "*",
      "Action":["s3:GetObject"],
      "Resource":["arn:aws:s3:::mywebsite.com/*"
      ]
    }
  ]
}
  • Save your changes.

Step 4: Register a Domain Name

To replace the default S3 Endpoint, you need a custom domain name. AWS Route 53 service can help you register one.

  • Go to the AWS Route 53 console.
  • Click “Domain Registration”.
  • Follow the steps to register your domain.

Step 5: Create a Hosted Zone

After successful domain registration, create a hosted zone.

  • Navigate to the “Hosted zones” in the AWS Route 53 console.
  • Click “Create Hosted Zone”.
  • Enter your domain name and keep the default settings.
  • Click “Create”.

Step 6: Create Record Set

Now, you need to connect your S3 bucket with your domain.

  • Click on the domain name under “Hosted zones”.
  • Click “Create Record Set”.
  • Leave the name blank for the root domain.
  • Choose “Yes” for “Alias”.
  • Choose your S3 bucket for “Alias Target”.
  • Click “Create”.

You have now successfully replaced the default AWS S3 Endpoint with your custom domain name. It may take some time for DNS to propagate your changes. Once done, you can access your static website using your new URL.

This guide should provide a straightforward method to replace the default AWS S3 Endpoint with a customized URL. It not only enhances the professional look of your website but also improves the user experience. With AWS services, managing your static website’s URL becomes a breeze.


This guide aims to assist data scientists and software engineers in navigating the AWS environment effectively. With just a few steps, you can convey a more professional image, delivering a user-friendly web experience. Master these skills, and bring your AWS static page hosting to the next level!


© 2023 John Doe, Data Scientist and AWS Enthusiast


About Saturn Cloud

Saturn Cloud is your all-in-one solution for data science & ML development, deployment, and data pipelines in the cloud. Spin up a notebook with 4TB of RAM, add a GPU, connect to a distributed cluster of workers, and more. Join today and get 150 hours of free compute per month.