Name:
interface
Value:
Extend your Amplify Gen 2 app with AWS Blocks — self-contained backend capabilities you compose into your existing backend.

Page updated Apr 29, 2024

NewDeploy web apps with Git or your AI coding agent using the latest AWS Amplify. Add managed databases and authentication as you grow. Explore the documentation.
Maintenance ModeYou are viewing Amplify Gen 1 documentation. Amplify Gen 1 has entered maintenance mode and will reach end of life on May 1, 2027. For existing Gen 1 projects, a migration guide and tooling are available to help you upgrade.

Deploy a static site locally

These docs cover Amplify Gen 1. For new web apps, we recommend the latest AWS Amplify, with a simplified CLI and native integrations for databases, storage, and AI models. Get started with the latest AWS Amplify.

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

npx create-react-app amplifyapp
cd amplifyapp

Initialize a new Amplify project

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

Add hosting

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

Deploy the app

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

amplify publish

View in the Amplify Console

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

amplify console