---
title: CloudTrail log file validation should be enabled
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > CloudTrail log file validation should
  be enabled
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# CloudTrail log file validation should be enabled
 
## Description{% #description %}

AWS CloudTrail trails should have log file validation enabled. Log file validation creates a digitally signed digest file containing a hash of each log file CloudTrail delivers to Amazon S3, which lets you determine whether a log file was modified, deleted, or remains unchanged after delivery. A trail fails this check when `LogFileValidationEnabled` is not set to `true`.

## Remediation{% #remediation %}

1. In the [CloudTrail console](https://console.aws.amazon.com/cloudtrail), open **Trails**, select the target trail, click **Edit** in the **General details** section, check **Enable** under **Log file validation** in **Advanced settings**, and click **Save changes**. Alternatively, run `aws cloudtrail update-trail --name <trail_name> --enable-log-file-validation` as described in the [AWS CLI update-trail reference](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/update-trail.html).
1. Periodically validate delivered logs with `aws cloudtrail validate-logs --trail-arn <trail_arn> --start-time <start_time> --end-time <end_time>`, as described in the [CloudTrail log file integrity validation guide](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-log-file-validation-intro.html).

## References{% #references %}

- [Enabling log file integrity validation for CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-log-file-validation-enabling.html)
- [Validating CloudTrail log file integrity](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-log-file-validation-intro.html)
- [AWS CLI update-trail command reference](https://docs.aws.amazon.com/cli/latest/reference/cloudtrail/update-trail.html)
- [CIS Amazon Web Services Benchmarks](https://www.cisecurity.org/benchmark/amazon_web_services)
