I have a Cloudfront plugged on an AWS load balancer.
I saw in the AWS documentation that I can customize Cloudfront custom error pages. I tried to store these error pages in S3 as it is recommended in the AWS doc but it doesn't work. The documentation says :
We recommend that you store custom error pages in an Amazon S3 bucket even if you're using a custom origin. If you store custom error pages on an HTTP server and the server starts to return 5xx errors, CloudFront can't get the files that you want to return to viewers because the origin server is unavailable.
My error page is in S3 with the path 'my-app-bucket/errorpage.html'.
I tried to link this file in the Cloudfront config but I have the following error :
If I try the value /my-app-bucket/errorpage.html, Cloudfront redirects the request to my ELB origin and I get a 404.
Who could explain me how I can do this configuration ?