Prevents deletion of critical CloudWatch logs and alarms, ensuring your monitoring infrastructure remains intact.
What this SCP does
This Service Control Policy (SCP) prevents deletion of critical CloudWatch logs and alarms, ensuring your monitoring and alerting infrastructure remains intact. This provides protection against accidental or malicious deletion of monitoring resources.
The policy explicitly denies the deletion of CloudWatch log groups, log streams, and alarms. This ensures that important monitoring data and alert configurations cannot be removed, preserving operational visibility and compliance capabilities.
How to test this SCP works
To validate this SCP, create test log groups, log streams, and alarms, then attempt to delete them:
We expect resource creation to succeed, while any deletion operations should be denied with an AccessDenied error, confirming that the SCP is protecting these monitoring resources.