AWS EC2 Rescue Mode: A DevOps Scenario for Freshers

View profile for Ganesh Kumar Singh

DevOps Lead | Tech Strategist | I Don’t Just Use Tools — I Break Them Down, Understand Them Deeply & Build Smarter Solutions

DevOps Scenario-Based Series – For Freshers <5/100> AWS Rescue Mode Scenario: You are managing an EC2 instance hosting a production app. Suddenly, the instance becomes unreachable via SSH. On investigation, you realize: Disk utilization is 100% full Load average is extremely high You cannot even SSH into the instance Question: How will you recover this EC2 instance and bring it back to a stable state? Solution (Step-by-Step): Stop the Instance Go to the AWS Console → EC2 → Select the instance → Stop it. Detach the Root Volume From the instance details, detach the root EBS volume. Attach to a Helper Instance Launch/identify another healthy EC2 instance. Attach the detached volume as a secondary disk to this helper instance. Mount the Volume SSH into the helper instance. Mount the secondary volume (e.g., /dev/xvdf → /mnt/rescue). Free Up Space Navigate inside /mnt/rescue and check large files. Delete old logs, temp files, or move unused data to S3. Example: sudo du -sh * | sort -h sudo rm -rf /mnt/rescue/var/log/old_logs/* Detach and Reattach Unmount the volume. Detach it from the helper instance. Reattach it as the root volume to the original instance. Start the Instance Boot up the original EC2 instance. Now SSH should work fine. Prevention Tips: Use CloudWatch alarms to monitor disk usage. Implement log rotation to prevent oversized log files. Use EBS Auto-Scaling (gp3, io2) or EFS/S3 for heavy storage workloads. Learning: Rescue Mode (via detach/attach volumes) is a life-saving technique for AWS EC2 when normal SSH access is blocked. #justvisualise #AWS #EC2 #RescueMode #DevOps #ScenarioBased #100DaysOfDevOps

Arjun Thazhath

Devops Engineer @ Onedata | BITS Pilani | B.Sc. Computer Science | 2x AWS certified

1mo

Good one! I learn quite a lot from these case studies. Keep posting.👌

Rushikesh Vikhe

Devops Engineer At Atos, Pune AWS DevOps Engineer | 3 YOE | Docker, Jenkins, Kubernetes, Terraform, GitHub Actions | Open to Work.

1mo

We can also increase the ebs voume only.

Mohit Patil

Aspiring DevOps Engineer | Learning Linux | AWS | Git & Github | Docker | CI/CD | Building in Public | Sharing projects and progress

1mo

Getting a lot of knowledge ! Keep doing it ✌

Mohit Metha

DevOps | AWS Cloud | Python | Kubernetes | Docker | Jenkins | Github | Security | Linux | Computer Networking

1mo

Great approach!

Aditya Kumar Sahu

DevOps Engineer | Tenxengage | Ex. Deloitte | Linux | AWS | GCP | Kubernetes | Terraform | Red Hat Certified Specialist

1mo

Also, sometimes even a reboot/restart works to free up little space which will allow us to ssh and we can further do the cleanup.

Samarth Sharma

Aspiring learner | Python | Cloud computing (Aws) | Customer service | Mastering devops tools Print(“Success”)

1mo

Informative!!

Ravi Datt

Immediate Joiner | Sr. Devops Engineer | AWS | FinOps | Jenkins | Ansible | Terraform | Maven | Docker | Kubernetes | bash scripting | Linux | Git & Gitlab | jfrog | NewRelic

1mo

Very insightful 👌

INDRA REDDY PATLOLLA

| AWS | Docker | Linux | Ansible | Git and Github | jenkins| Kubernaties| terraform| EKS| EC2| S3| ECS| EBS|VPC|ASG|LAMDA|RDS|ROUTE53|Python

1mo

well put ganesh kumar

Vembarasan Thambidurai

DevOps, decoded. Simplifying Kubernetes, Linux, Cloud

1mo

Rescue mode with detach/attach is a must-know trick for any DevOps engineer handling EC2 in production.

Venkat Kumar Meda

DevOps | Kubernetes | AWS | AI | Cloud Engineer | Computer Vision Engineer

1mo

Great insights, learned a lot from this case study 👏

See more comments

To view or add a comment, sign in

Explore content categories