Host a static website on AWS
1. Introduction
The purpose of the article is to create and host a static website on AWS while fulfilling the configuration of CI/CD pipeline for automated deployment to best security. This article showcases the ability to design a scalable, reliable, and automated web hosting infrastructure on AWS cloud.
2. Infrastructure Diagram
AWS Services: utilize various AWS services to host and deploy your website.
S3 (Simple Storage Service): store and serve your website’s static files. This S3 bucket should be configured as private for security and your website will be accessed via AWS CloudFront.
CloudFront (CDN – Content Delivery Network): distribute your website content globally for improved performance. You can attach WAF for enhanced security such as DDos attack, XSS injection and more. In addition, you also can attach an ACM for configuring TLS/SSL.
OAI (Origin Access Identify) / OAC (Origin Access Control): provides a secure way to access S3 origins to CloudFront.
ACM (AWS Certificate Manager): provision and manage TLS/SSL certificates with AWS services and connected resources such as CloudFront. This certificate is no-cost when using CloudFront and it will be renewed automatically when it expires.
Route 53: register a domain or use an existing domain, and configure DNS records to point to your website by attaching to CloudFront.
WAF (Web Application Firewall): protect your web site from common exploits such as DDos attack, XSS injection and more. Moreover, you can configure IP limitations if you want. It supports both IP V4 and IP V6.
CI/CD pipeline: to automate the deployment of your static website to AWS services.
AWS CodePipeline: automate continuous delivery pipelines for fast and reliable updates. It can include build source code, test source code, deploy source code and more depending on your requirements. In the above diagram, you can see that it includes the build, deploy and invalidate cache of CloudFront by triggering AWS Lambda after deploying a new content.
AWS CodeBuild: build and test code with automatic scaling. In the above diagram, it will be triggered from AWS CodePipeline, then it will build source code, zip source code and store artifacts to AWS S3.
Version Control: use Git for version control and host your project’s repository on a platform like GitHub, GitLab or AWS CodeCommit.
3. Conclusion
In conclusion, it is very easy to host and deploy your static website to AWS with fulfilling automatic deployment and enhanced deep security, especially cost is very cheap and less effort to manage operations of the system.
You will feel comfortable if you try using it one time.
Let’s start to do it today with powerful AWS Cloud Services!!!
We are a software development company based in Vietnam.
We offer DevOps development remotely to support the growth of your business.
If there is anything we can help with, please feel free to consult us.