Ravindra BagaleCourses & study guides मराठी Track your progress

Chapter 5: Amazon EC2 (Elastic Compute Cloud)

5.1 Why EC2? Cloud vs on-premises

Friends, let's first understand why we need EC2 at all. Imagine your college wants to host a result portal. The old on-premises way means: buy servers (₹2–5 lakh each), a UPS, air-conditioning, network switches and a server room, employ an admin, wait a few weeks for delivery – and still, on result day, when lakhs of students log in at the same time, the site crashes.

With cloud computing, you rent compute power over the internet and pay only for what you use.

Point On-premises AWS EC2 (cloud)
Upfront cost High capital expense (CapEx) Zero upfront; pay-as-you-go (OpEx)
Time to get a server Weeks Minutes
Scaling Buy more hardware; slow Launch more / bigger instances in minutes; Auto Scaling
Maintenance You handle hardware, power, cooling AWS handles physical infrastructure
Availability One building; single point of failure Multiple Availability Zones and Regions
Global reach Hard Deploy in any AWS Region worldwide
Security Fully your responsibility Shared responsibility: AWS secures the cloud, you secure what is in the cloud

Now think about our Mauli Dairy. Before Diwali, online orders for pedhe and shrikhand go up a lot, and afterwards they come down again. If they buy their own server, they pay for a big server all year while the rush lasts only a few days. On EC2 they can start bigger or more instances during the rush and reduce them when the rush is over – you pay only for what you use. That is the real benefit of the cloud.

Cloud service models: IaaS (you manage OS and above — EC2), PaaS (you manage only code — Elastic Beanstalk), SaaS (you just use the software — Gmail). EC2 is IaaS.

Shared responsibility model

AWS is responsible for the data centres, hardware, hypervisor and global network. You are responsible for the guest OS (updates, patches), security group rules, users and keys, applications and data. A hacked EC2 because of an open port 22 with a weak password is your responsibility.

Ravindra Bagale's Tip

Many students think that once they take a server on the cloud, security is entirely AWS's job. Don't make this mistake! Remember shared responsibility: AWS looks after the data centre and hardware, but OS updates, security group rules, keys and data are all your responsibility. If you leave port 22 open to everyone and the server gets hacked, the fault is yours, not AWS's.

Practice task

Mauli Dairy, Pune sathi ek chhota table banva: on-premises server vs EC2 – upfront cost, server milayla lagnara vel, scaling aani maintenance. Pratyek row samor ek line liha ki Mauli Dairy sathi kay better aahe aani ka.

Got it? The cloud means a rented server – you pay only for what you use. Now let's move on to the key concepts of EC2.

Quick revision cards

Revise this lesson in two minutes. Save the cards on your phone or download them as PNG files. The QR code on each card opens its lesson.

Comparison card: On-premises vs Cloud. On-premises: Your own servers in your own office or data centre. Cloud: Servers rented from a provider like AWS over the internet.
Comparison: On-premises vs Cloud · Download PNG

More cards: Ravi Sir's Cards.