- Newest
- Most votes
- Most comments
Yes, you can apply access control using password for new branches in AWS Amplify Console .
To do so, you need to follow these steps:
- In the Amplify console, choose the app you want to set a password .
- In the navigation pane, choose App settings and then select Access control .
- Select Manage access in the Access control settings section .
- In the Access control settings, set the username and password to restrict access to the desired branch from a GitHub repo.
- Choose Save changes.
After that, users will be prompted for a username and password when they attempt to access the URL for the branch.
I hope this helps you with your query.😊 Unfortunately, you cannot set password protection by default on selected branches without manually protecting them or add a global password protection control to all branches. You can raise a request for it on GitHub here: https://github.com/aws-amplify. Feel free to join the OS Contributor Community for Amplify as well here: https://www.contributetoamplify.com/
: https://terieyenike.hashnode.dev/how-to-password-protect-websites-with-amplify-console : https://docs.aws.amazon.com/amplify/latest/userguide/access-control.html : https://dev.to/aws-builders/how-to-password-protect-websites-with-amplify-console-1dd6
Relevant content
- asked 2 months ago
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 25 days ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
Thank you for your answer. Sadly, I understand you confirm it's not possible to have protect all new branches by default. There's a feature request here: https://github.com/aws-amplify/amplify-hosting/issues/280
What is surprising is that it seems it was once possible. At least, the documentation mentioned it was possible to set a global password AND have some public branches and it was removed from the documentation here: https://github.com/awsdocs/aws-amplify-console-user-guide/commit/ea6993811b9065329df95378ac5ed9313a906634
Hi Olivier_L, the product team is currently working on the feature request but their is no ETA yet. However, I think another workaround that may work for you is to --enable-basic-auth and --basic-auth-credentials with update branch and add it in post build step in amplify.yml file. In this way you may be able to use Amplify CLI and add password protection to future branches through deployment.
References: https://docs.aws.amazon.com/cli/latest/reference/amplify/update-branch.html https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html#branch-specific-build-settings
@Raheel Maqsood Interesting workaround, thanks!
BTW, thanks for the update on the feature request.