# Deny disabling block public access for AMIs

Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.

Deny disabling block public access for AMIs is an AWS guardrail written in service control policies. Denies ec2:DisableImageBlockPublicAccess so Block public access for AMIs cannot be turned off. What it breaks: the README notes the default for the setting depends on whether the account is new or existing and whether it has public AMIs; the policy has no exception condition.

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Deny",
      "Action": "ec2:DisableImageBlockPublicAccess",
      "Resource": "*"
    }
  ]
}
```

- **Blocks:** Denies ec2:DisableImageBlockPublicAccess so Block public access for AMIs cannot be turned off.
- **Breaks:** The README notes the default for the setting depends on whether the account is new or existing and whether it has public AMIs; the policy has no exception condition. ([source](https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/Sensitive-data-protection/README.md))
- **Test before applying:** As for every Service control policies guardrail: [how to test before enforcing](/mechanisms/scp/)
- **Mechanism:** [Service control policies (SCPs)](/mechanisms/scp/): IAM users, IAM roles and the root user in member accounts; not the management account and not service-linked roles.
- **Taken from:** [open source set](https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/Service-specific-controls/Amazon-EC2/Deny-users-from-disabling-block-public-access-on-AMIs.json), MIT-0 (README states MIT-0; LICENSE file fetched, MIT-0 text, Copyright Amazon.com, Inc.): https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/LICENSE

## What the policy text names

It names 1 action or pattern: `ec2:DisableImageBlockPublicAccess`.

## What the source says

`ec2:DisableImageBlockPublicAccess` (read 10 Nov 2026).

On what it breaks: "The Block public access for AMIs setting default configuration depends on whether your"

## Related guardrails

- [Network interfaces should not have public IPs](/guardrails/azure-policy-nic-no-public-ip/): Azure, Azure Policy (built-in definitions), public exposure
- [Configure storage accounts to disallow public blob access](/guardrails/azure-policy-storage-disable-public-blob/): Azure, Azure Policy (built-in definitions), public exposure
- [Storage accounts should disable public network access](/guardrails/azure-policy-storage-disable-public-network/): Azure, Azure Policy (built-in definitions), public exposure
- [Require IAM authentication on Lambda function URLs](/guardrails/aws-scp-require-lambda-url-iam-auth/): AWS, Service control policies (SCPs), public exposure
- [Deny changes to S3 Block Public Access at bucket level](/guardrails/aws-rcp-deny-bucket-public-access-block-changes/): AWS, Resource control policies (RCPs), public exposure
- [Deny unauthenticated access to Cognito identity pools](/guardrails/aws-rcp-deny-cognito-unauthenticated-access/): AWS, Resource control policies (RCPs), public exposure

## Related pages

- [Deny AWS RAM sharing with external accounts (AWS Service control policies)](/guardrails/aws-scp-deny-ram-external-sharing/)
- [Require IAM authentication on Lambda function URLs (AWS Service control policies)](/guardrails/aws-scp-require-lambda-url-iam-auth/)
- [Require HTTPS for access to resources (AWS Resource control policies)](/guardrails/aws-rcp-require-https/)

## Sources

- Deny disabling block public access for AMIs: https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/Service-specific-controls/Amazon-EC2/Deny-users-from-disabling-block-public-access-on-AMIs.json (read 10 Nov 2026)
- What it breaks: https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/Sensitive-data-protection/README.md (read 10 Nov 2026)
- How to test it first: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html (read 10 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://cloudgovernancetools.com/guardrails/aws-scp-deny-disable-ami-block-public-access/
