Things to do after creating an EC2 instance and connecting to it using SSH

Published: (January 31, 2026 at 02:41 AM EST)
2 min read
Source: Dev.to

Source: Dev.to

🧭 Big Picture First

At this point, you’ve already:

  • Created an EC2 instance
  • Connected to it via SSH

Now you’re inside the server. Before installing anything or making changes, you need to understand what you’re running.

🧱 Phase 1 — Identify the System

1️⃣ Check the OS & Kernel

uname -a

Purpose

  • Identify OS type, kernel version, architecture, and environment (AWS)

Why it matters

  • Determines which tools you use (dnf, systemctl)
  • Avoids wrong commands (e.g., apt on Amazon Linux)

📦 Phase 2 — Package Management Basics

2️⃣ Update system packages

sudo dnf update

Purpose

  • Bring all installed software up to date
  • Apply security patches

Why it matters

  • Security
  • Stability
  • Best practice on new servers

3️⃣ Query installed kernel

rpm -q kernel

Purpose

  • Check kernel version via the package database

Why it matters

  • Kernel is installed like any other package
  • Helps during upgrades & debugging

4️⃣ Install nginx

sudo dnf install nginx

Purpose

  • Download and install nginx from trusted repositories

Why it matters

  • Demonstrates proper software installation
  • Dependency resolution happens automatically

5️⃣ Verify nginx is installed

rpm -q nginx

Purpose

  • Confirm nginx exists at the RPM level

Why it matters

  • Installation ≠ running
  • Always verify installs

⚙️ Phase 3 — Service Management (systemd)

6️⃣ Check nginx service status

sudo systemctl status nginx

Purpose

  • Show whether nginx is running, plus logs, PID, uptime, and config validation

Why it matters

  • Services must be monitored, not assumed

7️⃣ Start nginx (if needed)

sudo systemctl start nginx

Purpose

  • Start the nginx service

Why it matters

  • Installed services don’t auto‑run

🌐 Phase 4 — Verify Functionality

8️⃣ Test locally

curl localhost

Purpose

  • Verify nginx responds internally

Why it matters

  • Separates Linux issues from AWS networking issues

9️⃣ Open port 80 in AWS

Action

  • In the Security Group, allow HTTP (port 80)

Purpose

  • Allow external traffic

Why it matters

  • AWS firewall blocks traffic by default

📁 Phase 5 — Understand Configuration Safely

🔟 View nginx config safely

sudo less /etc/nginx/nginx.conf

Purpose

  • Read the main nginx configuration (read‑only)

Why it matters

  • Understand before modifying
  • Avoid breaking production configs

🧠 Key Concepts You’ve Learned

  • Linux kernel vs. OS
  • Package managers (dnf, rpm)
  • Installed vs. running software
  • systemd & services
  • Safe config inspection
  • Zero‑downtime reloads
  • Cloud networking basics
  • Production hygiene

🧩 Mental Model (Very Important)

EC2 instance
 ├── Linux OS
 │    ├── kernel (rpm)
 │    ├── packages (dnf)
 │    └── services (systemctl)

 ├── nginx installed (rpm)
 ├── nginx running (systemd)
 ├── nginx configured (/etc/nginx)
 └── traffic allowed (AWS SG)

🎯 Where You Are Now

You can now operate and reason about a Linux service on the cloud. This foundation supports further learning in:

  • Docker
  • Kubernetes
  • CI/CD
  • SRE
  • Platform engineering
Back to Blog

Related posts

Read more »

38.User Variable Setup Using Terraform

Lab Information The Nautilus DevOps team is automating IAM user creation using Terraform for better identity management. Create an AWS IAM user with the follow...