DEV Community

Discussion on: How to Deploy a Static Website to AWS with GitLab CI

Collapse
 
andrewdmay profile image
Andrew May

If the bucket has CloudFront in front of it and you want to require HTTPS access to the content (which S3 by itself doesn't support for website hosting), then it's not necessary to make the S3 bucket public.

You can make use of a CloudFront Origin Access Identity so that only CloudFront can access your bucket and direct access is blocked.

Collapse
 
codicacom profile image
Codica

Hello Andrew,

Thanks for your interest in our article and valuable comments.

We agree - it is not necessary to set S3 bucket permissions to public. It is really possible if you are using HTTPS and CloudFront Origin Access Identity.

Best,
Codica Team