- Newest
- Most votes
- Most comments
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
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:
- Whether the app is Amplify Gen 1 or Gen 2.
- Whether
amplify.ymlincludes abackendphase. - 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
Relevant content
asked 2 years ago
asked a year ago
- AWS OFFICIALUpdated 5 years ago
- AWS OFFICIALUpdated 5 years ago
