I'm trying to figure out how to find EBS volumes that are attached to EC2 instances that are currently powered off. Specifically, I want a method that can work across different AWS accounts. Any suggestions?
2 Answers
You might want to check out Steampipe! It's a great tool that lets you write SQL-like queries against AWS APIs, and it can handle multiple accounts at once. That way, you could run a single query to find what you need across all your environments.
If I remember correctly, you can look for stopped instances and then identify the volumes attached to them. Alternatively, you could list all your volumes and then check which instances they're attached to, and see if those are stopped. The CLI or Boto3 should make this pretty efficient.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures