Skip to content

Is Full-Stack Deploy Mandatory for Next.js SSR (Gen 1) Apps on Amplify Hosting, Preventing Frontend-Only Deployment?

0

Subject: Is Full-Stack Deploy Mandatory for Next.js SSR (Gen 1) Apps on Amplify Hosting, Preventing Frontend-Only Deployment? Hello community,

I am deploying a Next.js SSR application that was created as a full-stack Gen 1 Amplify project (it has a backend defined by the local amplify/ folder, which is committed to the Git repository).

During the setup process in the Amplify Console, on the "App settings" page, the following checkbox is checked by default and is unselectable (disabled):

Enable full-stack deploys: This allows you to continuously deploy frontend and backend changes on every code commit.

The Main Question: Is the "Enable full-stack deploys" option intentionally made unselectable (mandatory) when Amplify Hosting detects a Next.js application that contains a Gen 1 Amplify backend (i.e., the amplify/ folder is present)?

If it is mandatory, this suggests that there is no official way to deploy this specific Next.js SSR application (which depends on an Amplify backend) as a frontend-only app on Amplify Hosting. Is this correct?

If I wanted to decouple the deployment pipeline (e.g., deploy the frontend on every commit, but only deploy the backend manually via the CLI), what is the recommended approach for a Next.js SSR / Amplify Gen 1 project?

I am seeking clarification on whether this unselectable setting is the expected behavior for this specific configuration.

asked a year ago197 views

2 Answers
0

Hey,

Hope you're keeping well.

Yes, for Gen 1 Next.js SSR apps, Amplify Hosting automatically enforces full‑stack deploys if the repository contains an amplify/ folder, since the framework build process is integrated with backend provisioning. This is expected behavior and the toggle is intentionally disabled. If you want to decouple, you’d need to remove the backend from the hosting app’s context by deploying the frontend from a repo or branch without the amplify/ folder, and manage backend updates separately via the Amplify CLI (amplify push) or a different pipeline. This effectively turns the hosted app into a frontend‑only deployment while keeping backend changes manual.

Thanks and regards,
Taz

answered a year ago

-1

If this is an Amplify Gen 1 app and the repository contains an amplify/ backend, Amplify may treat the branch as a full-stack deployment. In that case, I would first check the build spec and environment variables rather than relying only on the console toggle.

For a frontend-only build, one option is to remove the backend phase from amplify.yml and set:

AMPLIFY_SKIP_BACKEND_BUILD=true

AWS documents this variable for Gen 1 apps when there is no backend section in the build specification and you want to disable backend builds.

If the goal is not to fully disable backend builds, but only to avoid backend deployments when the backend did not change, then the better fit may be:

AMPLIFY_DIFF_BACKEND=true

That enables conditional backend builds for Gen 1 apps by checking whether the amplify folder changed.

So I would verify:

  1. Whether the app is Amplify Gen 1 or Gen 2.
  2. Whether amplify.yml includes a backend phase.
  3. Whether the desired behavior is “never deploy backend from Amplify Hosting” or “only deploy backend when the backend changes”.

If the backend is managed manually with amplify push or by a separate pipeline, I would keep Amplify Hosting focused on the frontend build and avoid running a backend phase in the hosting build.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.