EXERCISE 6 : Hosting a static website on Amazon S3

 Hosting a static website on Amazon S3:

Step 1:To create a bucket

  1. Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/.


  2. Choose Create bucket.
             
                   

  3. 
Enter the Bucket name.
  
  4. Choose the Region where you want to create the bucket.

  5. To accept the default settings and create the bucket, choose Create.

  
Step 2: Enable static website hosting

  1. In the Buckets list, choose the name of the bucket that you want to enable static website hosting for.

   


2. Choose Properties.
  
3. Under Static website hosting, choose Edit.
  
4. Choose Use this bucket to host a website.

5. Under Static website hosting, choose Enable.


6. In Index document, enter the file name of the index document, typically index.html.


7. To provide your own custom error document for 4XX class errors, in Error document, enter the custom error document file name.


8. Choose Save changes.

Step 3: Edit Block Public Access settings

  1. Choose Permissions.

  2. Under Block public access (bucket settings), choose Edit.

  3. Clear Block all public access, and choose Save changes.

  
   

  

Step 4: Add a bucket policy that makes your bucket content publicly available

  1. Choose Permissions.

  2. Under Bucket Policy, choose Edit.

  3. To grant public read access for your website, copy the following bucket policy, and paste it in the Bucket policy editor.




4. Update the Resource to your bucket name.

5. Choose Save changes.


Step 5: Configure an index document


1. Create an index.html file.


2. To upload the index document to your bucket, do one of the following:

  • Drag and drop the index file into the console bucket listing.

  • Choose Upload, and follow the prompts to choose and upload the index file.


3. Create an error document, for example 404.html.

4. Upload the same.




Step 7: Test your website endpoint

  1. Choose Properties.

  2. At the bottom of the page, under Static website hosting, choose your Bucket website endpoint.




  
           

Comments

Popular posts from this blog

Application-Load balancer

virtual to virtual migration

My First Virtual Machine