Skip to main content


Splunk Lantern

Disabled AWS CloudTrail logging

You might want to view and alert when AWS CloudTrail logging becomes disabled when doing the following:


In order to execute this procedure in your environment, the following data, services, or apps are required:


CloudTrail logs provide critical ground truth auditing of all AWS activity. Whether malicious or otherwise, timely detection of CloudTrail logging becoming disabled is important. Use this procedure to detect and alert when CloudTrail logs have been disabled.

To optimize the search shown below, you should specify a time range.

  1. Ensure that your deployment is ingesting AWS data through one of the following methods:
    • Pulling the data from Splunk via AWS APIs. At small scale, pull via the AWS APIs will work fine.
    • Pushing the data from AWS into Splunk via Lambda/Firehose to Splunk HTTP event collector. As the size and scale of either your AWS accounts or the amount of data to be collected grows, pushing data from AWS into Splunk is the easier and more scalable method.
  2. Run the following search: 
index="<AWS index name>" sourcetype="aws:cloudtrail" eventName=StopLogging
| rename AS trail_name userIdentity.arn AS who_done_it
| table _time aws_account_id region eventName trail_name who_done_it

Search explanation

The table provides an explanation of what each part of this search achieves. You can adjust this query based on the specifics of your environment.

Splunk Search Explanation
index="<AWS index name>" sourcetype="aws:cloudtrail" Search the index(s) where AWS data is stored filtered to just the AWS CloudTrail data.
eventName=StopLogging Filter the results down to the StopLogging event which is emitted when Cloudtrail logging is disabled. 
| rename AS trail_name userIdentity.arn AS who_done_it Rename the fields as shown for better readability.
| table _time aws_account_id region eventName trail_name who_done_it Display the results in a table with columns in the order shown.


Use the results of this search to re-enable CloudTrail logging and to take the appropriate measures to address the account that disabled it.

  • Was this article helpful?