View a markdown version of this page

Migrate from Amplify Hosting - AWS Amplify

Migrate from Amplify Hosting

You can move a web app from Amplify Hosting to AWS Amplify. You run both apps side by side, and only the custom domain transfer causes downtime. For a feature-by-feature comparison of the two products, see AWS Amplify (Amplify Gen 3) and Amplify Hosting compared.

The migration has two parts:

Migrate with your agent

Give your coding agent the following prompt in your app folder. The agent follows the steps in Steps to migrate your app, and stops before the custom domain transfer to ask you to confirm.

Migrate my app from Amplify Hosting to AWS Amplify by following these instructions: https://docs.aws.amazon.com/amplify/latest/userguide/migrate-app.md Stop before the custom domain transfer and ask me to confirm.

Why move to Amplify

  • A managed backend. Add a Postgres database, user sign-in, and a Data API to your app. Each environment keeps its data in its own backend branches. For more information, see Backends.

  • Flat-rate pricing. Amplify plans have a fixed monthly price that includes set usage and features. On Amplify Hosting, you pay separately for build minutes, storage, data served, and server-side requests. For more information, see Pricing and spend limits.

  • Access control with sign-in. Restrict an environment with IAM Identity Center or your own OpenID Connect (OIDC) provider, instead of a shared password.

  • Safer releases. Roll back to an earlier deployment instantly, and release gradually with canary or linear rollouts.

  • Framework adapters. Next.js, Nuxt, Astro, and SvelteKit each have an Amplify adapter. On Amplify Hosting, Astro and SvelteKit need community adapters.

  • On-demand revalidation and streaming. Refresh or purge cached pages by tag with aws amplifygen3 cache revalidate and aws amplifygen3 cache purge, without deploying again. Server-rendered pages and API routes can stream a response, for example from an AI model.

For the full list, see Key features and AWS Amplify (Amplify Gen 3) and Amplify Hosting compared.

Migration approach

You run the two apps side by side:

  1. Create an Amplify app from the same repository or source code (Step 1). Your Amplify Hosting app keeps serving traffic.

  2. Move access settings, build settings, environment variables, branches, and redirects, rewrites, and headers to the Amplify app (Steps 2 to 6).

  3. Deploy and test the Amplify app at its default URL, and set up monitoring (Steps 7 and 8).

  4. Transfer your custom domain (Step 9). This is the only step with downtime: your site is unavailable on the custom domain while Amplify sets up the domain.

  5. Decommission the Amplify Hosting app once you no longer need it as a fallback.

Steps 1 to 8 are in Steps to migrate your app. Step 9 and the decommission step are in Transfer your custom domain from Amplify Hosting. Nothing changes for your users before the domain transfer, so you can stop at any point and keep using Amplify Hosting.