Restricting access to branches - AWS Amplify Hosting

Restricting access to branches

If you are working on unreleased features, you can password protect feature branches to restrict access to specific users. When access control is set on a branch, users are prompted for a user name and password when they attempt to access the URL for the branch.

You can set a password that applies to an individual branch or globally to all connected branches. When access control is enabled at both the branch and global level, the branch level password takes precedence over a global (application) level password.

To set passwords on feature branches
  1. Sign in to the AWS Management Console and open the Amplify console.

  2. Choose the app you want to set feature branch passwords on.

  3. In the navigation pane, choose App settings, and then choose Access control.

  4. In the Access control settings section, choose Manage access.

  5. Do one of the following in Access control settings:

    • To set a username and password that applies to all connected branches, turn on Apply a global password. For example, if you have main, dev, and feature branches connected, you can use a global password to set the same username and password for all branches.

    • To apply a username and password to an individual branch, turn off Apply a global password. For the branch that you want to set a unique username and password for, choose Restricted-password required for Access setting and enter a username and password.

  6. If you are managing access control for a server-side rendered (SSR) app, redeploy the app by performing a new build from your Git repository. This step is required to enable Amplify to apply your access control settings.