code: @Override
      public boolean filterEvent(CloudTrailEvent event) throws CallbackException {
          CloudTrailEventData eventData = event.getEventData();
  
          String eventSource = eventData.getEventSource();
          String eventName = eventData.getEventName();
  
          return eventSource.equals(EC2_EVENTS) && eventName.startsWith("Delete");
      }
docs: Event filter that only keep EC2 deletion API calls.