I am looking to host a private website(html,js,css) in an S3 bucket and i want this website to be accessible only by aws accounts specified by me.
I read the question here - Restrict access to website hosted on S3.
The accepted answer says i can restrict access to a particular aws account. But another answer says i cannot restrict by account.
the main objective here is to give the url from the static website provided by amazon to give access to certain aws accounts. Only authenticated aws accounts can access the site.
What i found on research shows that an S3 with website hosting enabled cannot have such restrictions and needs to be public. Just wanted to know if there any workarounds.
I did look into serving with cloudfront signed urls but i cannot seem to authorise only certain aws accounts access. But this could be because i havent understood the concept completely. Or perhaps aws Cognito.