-2

We have 10 EC2 instances and each of them has it's own EBS volumes, none of them are tagged and now i selected all the EBS volumes at once an detached them from their current EC2 instances.I want to attach those EBS volumes back to their respective EC2 instances just as they were attached before i detached them.

Question : How do i find which EC2 instance was connected to which EBS volume previously, I want to find this info and re-attach them as they were previously present

chandu
  • 9
  • 2
  • 8
  • Why did you detach them? I don't think there's any way to match them back up now. You *might* be able to match them up by looking at the date and time they were created. – Mark B May 02 '16 at 18:43
  • Well, i just want to know is there no way to map them back now, which volume was connected to which ec2 instance – chandu May 02 '16 at 18:59
  • look at the dates of the instances & volumes if not all were created at the same time. the other thing you can do: do you have cloudtrail enabled? – Mircea May 02 '16 at 19:07
  • If there is not tracking enable, and those are file system volumes, you can mount them as read only and inspect the contents. 10 instances... well, shouldn't be "that" difficult. ;-) – mootmoot May 03 '16 at 17:12

2 Answers2

2

There is a way.
Go to https://console.aws.amazon.com/cloudtrail
Set Filter = Resource Name & enter volume-id.
It'll give you all events regarding the volume you've provided.

Hope it'll help :)

Mahadev Patil
  • 109
  • 11
0

You can configure CloudTrail for the same. You can get the API logs from CloudTrail when you delete or attache EBS volumes. From CloudTrail you can find EBS volume which was attached to the instance.