Skip to content

Staging and PR previews

Kind Git Amplify URL shape Lifetime
Staging
Long-lived Git branch (and Amplify branch) used as a pre-production environment before promoting to main.
Branch staging https://staging.<app-id>.amplifyapp.com Long-lived
Production Branch main https://main.<app-id>.amplifyapp.com Long-lived
PR preview
Temporary Amplify hosting URL created for a pull request so you can review the built site before merge.
Open pull request https://pr-<n>.<app-id>.amplifyapp.com Until PR closes / branch deleted

Exact hostnames use your Amplify app id. This lab does not add custom domains.

  1. Feature work lands on a short-lived branch
  2. Open a PR into staging - CI must pass; Amplify builds a PR preview
  3. Merge to staging - validate on the staging Amplify URL
  4. Open a PR from staging into main - same CI gate
  5. Merge to main - production Amplify URL updates

Enable branch auto-delete
Amplify setting that removes a preview branch and its URL when the Git branch is deleted.
on the Amplify app so preview branches disappear when the Git branch is deleted. That cleans up preview URLs; it does not delete the Amplify app itself.