Getting Started with AWS
Hosting a Static Website

Hosting a Static Website on Amazon Web Services

You can easily and inexpensively use Amazon Web Services (AWS) to host a website that uses client-side technologies (such as HTML, CSS, and JavaScript) and does not require server-side technologies (such as PHP and ASP.NET). This type of site is called a static website, and is used to display content that does not change frequently.

If you want to deploy a website that requires server-side technologies instead, see Getting Started with AWS: Hosting a Web App for Linux or Getting Started with AWS: Hosting a .NET Web App.

After you complete this tutorial, you'll know how to do the following:

  • Deploy a static website – Host your static website using the Amazon Simple Storage Service (Amazon S3) so that it is secure, fast, protected against data loss, and can scale to support enterprise-level traffic. You'll store your website files in Amazon S3 and use Amazon S3 to deliver your content to visitors to your website.

  • Associate your domain name with your website – You can use Amazon Route 53 to tell the Domain Name System (DNS) where to find the resources for your domain, such as your website content in Amazon S3. Alternatively, you can use your domain registrar to route queries to your website.

  • Speed up your website – Use Amazon CloudFront to create a content delivery network (CDN) that makes your website content available from data centers around the world, called edge locations. Using edge locations improves the speed of your website. Doing so is especially important if your website displays large media files such as high-resolution images, audio, or video.

Static Website Hosting Architectures

Before you create and deploy a static website, you must plan your architecture to ensure that it meets your requirements. The following table shows how Amazon S3, Amazon Route 53, and Amazon CloudFront work together to provide a seamless and cost-effective solution.

Requirement Solution

Low-cost, reliable, online storage to host your static website

Amazon S3 is a low-cost, highly reliable web service for hosting static websites.

A reliable and cost-effective way to route customers to your website

Amazon Route 53 maps human-readable domain names to IP addresses and AWS locations.

A way to deliver content with low latency and high data transfer speeds so that visitors to your website don't experience unnecessary delays

CloudFront speeds up the loading of streaming or downloaded static content by caching the content in edge locations. When your customer visits your site, CloudFront delivers the content from the location that is geographically closest to your customer, ensuring the lowest possible latency.

To start hosting a static website on AWS, you'll do the following:

  1. Create a location—an Amazon S3 bucket—where you will store the files for your website, for example HTML, CSS, JavaScript, and image files.

  2. Upload the files to this bucket.

  3. Configure the bucket to act as a website.

After you complete these first steps, visitors can access your website with a URL in the form or

Next, you can add a custom domain to your static website by registering a domain name and configuring AWS as your DNS service provider. Visitors can now access your website with a URL in the form or

Finally, you can improve performance of your website by distributing it through a CDN. Visitors can still access your website with a URL in the form or, but now they download the files from the edge location closest to them.


The following tutorial walks you through the process of hosting a static website on AWS. We'll use the AWS Management Console to access AWS. Before you start this tutorial, be sure to follow the procedures in Setting Up to Host a Static Website on AWS.

  1. Create the Buckets for Your Website

  2. Configure Your Buckets

  3. Deploy Your Website

  4. Register Your Domain Name

  5. Associate a Domain Name with Your Website

  6. Speed Up Your Website

  7. Clean Up

Steps 1 through 3 show you how to create buckets for, configure, and deploy your website. If you want to just create a static website in Amazon S3 and send a link to a customer for review, you perform only steps 1, 2, 3, and 7. However, if you want to associate a domain name with your website, you also do steps 4, 5, and 6.


You can use the AWS Simple Monthly Calculator to estimate what it would cost to host your static website on AWS using Amazon S3, Amazon Route 53, and CloudFront.

Note that if you created your AWS account within the last 12 months, you are eligible for the AWS Free Tier.

For more information about AWS pricing, see Pricing.