Page updated Jan 16, 2024

Preview: AWS Amplify's new code-first DX (Gen 2)

The next generation of Amplify's backend building experience with a TypeScript-first DX.

Get started

Deploy and host app

You've successfully built your first app with Amplify! Now that you've built something, it's time to deploy it to the web with Amplify Hosting!

Add hosting to your app

You can manually deploy your web app or setup automatic continuous deployment. In this guide we'll cover how to manually deploy and host your static web app to quickly share with others. If you want to learn about continuous deployment instead, please follow this guide.

From the root of your project, run the following command:

1amplify add hosting

Select the defaults for the following prompts:

1? Select the plugin module to execute: Hosting with Amplify Console (Managed hosting with custom domains, Continuous deployment)
2? Choose a type: Manual Deployment

Publish your app

Run the following command to publish your app.

1amplify publish

Congratulations, your app is online!

image

After publishing, your terminal will display your app URL hosted on a amplifyapp.com domain. Whenever you have additional changes to publish, just re-run the amplify publish command.

You may get an "AccessDenied" error if your app's distribution directory is not set properly. To fix this, change the distribution directory via amplify configure project and then re-run amplify publish.

To view your app and hosting configuration in the Amplify Console, run the amplify console command.

Note: To delete all the environments of the project from the cloud and wipe out all the local files created by Amplify CLI, run amplify delete command.