What is EC2?

Example: Instead of buying a physical server for hosting a website, you can launch an EC2 instance (say, running Linux or Windows) and deploy your website there.

Key Features of EC2

  1. Virtual Servers (Instances)

    lets go deeper into it

    Example:

    Imagine you want to host a personal blog → you don’t need a super powerful server, just a t2.micro (general purpose).

    But if you want to train a machine learning model, you’ll need a GPU instance.

  2. Elasticity

Example:

An online store gets 1,000 visitors daily.

But on Black Friday, it gets 100,000 visitors.

  1. Multiple OS Choices

    Example:

    If you’re a Python/Django developer, you might use Ubuntu.

    If your company uses .NET apps, you’ll need Windows Server

  2. Storage Options

    EC2 gives you two main storage types:

    1. EBS (Elastic Block Store) → like a hard drive that remembers data even if server is stopped.
      • Best if you need to keep files (databases, logs, apps).
      • You can even detach and reattach it to another EC2.
    2. Instance Store → like a temporary hard drive.
      • Very fast but data is deleted when the server stops.
      • Good for caching or temporary files.

    Example:

  3. Networking

    Example:

  4. Pricing Models