Page updated Jan 16, 2024

Deploy a static site locally

This guide will show you how to host a static site from a local Amplify project using Amplify hosting.

In this example you will be deploying a React app, but you can also use any of the following types of projects or frameworks:

  • Static HTML
  • Vue
  • Angular
  • Solid
  • Svelte

Create a new web app and change into the directory

1npx create-react-app amplifyapp
2cd amplifyapp

Initialize a new Amplify project

1amplify init
3# Follow the steps to give the project a name, environment name, and set the default text editor.
4# Accept defaults for everything else and choose your AWS Profile.

Add hosting

1amplify add hosting
3? Select the plugin module to execute: Hosting with Amplify Console
4? Choose a type: Manual Deployment

Deploy the app

Now, the app is ready to deploy. To do so, you can run the publish command.

1amplify publish

View in the Amplify Console

To view the project in the Amplify Console at any time, you can run the console command:

1amplify console