Deploying a Static Website to AWS Amplify from S3

Hosting a static website on AWS is one of the most cost-effective and scalable ways to deploy simple web applications. While Amazon S3 is often used for static hosting, AWS Amplify offers a more streamlined approach with built-in CI/CD, HTTPS, and custom domain support. In this documentation, we'll walk through deploying a static website to AWS Amplify using files from an S3 bucket.

S3 allows users to upload HTML, CSS, JavaScript, and media files to create a static website accessible via a public URL. AWS Amplify provides an easier way to manage website hosting with built-in CDN and scalability.

Step 1: Upload Your Website Files to S3

  1. Open the AWS S3 Console.

  2. Create a new S3 bucket and provide a unique bucket name. Amazon S3 is a global service and the buckets that are created in S3 need unique names, so that they can be globally identifiable.

    Object Ownership in Amazon S3 determines who owns the objects stored in a bucket and how access permissions are managed. As of now, we will go with the ACLs disabled as we are not dealing with multiple AWS accounts.

    As we are hosting a static website and we want to make it publicly accessible, we will not be checking this Block Public Access option.

  3. Click on the bucket and go to the Objects tab.

  4. Click Upload, select all your website files, and hit Upload.

    Ensure that your index.html file is in the root of your upload.

Step 2: Deploy to AWS Amplify

  1. Open the AWS Amplify Console.

  2. Click New AppHost a Web App.

  3. Select Deploy without Git provider (since we’re using S3 files instead of a repository).

  4. Upload the same static website files from your S3 bucket. Make sure you provide the proper location of the file/folder.

  5. Click Deploy.

    AWS Amplify will process the files and provide a deployment URL. You can use this URL to access your website.

One of the biggest advantages of AWS Amplify is its pay-as-you-go pricing. We have manually uploaded files (instead of using GitHub integration), hence Amplify is almost free for short-term hosting. AWS Amplify simplifies hosting by eliminating the need for additional services like CloudFront for HTTPS and Lambda for build automation.