πŸš€ Mastering AWS EC2, ELB, Beanstalk & Lightsail: A Beginner-Friendly DevOps Guide

Parag KulkarniParag Kulkarni
3 min read

πŸ“… Day 12 - AWS Practical Learning

✍️ By Parag Kulkarni
πŸ”‘ Topics Covered: EC2, Elastic Load Balancer (ELB), Elastic Beanstalk, Lightsail, OSI Model, and Load Balancer Routing

πŸ–₯️ EC2 (Elastic Compute Cloud)

βœ… What is EC2?

  • In EC2 service, we can launch virtual servers (EC2 instances), which are essentially VMs on the cloud.

  • EC2 is regional: You must select a region to launch an instance.

AWS services can be:

    • 🌐 Global (e.g., IAM, Route 53)

      • πŸ“ Regional (e.g., EC2, S3)

βš–οΈ Elastic Load Balancer (ELB)

πŸ’‘ ELB Overview

  • ELB is a managed service by AWS that helps in distributing incoming traffic across multiple EC2 instances across Availability Zones.

  • It ensures high availability, fault tolerance, and auto scaling integration.

πŸ” Key ELB Concepts

  • ELB is not a server, it’s a serviceβ€”you cannot log into it.

  • You can access ELB via DNS name (URL).

  • ELB doesn't reside in a specific Availability Zone; it works at the regional level.

  • IP addresses of ELB are dynamic, not static.

  • AWS recommends using the DNS name instead of the IP.

🧠 OSI Model Refresher (7 Layers)

  1. πŸ”’ Application (Layer 7)

  2. 🎨 Presentation

  3. πŸ” Session

  4. 🚚 Transport (Layer 4)

  5. 🌐 Network (Layer 3)

  6. 🧱 Physical

🌱 Elastic Beanstalk

πŸš€ What is Beanstalk?

  • A Platform as a Service (PaaS) that handles the heavy lifting of EC2 instance provisioning, load balancing, auto scaling, and monitoring.

  • Ideal for quick deployment of applications (Java, Node.js, Python, etc.).

  • You just upload your codeβ€”Beanstalk does the rest!

🧩 How Beanstalk Works:

You provide:

    • 🧾 Application code

      • βš™οΈ Environment configurations

      • 🧱 Platform (e.g., Java, Node.js)

Beanstalk:

    • Automatically launches EC2

      • Applies configuration

      • Deploys your app

🧠 Unlike traditional PaaS, you have full control over the EC2 instances launched by Beanstalk. You can SSH into them and modify as needed.

🌐 Lightsail β€” Simplicity First

πŸ’‘ Why Use Lightsail?

Lightsail is perfect if you want to quickly launch pre-configured servers for:

WordPress

  • Joomla

  • Drupal

  • GitLab

  • Redmine

  • It’s beginner-friendly and hides infrastructure complexities.

❌ Limitations: Lightsail does not support auto scaling. It's ideal for small-scale or standalone projects.

🌍 Advanced Load Balancer Routing β€” ALB Rules

πŸ› οΈ ALB Routing Methods:

πŸ“Œ Host-Based Routing:

Routes traffic based on domain name.

  • http://parag.com β†’ app 1 http://web.parag.com β†’ app 2

πŸ›€οΈ Path-Based Routing:

πŸ”— Each rule is linked to a target group, which includes your EC2 instances.

πŸ” Gateway Load Balancer (GWLB)

Deploy, manage, and scale third-party network appliances like:

πŸ”₯ Firewalls

  • πŸ›‘οΈ Intrusion Prevention Systems

  • Uses GENEVE protocol (6081) to tunnel traffic.

  • Works at OSI Layer 3 (Network Layer).

πŸ“ Conclusion

If you're beginning your DevOps or Cloud Engineering journey, understanding these core AWS components will make you job-ready in no time. This guide gives you a strong foundation in:

  • βœ… EC2 instances

  • βœ… Load balancing strategies

  • βœ… Platform-as-a-Service using Elastic Beanstalk

  • βœ… Lightsail for pre-configured deployment

  • βœ… Networking layers & traffic routing in ALB

0
Subscribe to my newsletter

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

Written by

Parag Kulkarni
Parag Kulkarni