Skip to main content

Command Palette

Search for a command to run...

Day 38 of 100 Days : Launching an EC2 Instance on AWS – A Practical Guide

Published
3 min read
M

"Aspiring DevOps Engineer on a 100-day journey to master the principles, tools, and practices of DevOps. Sharing daily insights, practical lessons, and hands-on projects to document my path from beginner to proficient. Passionate about continuous learning, automation, and bridging the gap between development and operations. Join me as I explore the world of DevOps, one day at a time!"


Welcome to Day 38 of my 100 Days of DevOps Journey! Today, we dive into the world of AWS, specifically learning how to create an EC2 instance while understanding the foundational concepts of regions, availability zones, and more.


Understanding EC2 Instances and Key Concepts

1. What is an EC2 Instance?

Amazon EC2 (Elastic Compute Cloud) provides scalable virtual servers in the cloud, enabling you to deploy applications effortlessly.

2. Why Regions and Availability Zones Matter

  • Regions: Physical locations worldwide (e.g., Mumbai, Frankfurt) where AWS has its data centers.

    • Latency Reduction: Hosting your servers closer to users minimizes latency.

    • Compliance: Certain industries or customers mandate data residency within specific regions (e.g., European banks requiring data within Europe).

  • Availability Zones: Each region contains multiple data centers (AZs), ensuring high availability and disaster recovery.


Step-by-Step Guide: Creating Your First EC2 Instance

Here’s a hands-on guide to creating an EC2 instance on AWS. Follow along with the screenshots for clarity!


Step 1: Login to AWS Console


Step 2: Navigate to the EC2 Service

  • In the search bar, type "EC2" and click on the EC2 Service.


Step 3: Click on "Launch Instance"

  • On the EC2 dashboard, click Launch Instance to start the instance creation process.


Step 4: Configure Your Instance

  1. Name Your Instance

    • Enter a meaningful name (e.g., poc_vm).

  1. Select an Operating System

    • Choose an OS for your instance. For example:

      • Ubuntu

      • Amazon Linux

      • Red Hat

    • Ensure it’s marked Free Tier Eligible.

  1. Instance Type

    • Select t2.micro for free-tier eligibility (1 vCPU, 1 GB RAM).

  1. Key Pair Configuration

    • Create or select a key pair to securely access your instance.

    • Save the private key file (.pem) in a secure location.


Step 5: Configure Network Settings

  • Use default settings or customize them for your use case (e.g., allow SSH access).


Step 6: Launch Your Instance

  • Review your configuration and click Launch Instance.

  • You will be redirected to a status page where you can see the instance being initialized.


Important Notes

  1. Free Tier Limits:

    • AWS offers 750 hours/month for free-tier EC2 instances.

    • Exceeding this limit or using non-eligible resources will incur charges.

  2. Security Best Practices:

    • Never share your private key.

    • Use SSH to access your instance securely.

  3. Resource Cleanup:

    • Always stop or terminate unused instances to avoid unnecessary charges.

What’s Next?

In the upcoming blogs, I’ll explore:

  • Connecting to the EC2 instance using SSH.

  • Deploying applications on EC2.

  • High Availability and Scaling concepts.


Conclusion

And there you have it! 🚀 Today, we successfully launched our very own EC2 instance, taking one more confident step in mastering cloud computing. Each click and configuration taught us something new, and now, the power of AWS feels just a bit more within our grasp. Here’s to many more milestones on this journey—let’s keep building, learning, and growing! 🌟

More from this blog

1

100-Day DevOps Journey Blog

100 posts