Project: Deploy a Static Website on AWS
Project Overview
This was the first project I completed while undertaking the Udacity cloud developer Nanodegree program sponsored by ALX-T. The cloud is perfect for hosting static websites that only include HTML, CSS, and JavaScript files that require no server-side processing this project has two major aims;
- To host a static website on S3.
- Access the cached website pages using AWS CloudFront content delivery network (CDN) service. The CloudFront offers low latency and high transfer speeds during website rendering.
Prerequisites
- AWS Account
- Student-ready starter code
Project Steps
In this project, I deployed a static travelling blog website on AWS using the following steps;
- I created a public S3 bucket using the AWS management console. The S3 bucket was made public because it will be used to host the static website and hosting requires that the content should be publicly available.
- The files and folders of the static website containing the html, css and image files were uploaded into the S3 bucket.
- The S3 bucket was secured using IAM policy by updating the bucket policy as shown below.
- The S3 bucket was configured for website hosting under the properties tab of the S3 bucket and the home page for the website was specified, after which the website endpoint was obtained. The endpoint URL can be used to access the home page of the website.
- A CloudFront distribution was created using the AWS Management Console to speed up content delivery of the website and the CloudFront domain name to be used in accessing the website was obtained.
- Accessed the website in a browser using the unique CloudFront endpoint.
- After the project was reviewed all running resources were shut down and deleted.