Description
enable_logging: false stops this trail’s log delivery. CloudTrail Event history still shows the past 90 days of management events in each Region.
Potential impact
A gap in the trail can leave required data events or long-term change records unavailable.
Remediation
Set enable_logging: true. Select the required event types and Regions, then perform an operation covered by the trail and look for its event in a new S3 log file.
Examples
Set audit_bucket to an existing bucket that permits CloudTrail log delivery. Configure event selectors separately from amazon.aws.cloudtrail.
Before
yaml
- name: example
amazon.aws.cloudtrail:
state: present
name: default
s3_bucket_name: "{{ audit_bucket }}"
enable_logging: false
After
yaml
- name: example
amazon.aws.cloudtrail:
state: present
name: default
s3_bucket_name: "{{ audit_bucket }}"
enable_logging: true