Prevents tampering with CloudTrail logs by blocking attempts to delete trails, update configurations, or stop logging.
What this SCP does
This Service Control Policy (SCP) prevents tampering with CloudTrail logs by blocking attempts to delete trails, update configurations, or stop logging activities. This ensures audit logs remain intact for compliance and security investigations.
The policy explicitly denies the deletion of trails, updates to trail configurations, and stopping of logging. This preserves the integrity of your audit trail even if someone gains unauthorized access to your AWS account.
How to test this SCP works
To validate this SCP, try to delete, update, or stop logging for a CloudTrail trail:
We expect creation of trails and starting logging to succeed, while any operations that would tamper with existing trails (delete, update, stop logging) should be denied with an AccessDenied error.