Launching My First EC2 Instance & Mastering AWS Security Groups

Asim KhotAsim Khot
2 min read

Today, I took a major step in my DevOps journey — I launched my first EC2 instance on AWS and understood the importance of Security Groups, the virtual firewalls that protect our servers in the cloud.

Whether you're deploying a Node.js app or setting up a CI/CD pipeline, these skills are foundational for every DevOps engineer.

What is AWS EC2 ?

Amazon EC2 (Elastic Compute Cloud) is a virtual server in the AWS cloud. it lets you:

  • Run Application

  • Host Services

  • Automate DevOps Tasks

  • Practice Real-world Deployments

Think of it as your personal Linux server — available on demand, globally.

What are Security Groups?

Security Groups (SGs) are virtual firewalls that control:

  • What traffic can enter (inbound)

  • What traffic can leave (outbound)

By default: All inbound is denied, all outbound is allowed

Common Inbound Rules I Used

TypeProtocolPortSourcePurpose
SSHTCP22My IPSecure login via terminal
HTTPTCP800.0.0.0/0Web access for everyone
HTTPSTCP4430.0.0.0/0Secure (SSL) website traffic

Step-by-Step: How I Launched My First EC2 Instance

Step 1: Sign in to AWS Console

  • Logged in successfully after resolving a card verification issue.

  • Navigated to EC2 Dashboard

Step 2: Launch EC2 Instance

  • Chose Ubuntu (Free Tier eligible)

  • Instance type: t2.micro

  • Created new key pair (downloaded .pem securely)

Step 3: Configure Security Group

  • Added SSH (22) from My IP only

  • Opened HTTP (80) and HTTPS (443) to test web access

Final Step: Instance Launch Success

  • Instance successfully launched and ready to connect

Instance Connected & Running:

What I Learned :

  • EC2 helps launch and manage cloud-based Linux servers

  • Security Groups are your first layer of defense

  • Opening only required ports is key to cloud security

  • SSH access must be carefully controlled for safety

Challenges I Faced Faced :

  • a card validation error while signing up on AWS

  • Resolved it by retrying with a different bank card and contacting AWS support

What’s Next? Tomorrow, I will dive into :

  • Essential networking commands like ping, netstat, nslookup, and curl to analyze and troubleshoot connectivity.

Resources

  • Amazon EC2 Documentation

  • Security Groups Basics

0
Subscribe to my newsletter

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

Written by

Asim Khot
Asim Khot