S3 static website hosting

0

Trying to use cloudfront and S3 to host a static website for a client and I made the permission public on the bucket, and changed properties to web hosting but still getting access errors (403 Forbidden Code: AccessDenied Message: Access Denied RequestId: AGHQ9C92J7Z3CTFX HostId: T0onj8yM+ArqrjuyqF0R/gGOanxdrrdcXr6xY8ZC+n1QeyO6/CrUaoBQ3XwmypJqO6bcV0VKlK4=)

I have another site hosted using S3 and its fine, www.truckeelabs.com

What am i missing?

2 réponses
0
Réponse acceptée

You don't say which region you are using and sometimes that can make a difference in this case.

If you create a S3 bucket and an associated CloudFront distribution; then update the S3 bucket policy it can take some time for the change to be applied within S3. The exception here is in the us-east-1 region - that will generally work immediately. For other regions you may find it will take a few minutes (sometimes an hour or so) for things to work properly.

You can tell when this is the case: If you use your browser to visit the CloudFront distribution and get the 403 error, look closely at the URL. If it is a S3 URL then you're in that synchronisation period. Have patience and it will resolve itself.

profile pictureAWS
EXPERT
répondu il y a 8 mois
profile picture
EXPERT
vérifié il y a 5 jours
profile picture
EXPERT
vérifié il y a un mois
  • look closely at the URL. If it is a S3 URL then you're in that synchronisation period. Which URL are you talking about here? The cloudFront URL looks like d3kdssdds71dfp0bu.cloudfront.net which has nothing to do with s3 and the customer's url has no reference to s3 whatsoever

0

Can you make sure if the bucket policy is allowing Cloudfront Origin Access Control or Origin Access identity as described in this re:Post Knowledge Center Article. You can probably compare with the one which is working fine.

I'd suggest you to go through How do I troubleshoot 403 errors from CloudFront?, this would certainly help you to get to the root cause.

Comment here about how your troubleshooting goes, happy to assist further.

Abhishek

profile pictureAWS
EXPERT
répondu il y a 8 mois
profile pictureAWS
EXPERT
vérifié il y a 8 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions