Book Image

Amazon Web Services Bootcamp

Book Image

Amazon Web Services Bootcamp

Overview of this book

AWS is at the forefront of Cloud Computing today. Businesses are adopting AWS Cloud because of its reliability, versatility, and flexible design. The main focus of this book is teaching you how to build and manage highly reliable and scalable applications and services on AWS. It will provide you with all the necessary skills to design, deploy, and manage your applications and services on the AWS cloud platform. We’ll start by exploring Amazon S3, EC2, and so on to get you well-versed with core Amazon services. Moving on, we’ll teach you how to design and deploy highly scalable and optimized workloads. You’ll also discover easy-to-follow, hands-on steps, tips, and recommendations throughout the book and get to know essential security and troubleshooting concepts. By the end of the book, you’ll be able to create a highly secure, fault tolerant, and scalable environment for your applications to run on.
Table of Contents (16 chapters)

Static Website Hosting


Amazon S3 allows us to host a static website. Static HTML pages can be deployed on S3 and using the scripting language (such as JavaScript) we can make it a dynamic website. For hosting, we need to configure the bucket website configuration and map our domain name to redirect the request to the Amazon S3 bucket.

Let's see how we can host a static website on Amazon S3.

AWS Management Console

Let's see how to host a static website on Amazon S3:

  1. Create the S3 bucket and grant public access: Create a bucket with the name www.blog.tweakings3.com and grant Public permissions so that anonymous users can access the HTML files:

Figure 4.18: Create Bucket (www.blog.tweakings3.com)

  1. Upload the HTML file: Upload index.html file to bucket www.blog.tweakings3.com.
  2. Edit the Bucket permission: Go to the Bucket's Permissiontab and click on Bucket Policy.

Figure 4.19: Bucket Policy

Add the following policy and click on Save:

{ 
   "Version": "2012-10-17", 
   "Statement": [{ 
      "Sid": "AddPerm...