Git Product home page Git Product logo

cloudfront-s3-aws's Introduction

Deploy a static website on AWS

The cloud is perfect for hosting static websites that only include HTML, CSS, and JavaScript files that require no server-side processing. In this project, you will deploy a static website to AWS. First, you will create an S3 bucket, configure the bucket for website hosting, and secure it using IAM policies. Next, you will upload the website files to your bucket and speed up content delivery using AWS’s content distribution network service, CloudFront. Lastly, you will access your website in a browser using the unique S3 endpoint.

Architecture Diagram for static website hosting on AWS (using the following services - S3, CDN, Route 53)

images

Steps to create S3 bucket using AWS console:

  • Search for S3 services in AWS serach bar click on "S3" Look below screenshot

images

  • It will open up S3 console like this:

images

  • Now, select on "Create bucket" on the console, it will open up new window like below:

    images

    Here fill out the below list out required details to host a static webiste :

    • Bucket Name
    • Uncheck "Block Public Access for this bucket"
    • Check " I acknowlegde ........"
    • Then, select create button at last

    New window will open like this:

    images

  • After, bucket gets created then go to "properties" inside that go to "Static website hosting" and change the settings to "enable" and mention the index.html file there.

    images

  • Now, Go to Permissions and edit the bucket policy then copy and paste the below bucket policy.

images

  • Now, create CDN endpoint by going to Cloudfront console. Click on Create a Cloudfront distribution

    images

  • And then fill out the values such as :

  • origin

  • choose Redirect http to https

  • choose no WAF

  • then click on create distribution

images

  • wait for 4-5 min to be get the endpoint created. You will see below message.

images

  • After endpoint gets created go to browser and open the endpoint. It will open your hosted website.

-Put /index.html at last to access your website

cloudfront-s3-aws's People

Contributors

apurva14a avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.