Hosting a Static Website
Obasaju Winner
Cloud Engineer| 2X AWS Certified| Certified in Cybersecurity| 2X Certified in Precision Medicine, Stanford Dept. of Genetics| Pharmacist| Computational Drug Discovery
HOSTING A STATIC WEBSITE
In this lab, I created an S3 bucket and configured it for static website hosting. Static websites have fixed content with no backend processing. They can contain HTML pages, images, style sheets, and all files needed to render a website. However, static websites do not use server-side scripting or a database. If you want your static webpages to provide interactivity and run programming logic, you can use JavaScript that runs in the user's web browser.
You can easily host a static website on Amazon S3 by uploading the content and making it publicly accessible. No servers are needed, and you can use Amazon S3 to store and retrieve any amount of data at any time, from anywhere on the web.
To complete this task, simply start by;
Now configure the bucket for static website hosting. Stay in the Properties Console.
UPLOADING CONTENT TO YOUR BUCKET
To complete this task, you will upload the file that will serve as your static website to the bucket. You probably should have the files for your static websites which include the html, css and javascript files. Ensure that each file keeps the same file name including the extension (.html, .css, .js).
ENABLING ACCESS TO THE OBJECTS
Objects that are stored in S3 are private by default, this ensures that your organization’s data remains secure.?
领英推荐
In this task, you will make the uploaded objects publicly accessible. First, confirm that the objects are currently private.
You can make Objects in Amazon S3 public in two different ways:
It is normally safer to make individual Objects public because this avoids accidentally making other Objects public. However, if you know that the entire bucket contains no sensitive information, you can use a bucket policy.?
Now, Configure the individual Objects to be publicly accessible.
Your Static website is now publicly accessible. Refresh the website page that has the 403 forbidden message. You should now see the static website hosted by Amazon S3.
UPDATING THE WEBSITE
You can update the website by editing the file and uploading it again to the S3 bucket.?
Amazon S3 is an Object storage, so you must upload the whole file. This action replaces the existing object in your bucket. You cannot edit the content of an object, instead, the whole object must be replaced. Use the Action Menu to choose the Make Public via ACL option again.
?
Experienced Solutions Architect | Tech Mentor
1 年Awesome