[1.7] AWS Networking & Storage: Elastic IP, Block Storage, and EBS Operations

Imagine we’re running a busy bakery in a city. We need a fixed phone number so customers can always reach us (Elastic IP), reliable storage for our recipes and ingredients (Block Storage/EBS), and a simple way to manage, expand, or move our storage as our business grows (EBS Operations). That’s pretty much what managing AWS networking and storage is like! Let’s break it down.


1. Elastic IP: Our Bakery’s Permanent Phone Number

Suppose our bakery moves to a new location, but our want customers to always reach our at the same phone number. In the cloud world, an Elastic IP is just like that permanent phone number for our server.

Why Use Elastic IP?

  • Consistency:
    Normally, when we stop and restart our AWS server (EC2 instance), its public IP address might change like getting a new phone number every time we close and reopen our bakery. Not ideal for loyal customers!

  • Elastic IP gives us a static, public IP address that we can keep for as long as we want. If we move our bakery (replace our server), we simply point our permanent number (Elastic IP) to the new location.

Everyday Uses

  • Website Hosting:
    Hosting a website? Elastic IP ensures our site always has the same address, so visitors never get lost.

  • App Integrations:
    Some apps or partners need to “whitelist” our server’s IP. Elastic IP makes sure we don’t have to update them every time we restart.

  • Failover:
    If our main server goes down, we can quickly redirect our Elastic IP to a backup server like forwarding our bakery calls to a temporary pop-up shop.

How to Use Elastic IP

  1. Allocate:
    Go to the EC2 console, choose “Elastic IPs,” and click “Allocate Elastic IP address.”

  2. Associate:
    Attach the Elastic IP to our EC2 instance (our main server).

  3. Reassign:
    If we get a new server, just reassign the Elastic IP, no need to tell our customers a new number!

  4. Release:
    Done with the IP? Release it so we don’t get charged for holding onto an unused number.


2. Block Storage (EBS): Our Bakery’s Pantry

Every bakery needs a pantry to store ingredients and recipes. In AWS, Elastic Block Store (EBS) is our pantry reliable, flexible, and always there when we need it.

What is Block Storage (EBS)?

  • Persistent Storage:
    Just like our pantry keeps flour and sugar safe even if we close the bakery for the night, EBS keeps our data safe even if we stop or move our server.

  • Attachable:
    We can attach or detach EBS volumes (storage shelves) to any server in our kitchen (EC2 instance).

  • Expandable:
    Need more space for new recipes? Simply add more shelves or expand existing ones!

Types of EBS Volumes

  • General Purpose SSD (gp2):
    Like sturdy, all-purpose shelves - great for most ingredients.

  • Provisioned IOPS SSD (io1):
    Heavy-duty shelves for high-traffic times (busy databases).

  • Cold HDD (sc1):
    Basement storage - cheap, for items we rarely use.

  • Throughput Optimised HDD (st1):
    Conveyor-belt shelves - ideal for moving lots of ingredients quickly (big data).

  • Magnetic (standard):
    Old-school shelves - cheap, but slow and not for everyday use.

EBS vs. Instance Storage

  • EBS:
    Like a pantry that stays even if we change our kitchen.

  • Instance Storage:
    Like a fridge that’s built into our oven - fast, but everything inside is lost if we unplug it.


3. EBS Operations: Managing Our Pantry

Running a bakery means sometimes we need to add shelves, move them, or clean them out. EBS Operations are just like that - managing our storage as our needs change.

Creating an EBS Volume

  1. Go to EC2 Console:
    Click “Volumes” and then “Create volume.”

  2. Choose Type and Size:
    Pick the right shelf (volume type) and size for our ingredients.

  3. Select Availability Zone:
    Make sure our pantry is in the same kitchen (zone) as our server.

  4. Encryption (Optional):
    Want to lock our pantry? Turn on encryption.

Attaching and Using EBS Volumes

  • Attach to Instance:
    Like moving a shelf into our kitchen - attach the volume to our server.

  • Format and Mount:
    For Linux: Use commands like mkfs to format and mount to use.
    For Windows: Use Disk Management or PowerShell to bring the new shelf online.

  • Ready to Use:
    Store our files, databases, or anything else we need!

Detaching and Deleting EBS Volumes

  • Unmount and Detach:
    Like removing a shelf - unmount it first, then detach from our server.

  • Delete (if needed):
    Done with a shelf? Delete it to free up space and stop paying for it.

  • Snapshots:
    Before deleting, we can take a “snapshot” (photo) of our shelf, so we can recreate it later if needed.

Key Points

  • Data Safety:
    Detaching a volume doesn’t erase our data. Deleting does!

  • Root Volumes:
    If our EBS volume is our main pantry (root device), we have to stop the server before removing it.

  • Cost:
    We’re charged for every shelf (volume), even if it’s not attached. Delete unused ones to save money.


Wrapping Up

Managing AWS networking and storage is like running a modern bakery:

  • Elastic IP is our permanent phone number - customers always know where to find us.

  • EBS Block Storage is our reliable pantry - ingredients safe, shelves adjustable.

  • EBS Operations are our pantry management - add, move, or remove shelves as our business grows.

0
Subscribe to my newsletter

Read articles from Abhishek Jaiswal directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Abhishek Jaiswal
Abhishek Jaiswal

Motivated, teamwork-oriented, and responsible Data Analyst enthusiast with significant experience in increasing comprehension of reports and presentations by the average professional. Highly educated, possessing a bachelor's, and a professional certification in Google data analytics, Standard Machine learning, and statistics.