
EC2 Is Running, But My Website Is Down! – Real-World AWS Troubleshooting Lab
Your EC2 instance is running, but users cannot access your website. Why? Explore a practical AWS troubleshooting scenario covering Security Groups, ALB health checks, Linux services, DNS, networking, CloudWatch, root cause analysis, and step-by-step solutions.
EC2 Is Running, But My Website Is Down! – Real-World AWS Troubleshooting Lab
Introduction
Imagine this situation:
You have deployed a website on Amazon EC2. The instance state shows Running, but when you open the public IP or domain in your browser, the website does not load.
What would you check first?
- Is the EC2 instance healthy?
- Is the web server running?
- Are Security Group rules correct?
- Is the Application Load Balancer routing traffic?
- Is there a DNS or networking issue?
This is a common troubleshooting scenario that every Cloud Support Engineer and Cloud Engineer should understand.
Let’s investigate it using a structured troubleshooting approach.
1. Understand the Architecture
Our example environment uses:
- Amazon VPC – Network isolation.
- Public Subnet – Application Load Balancer.
- Private Subnet – EC2 application instances.
- Security Groups – Traffic access control.
- Application Load Balancer – Traffic distribution.
- Amazon Route 53 – DNS resolution.
- Amazon CloudWatch – Monitoring and logs.
2. Step-by-Step Troubleshooting
Step 1: Check EC2 Instance Health
First, verify:
- Instance state
- System status checks
- Instance status checks
- CPU and memory utilization
Remember: Running does not necessarily mean the application is healthy.
Step 2: Check the Security Groups
Verify the traffic flow:
- ALB Security Group: Allow inbound HTTP/HTTPS from intended clients.
- EC2 Security Group: Allow application traffic only from the ALB Security Group.
- Avoid exposing unnecessary ports publicly.
Also review Network ACLs and subnet route tables if connectivity still fails.
Step 3: Verify the Web Server
Connect to your Linux EC2 instance using SSH or Session Manager.
For Apache on RHEL/Amazon Linux:
sudo systemctl status httpd
sudo systemctl restart httpd
sudo systemctl enable httpd
For Nginx:
sudo systemctl status nginx
sudo nginx -t
Check whether the application is listening:
sudo ss -tulnp
Test locally:
Step 4: Check ALB Target Health
Open EC2 → Target Groups → Targets.
Check whether targets are:
- Healthy
- Unhealthy
- Initial
- Unused
If unhealthy, investigate:
- Health check path
- Health check port
- Application response code
- EC2 Security Group rules
- Application service status
Step 5: Investigate DNS and Networking
Use:
nslookup your-domain.com
And:
Verify Route 53 records, ALB listeners, subnet routes, and internet connectivity where applicable.
Step 6: Check CloudWatch
Review:
- EC2 CPU utilization
- ALB request count
- Target response time
- Healthy and unhealthy host counts
- Application logs
- Relevant alarms
Use the evidence to identify the actual root cause rather than guessing.
3. Common Problems and Solutions
Problem | What to investigate |
|---|---|
Website timeout | Routes, NACLs, Security Groups |
Connection refused | Web server and listening port |
ALB target unhealthy | Health check and application response |
DNS not resolving | Route 53 records |
Website loads slowly | CPU, memory, latency, logs |
HTTP 403 | Application permissions and access rules |
HTTP 502/503 | Target health and backend availability |
4. Real-World Testing Scenarios
Try these experiments in your own AWS lab:
- Stop the Apache service and observe the website response.
- Temporarily remove the required application port from the EC2 Security Group and observe connectivity.
- Configure an incorrect ALB health check path and observe target health.
- Review CloudWatch metrics during increased traffic.
- Restore the configuration and verify application accessibility.
Perform these tests only in a controlled lab environment, and restore the original settings afterward.
5. Key Learning Outcomes
By investigating this scenario, you can develop practical skills in:
- EC2 troubleshooting
- Linux service management
- AWS VPC networking
- Security Group configuration
- Application Load Balancer health checks
- DNS troubleshooting
- CloudWatch monitoring
- Root Cause Analysis
6. Let’s Discuss!
I want to hear from AWS professionals, Cloud Engineers, and fellow learners.
Question 1: If an EC2 instance shows Running but the website is unavailable, what is the first thing you would check?
Question 2: If the ALB Target Group shows Unhealthy, what are the three most common causes?
Question 3: Would you troubleshoot Security Groups first or the application service first? Why?
Question 4: Which AWS monitoring tool would you use to identify the root cause?
Share your troubleshooting approach and real-world experiences in the comments.
Let’s learn by building, breaking, troubleshooting, and improving! 🚀
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article