Enforcing Firewall Policies Across Accounts with AWS Firewall Manager
This lesson explains how AWS Firewall Manager applies and enforces security policies centrally across every account in an organisation, including accounts and resources created later.
Learning outcomes
After completing this lesson, you will be able to:
- Identify the prerequisites for Firewall Manager.
- Distinguish the Firewall Manager policy types.
- Describe policy scope and automatic remediation.
Prerequisites
AWS Firewall Manager applies firewall policies, for AWS WAF, Shield Advanced, security groups, Network Firewall, Route 53 Resolver DNS Firewall and third-party firewalls, across all accounts in an organisation from one place. Because it works across the organisation and relies on configuration tracking to find resources, it has prerequisites that must be in place before any policy can be applied. The following prerequisites must be in place.
- AWS Organizations with all features.
- A delegated Firewall Manager administrator account.
- AWS Config enabled in member accounts and Regions in scope.
Firewall Manager prerequisites
Policy types
Firewall Manager applies security policies across every account in an organisation, including new accounts and resources as they appear. AWS WAF policies deploy web ACLs and rule groups to ALBs, API Gateway stages, CloudFront distributions and other supported resources. Shield Advanced policies apply DDoS protection to chosen resource types.
Security group policies work in three ways. Common policies apply standard groups to resources, content audit policies find and fix overly permissive rules, and usage audit policies remove unused or redundant groups. Network Firewall policies deploy firewalls to VPCs, and DNS Firewall policies associate Resolver DNS Firewall rule groups. Policies also exist for network ACLs and for third-party firewalls from AWS Marketplace. The following table summarises the policy types.
| Policy | Manages |
|---|---|
| AWS WAF | Web ACLs and rule groups on ALBs, API Gateway, CloudFront and more |
| Shield Advanced | DDoS protections |
| Security group | Common groups applied to resources; content audits fix overly permissive rules; usage audits remove unused or redundant groups |
| Network Firewall | Firewall deployments |
| DNS Firewall | Resolver DNS Firewall rule groups |
| Network ACL, third-party | NACL policies; Marketplace firewalls |
The following diagram follows a Firewall Manager security group audit policy from audit mode to remediation.

Which security group policy?
Scope and enforcement
A Firewall Manager policy defines both the protection and the resources it applies to. Once the policy is created, Firewall Manager keeps checking for resources within its scope, so new accounts, new load balancers or new security groups are protected without anyone remembering to configure them. It also reports resources that are not compliant and can fix them. The following list describes scope and enforcement.
- Scope by account, OU, Region, resource type and resource tags (include or exclude).
- New in-scope resources and accounts are protected automatically.
- Per-resource compliance with automatic remediation, e.g. associating the web ACL or removing a permissive rule.
Firewall Manager scope
Removing open SSH everywhere, automatically
Across 150 accounts, some security groups allow SSH from 0.0.0.0/0. A Firewall Manager security group content audit policy finds them and, with automatic remediation, removes the offending rules in every in-scope account, including accounts added later:
aws fms put-policy --policy '{
"PolicyName": "no-open-admin-ports",
"SecurityServicePolicyData": {
"Type": "SECURITY_GROUPS_CONTENT_AUDIT",
"ManagedServiceData": "{\"type\":\"SECURITY_GROUPS_CONTENT_AUDIT\",\"securityGroupAction\":{\"type\":\"DENY\"},\"securityGroups\":[{\"id\":\"sg-0auditref\"}]}"
},
"ResourceType": "AWS::EC2::SecurityGroup",
"ExcludeResourceTags": false,
"RemediationEnabled": true,
"IncludeMap": { "ORGUNIT": ["ou-ab12-34cd5678"] }
}'The referenced audit security group contains the rules to deny (SSH and RDP from 0.0.0.0/0). Starting with RemediationEnabled: false shows the compliance report without changing anything, which lets owners of legitimate exceptions respond before enforcement. Excluding resources by tag handles approved exceptions.
Which Firewall Manager policy finds overly permissive security groups?
Show answer
A security group content audit policy.
Exam Tips
Remember for the exam
- To apply the same WAF rules to every ALB and CloudFront distribution, including future ones, use Firewall Manager.
- To find and fix overly permissive security groups across the organisation, use a security group content audit policy.
- To deploy DNS Firewall rules to every VPC, use a Firewall Manager DNS Firewall policy.
- Firewall Manager needs Organizations, an administrator account and AWS Config.
- To apply Shield Advanced across accounts, use Firewall Manager.