Developer fixes CloudFront S3 bug in 3 hours by ditching AWS console for CLI
A developer working on the Cloud Resume Challenge spent three hours troubleshooting a persistent 404 error while connecting AWS CloudFront to an S3-hosted static website. The error occurred because CloudFront was forwarding its own domain as the Host header to S3, which then searched for a non-existent matching bucket. The root cause was traced to AWS's simplified CloudFront console UI, which silently applied S3 REST API origin settings instead of the custom HTTP origin configuration required for S3 static website hosting. Multiple console-based fixes — including cache invalidation, origin swapping, and distribution toggling — all failed to resolve the misconfiguration. The issue was ultimately fixed by using the AWS CLI to create a new distribution with an explicit CustomOriginConfig, bypassing the console's limitations entirely.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in