2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
3
Thanks for the detailed description. You are getting 403 Forbidden
due to the origin request policy AllViewer
being used. In this case, when you access the website via CloudFront URL, the Host
header similar to d12345678.cloudfront.net
will be forwarded to the Lambda which will not be recognized, resulting in 403.
The solution is to create your custom origin request policy and only forward the necessary values (but not the Host
header.)
répondu il y a 2 ans
-2
Please check out this blog if you haven't already - https://aws.amazon.com/blogs/networking-and-content-delivery/using-amazon-cloudfront-with-aws-lambda-as-origin-to-accelerate-your-web-applications/
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a un an
- Comment résoudre les erreurs 500, 502 et 503 causées par les fonctions Lambda@Edge dans CloudFront ?AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a un an
Thank you, it works so well, for my case, I also need to also forward
origin
anduser-agent
but it is because of my lambda function code.