Deploy a Static Website on AWS
Deploying a website can be tricky when you don't know the way around it, however it can be a pretty fun thing to do. I present to you, Deploying a static website on Amazon Web Services using two of their services (S3 bucket and Cloudfront). AWS Simple Storage Service popularly called S3 is an object storage system in the cloud, and Cloudfront is a content delivery service in the cloud which is responsible for speeding up delivery of your static and dynamic web content by caching content in an Edge Location close to your user base. Today, we create a bucket and upload our website files into it. Now let's delve into it.
The following are what we need for our project:
Head to your AWS console and in the search box up there, type S3. Click on it and then create bucket on the S3 dashboard. Enter a unique bucket name (remember it should be unique across your availability zone), select a region and uncheck the block all public access to give your website a public access. Check the last box with the description 'Turning off block all public access might result in this bucket and the objects within becoming public'. Click next and finally create the bucket. This is becoming interesting huh😊?
Recommended by LinkedIn
That's part one of today's session done. Let's head to the next which is uploading contents into the bucket.
Head back to the S3 dashboard, this time not to create a bucket but to go and click to open the bucket we created earlier. When you open the bucket, in the bucket menu, you'll see objects automatically selected. In there, you'll find upload. Click on it and it will show you an option to upload file or upload folder. Click any of them and it will take you directly to your file explorer where you will navigate to the file or folder's location and select it. When you are done loading the file and the folders, scroll down and finally upload it. Wait patiently for it to finish uploading and bravo you're one step done.
Next, I will be showing you how to use a service known as Identity and Access Management (IAM) to make the bucket public and create an endpoint that can be used to access our static website. Then finish it off with the cloudfront.
Thank you for your audience.
Thanks guys for the read. Part two comes up tomorrow evening 😊