CREATING A STATIC WEBSITE WITH S3 BUCKET
Oluwaseun Olaleye
Posted on October 17, 2024
USE CASE
In this scenario, you're a newly employed cloud engineer tasked with creating a website. This website must be available even during disasters and accessible anywhere with minimal load time, allowing users to access it quickly regardless of location. Additionally, you must minimize costs. Your goal is to create a simple website that meets these requirements. Let's proceed with planning how to accomplish this."
STEP 1
Creating an S3 Bucket
Begin by creating an S3 bucket, a scalable storage solution for data
To do this:
** Select a unique bucket name.**
** Choose an appropriate AWS region.**
Configure permissions to enable public access.
Confirm bucket creation.
We will create another S3 bucket in a separate region to ensure data redundancy and availability in case of disasters. By duplicating the process, we now have another S3 buckets in different regions, providing a disaster recovery solution. This is what we called cross-replication for disaster-recovery.
How Does Cross-Replication works?
The essence of the cross-replication is to duplicate files to other region ensuring availability. Firstly, select on the s3 bucket, click on files and upload the file.
Then, click on the bucket name and click on management. Kindly select create replication rule
Provide the bucket name, this is the second s3 bucket that we created, this will receive replicated files.
This time around, we will upload another file to the first bucket(heritageitbucket).
We can now see the same file in the second bucket(heritagedest).
Now that we've ensured availability, let's focus on cost-effectiveness.. How can we do that? There is a term called lifecycle management.
What is life cycle management?
Lifecycle management is a policy-driven approach that automates the transition of objects through different storage classes, reducing costs without compromising data availability.
How lifecycle management works:
We will create a lifecycle management rule. Click on the bucket(heritageitbucket)and click on management.
Let's name the lifecycle rule name and follow the screenshot below.
Like I said earlier, lifecycle automates the transition of objects through different storage classes. In this project, I automates my object from standard IA to Glacier instant retrieval and Glacier Deep Archive.
Standard IA: Infrequently accessed data once a month are stored here.
Glacier Instant Retrieval: Long-lived archived data accessed once a quarter are stored here. Minimum storage duration is 90 days.
Glacier Deep Archive: Long-lived archive data accessed once a year.
Now that we have discussed the preliminary, let us host our website.
We have already uploaded our *index.html * in the s3 bucket.
Posted on October 17, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 27, 2024