Creating a website and deploying on AWS

Famous websites that use AWS

Netflix

Netflix is a streaming service that offers a wide variety of award-winning TV shows, movies, anime, documentaries, and more — on thousands of internet-connected devices. It is one of the largest OTT platforms, used by millions of people all over the globe. Netflix uses AWS for nearly all its computing and storage needs.

Why AWS is the best place to host a website

Hosting a website or a web application has a lot of benefits compared to hosting it on a traditional on-premises data center.

  1. Easy to use

Create a Website on AWS

I. Created website on EC2 using HTML and CSS

  1. Launching EC2 instance
  1. Go to the bucket that we created using bootstrap script.
  2. In the properties section, ENABLE static website hosting and choose to host a static website
  3. In the Permissions section, set the Block all public access to OFF.
  4. Make the index.html object public under Actions
  5. The object URL of the index.html can now be used to access the website.
  • Letting the clients/users access the object URL directly gives them the details of the region the bucket is in, the bucket name in which the object is stored.
  • This might open unexpected doors for attackers.
  • CloudFront solves this problem.
  • Plus, CloudFront offers Global Edge Network and ensures that the content is securely delivered as it integrates with WAF, SSL Encryption, DDoS, etc.
  1. For Origin Domain, choose the bucket that has index.html from the dropdown menu.
  2. Use OAI and create new OAI
  3. Ensure to update the bucket policy
  4. Configure other details such as logging, default root objects, etc., according to the requirements. Since this is a static website, we could stick to the defaults.
  5. Once done, wait for the distribution to come live.
  6. Now copy the domain name from CloudFront’s distribution dashboard and paste it into the browser.
  7. We can access the website directly if index.html is specified as the default root object. Else, use copiedDomainName/index.html to access the website.

Network Diagram

Costing and Efficiency details

A. EC2 — instance can be deleted after copying the created website to S3.

Conclusion:

Hence, learned about how to deploy website on AWS

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store