Looking for help with the right RQL to
alert when any EBS data volume is de-attached from an EC2 instance
Solved! Go to Solution.
This should get you started:
event where operation = 'DetachVolume'
If you are looking for a specific user doing the action, you can add subject or role using the AND function.
This is a built-in policy:
"AWS EBS Volume is unattached"
RQL:
config where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-volumes' AND json.rule = attachments[*] all empty or attachments[*].state does not contain "attached"
Thanks for the query.
However, Question was about the detection event, if there was any volume de-attached. Later on, maybe that was left in the de-attached state or may be attached to another machine or attached to the same machine.
This query provided simply returns the de-attached volume list.
We might have to look at audit events.
This should get you started:
event where operation = 'DetachVolume'
If you are looking for a specific user doing the action, you can add subject or role using the AND function.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!