Skip to content

Instantly share code, notes, and snippets.

@travelhawk
Created November 14, 2022 14:29
Show Gist options
  • Save travelhawk/14f9be137b9d4eabd9ac32b97fdb4b6f to your computer and use it in GitHub Desktop.
Save travelhawk/14f9be137b9d4eabd9ac32b97fdb4b6f to your computer and use it in GitHub Desktop.
Service Control Policy (SCP) to restrict important services and configurations, e.g. CloudTrail etc.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": [
"organizations:LeaveOrganization",
"guardduty:DeleteDetector",
"guardduty:DisassociateFromMasterAccount",
"guardduty:UpdateDetector",
"guardduty:CreateFilter",
"guardduty:CreateIPSet",
"config:DeleteConfigRule",
"config:DeleteConfigurationRecorder",
"config:DeleteDeliveryChannel",
"config:StopConfigurationRecorder",
"events:DeleteRule",
"events:DisableRule",
"events:RemoveTargets"
],
"Resource": "*"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment