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 an Amplify project with Next.js! Now that you've built something, it's time to deploy it to the web with Amplify Console!

Add hosting to your app

You can deploy Next.js SSR apps with AWS Amplify's CI/CD and hosting service. In this guide you'll cover how to deploy and host your SSR web apps to quickly share with others. If you want to learn more about continuous deployment, please see this guide.

Set up CI/CD for your app

From the root of your project, run the following command and select the bolded options.

1amplify add hosting

Next.js apps can only be deployed with Continuous deployment. We currently do not support manual deployments of Next.js apps meaning the amplify publish command cannot be used to deploy Next.js apps, at this tme.

1? Select the plugin module to execute: # Hosting with Amplify Console (Managed hosting with custom domains, Continuous deployment)
2? Choose a type: # Continuous deployment (Git-based deployments)

The Amplify Console opens and displays your deployed backend environment.

image

Choose the Frontend environments tab, select a Git provider, then choose Connect Branch.

image

Follow the steps in the Amplify console to choose the branch to connect, and deploy your app.

After your site is successfully deployed, you'll see four green checkmarks. To view the live site, click on the automatically generated URL circled in red in the following screenshot.

image

👏 Congratulations, your app is online!