
AWS VPC Explained Through Hands-On Cloud Support Troubleshooting
Learn AWS VPC networking through a practical troubleshooting approach, covering CIDR, subnets, route tables, Internet and NAT Gateways, Security Groups, and Linux-based connectivity diagnostics.
๐ง AWS Linux Troubleshooting Basics: Commands Every Cloud Support Engineer Should Know
When working with AWS EC2 instances, knowing Linux troubleshooting commands is essential. Cloud support engineers frequently need to investigate CPU usage, memory, disk space, running processes, network connectivity, services, and application logs.
This article covers some of the most useful Linux commands I use while learning AWS Cloud Support and Infrastructure troubleshooting.
1. ๐ Check the Current System
Before troubleshooting an EC2 instance, I first collect basic information about the system.
1
2
3
hostname
uname -a
uptime
What they show
hostnameโ Shows the server's hostname.uname -aโ Displays kernel and system information.uptimeโ Shows how long the system has been running and the load average.
For example:
1
uptime
can help identify whether the server has been under heavy load.
2. ๐ป Check CPU and Running Processes
If an application is slow, CPU usage is one of the first things to investigate.
1
top
Another useful command is:
1
ps aux
To find a particular process:
1
ps aux | grep nginx
Troubleshooting thought process
Instead of immediately restarting the server, I would ask:
- Is CPU usage high?
- Which process is consuming CPU?
- Is the process expected?
- Are multiple processes consuming resources?
This helps identify the actual cause instead of treating only the symptom.
3. ๐ง Check Memory Usage
Memory problems can cause applications to become slow or crash.
1
free -h
Example:
1
2
total used free
Mem: 1.9Gi 850Mi 400Mi
The
-h option makes the output easier to read.I also check:
1
top
to identify which processes are consuming memory.
4. ๐พ Check Disk Space
A full disk can cause serious problems such as applications failing to write logs or databases becoming unavailable.
The first command I use is:
1
df -h
This shows disk usage for mounted filesystems.
For example:
1
2
Filesystem Size Used Avail Use%
/dev/root 20G 18G 2G 90%
A filesystem approaching 100% usage should be investigated.
To identify large directories:
1
du -sh /*
For a specific directory:
1
du -sh /var/log/*
5. ๐ Check Network Connectivity
When an application cannot communicate with another service, I check connectivity step by step.
First:
1
ping 8.8.8.8
Then test DNS:
1
nslookup google.com
or:
1
dig google.com
To test whether a particular TCP port is reachable:
1
nc -zv example.com 443
These commands help separate different types of problems:
Network connectivity โ DNS resolution โ Port connectivity โ Application
6. ๐ Check Ports
To see listening ports:
1
ss -tulnp
For example, if an application should be running on port
8080, I can check whether something is listening on that port.1
ss -tulnp | grep 8080
If nothing is listening, the problem may be inside the application or service itself.
If something is listening but users cannot connect, I would continue investigating the AWS networking layer.
7. โ๏ธ Check Services with systemd
Modern Linux distributions commonly use
systemd to manage services.For example, to check Nginx:
1
systemctl status nginx
Start it:
1
sudo systemctl start nginx
Restart it:
1
sudo systemctl restart nginx
Enable it at boot:
1
sudo systemctl enable nginx
A useful troubleshooting sequence is:
1
2
systemctl status nginx
journalctl -u nginx
The first command shows the service state, while the second helps investigate its logs.
8. ๐ Check Logs
Logs are extremely important when troubleshooting production systems.
Common commands include:
1
journalctl
To view logs for a service:
1
journalctl -u nginx
To see recent logs:
1
journalctl -u nginx -n 50
To follow logs in real time:
1
journalctl -u nginx -f
Logs can reveal errors that are not visible from the application's external behavior.
9. โ๏ธ AWS + Linux Troubleshooting
Linux troubleshooting is only one part of investigating an EC2 problem.
For an AWS EC2 instance, I would think about the problem in layers:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
User
โ
Application
โ
EC2 Instance
โ
Linux
โ
Security Group
โ
Network ACL
โ
Route Table
โ
Internet/NAT Gateway
โ
VPC
For example, suppose a web application is not reachable.
I would investigate:
Layer 1 โ Application
Is the application running?
1
systemctl status nginx
Layer 2 โ Port
Is the application listening?
1
ss -tulnp
Layer 3 โ Linux Firewall
Is the operating system blocking traffic?
Layer 4 โ EC2 Security Group
Does the Security Group allow the required inbound port?
For HTTP:
1
TCP 80
For HTTPS:
1
TCP 443
Layer 5 โ AWS Networking
I would then check:
- Subnet
- Route table
- Internet Gateway
- NAT Gateway where applicable
- Network ACL
- Public/private IP configuration
This layered approach makes troubleshooting much more systematic.
๐งช Hands-On Troubleshooting Exercise
A simple way to practice is to launch a small EC2 instance and intentionally investigate common problems.
Exercise 1 โ Disk Investigation
Run:
1
df -h
Then identify directories using the most disk space:
1
sudo du -sh /var/* 2>/dev/null
Exercise 2 โ Service Investigation
Check Nginx:
1
systemctl status nginx
Then inspect its logs:
1
journalctl -u nginx -n 50
Exercise 3 โ Network Investigation
Check connectivity:
1
ping 8.8.8.8
Check DNS:
1
nslookup google.com
Check listening ports:
1
ss -tulnp
The goal is not simply to memorize commands. The goal is to understand which command to use for which problem.
๐ง My Troubleshooting Checklist
When an EC2 server has a problem, I try to follow this order:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
1. Understand the problem
โ
2. Check system health
โ
3. Check CPU and memory
โ
4. Check disk space
โ
5. Check services
โ
6. Check ports
โ
7. Check logs
โ
8. Check DNS/network connectivity
โ
9. Check AWS Security Groups
โ
10. Check VPC networking
This prevents random troubleshooting and helps narrow down the root cause.
๐ฏ Key Takeaway
Learning AWS is not only about knowing AWS console services.
For a Cloud Support Engineer, it is important to understand how AWS infrastructure, Linux, networking, and applications work together.
The combination of:
AWS + Linux + Networking + Troubleshooting
provides a strong foundation for cloud support and infrastructure roles.
I am continuing to build hands-on AWS labs and document the troubleshooting process behind them as part of my cloud engineering journey.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article