I embarked on an AWS project to host a static website using S3, CodePipeline, and CodeBuild. It was a journey full of trial and error, learning, and ultimately, success.
Initially, I used a YAML template to set up the pipeline. However, it kept failing because the Deploy stage to S3 was missing. I went back and forth trying to resolve the errors, reading docs, and testing configurations. Finally, I managed to add the proper deploy stage, and the pipeline ran successfully.
After deployment, the website wouldn’t open correctly. The HTML file would download instead of displaying. I checked the permissions, unblocked public access, and eventually discovered that the Content-Type metadata was incorrect. I deleted the file and re-uploaded it with the correct text/html content type. Finally, the page rendered perfectly.
To solidify my understanding, I also hosted the site manually on AWS using S3, CloudFront, Route 53, and ACM. This allowed me to apply everything I learned about static hosting, secure certificates, and CDN configuration.
This project was a true learning experience. I gained hands-on skills with:
Overall, it was a challenging but extremely rewarding project.
Check out the full project README on GitHub:
View README on GitHub