https for S3 public website.

0

I try to add https-protocol to a S3 hosted static website through cloudfront.

To configure the origin, I choose the website-endpoint from the static hosting as Origin domain, but then a radio-select pops up below to choose the Protocol, either http-only, https-only or match viewer. My Problem is that https only and match viewer are disabled. I can't choose those options. Only http only is selectable. No tutorial mentions this disabled state. Certificate is correct in us-east-1 and selected for the cf-distribution. Any hint is welcome.

feita há um mês90 visualizações
3 Respostas
2

Instead of S3 hosted website through CloudFront, you can use CloudFront with OAC (Origin Access Control) to S3 bucket.

Disable hosted website and refer to How do I use my CloudFront distribution to restrict access to an Amazon S3 bucket? option 1

AWS
ESPECIALISTA
Mike_L
respondido há um mês
profile picture
ESPECIALISTA
avaliado há 25 dias
profile picture
ESPECIALISTA
avaliado há um mês
  • no, that is not working. I restricted the access for s3 to only allow cloudfront AND disable the static hosting in s3... site was not accessible with https after deployment of the cloudfront settings.

1
Resposta aceita

I forgot to redirect route53 to cloudfront instead of the s3 bucket

respondido há um mês
profile picture
ESPECIALISTA
avaliado há 25 dias
0

Hi, I would suggest verifying that S3 static website hosting is enabled on the S3 bucket, and you are providing manually the website endpoint URL instead of selecting the S3 REST API endpoint URL from the dropdown.

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DownloadDistS3AndCustomOrigins.html#adding-cloudfront-to-s3

psp
respondido há um mês
  • thanks for your hint, but I select the endpoint from the dropdown and enabled the website-hosting on the s3 bucket.

  • right - you would enter and provide the S3 website endpoint URL: http://bucket-name.s3-website-region.amazonaws.com instead of selecting from the drop down that chooses the S3 REST endpoint URL.

  • nope, tried that. Not working unfortunatly the https radio button remains disabled. If I use another url it works but that's not a solution...

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas