We are running a static website that gets deployed by CI automatically to a public S3 bucket. The website is a jekyll page that has multiple folders. We are very happy with the setup because of the ease of deployment and no infrastructure.
But we now have traffic to our website and we want to add a staging phase. This phase should be reachable by selected non-technical people from known IP's. We are not able to achieve this using a S3 bucket as this bucket needs to be public.
So we are looking for a way to deploy the static website with a staging area that is not public. Is this possible with a AWS service or other cloud offering?
We solved this issue by having subfolders in the S3 bucket with unguessable names. The names allow the subfolders to be publically available and act as a shared secret password to the static website. Every pull request gets automatically deployed in this bucket to a subfolder.
Example:
s3-staging-bucket
└ ed567c0e-dca9-44fc-b1bc-18ed5237f598/
└ index.html