How to enforce IPAM pool CIDR allocation for VPCs across AWS accounts?
A company has AWS accounts in an organization in AWS Organizations. The company has implemented Amazon VPC IP Address Manager (IPAM) in its networking AWS account. The company is using AWS Resource Access Manager (AWS RAM) to share IPAM pools with other AWS accounts. The company has created a top-level pool with a CIDR block of 10.0.0.0/8. For each AWS account, the company has created an IPAM pool within the top-level pool. A network engineer needs to implement a solution to ensure that users in each AWS account cannot create new VPCs. The solution also must prevent users from associating a CIDR block with existing VPCs unless the CIDR block is from the IPAM pool for that account. Which solution will meet these requirements?
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
This question tests the distinction between preventive (SCP) and detective/remediative (Config/Lambda/EventBridge) controls for enforcing governance on AWS Organizations, with the common trap being the appeal of an 'automated deletion' solution that doesn't prevent the violation and can cause data loss.
To enforce that VPC creation and CIDR association must use an account-specific IPAM pool, the recommended solution is an AWS Organizations Service Control Policy (SCP) that denies ec2:CreateVpc and ec2:AssociateVpcCidrBlock when the ec2:Ipv4IpamPoolId condition key is missing or does not match the allowed pool. The community overwhelmingly selected this SCP-based option (91% of votes) because it is a proactive, centralized control, while the Lambda/Config/EventBridge alternatives are reactive and involve destructive VPC deletion.
The most common wrong answers involve using AWS Config or a scheduled Lambda to detect and delete non-compliant VPCs. Candidates choose these because they seem automated and directly remove offending resources, but they fail to prevent the initial unauthorized creation/association and delete VPCs that may contain production workloads.
Community Discussion (7 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the SCP (Option B) is Correct
Service control policies (SCPs) are the only option that proactively denies the specific EC2 API actions before any resource is created or modified. An SCP attached to the organization, organizational unit (OU), or specific accounts can include a policy statement that denies ec2:CreateVpc and ec2:AssociateVpcCidrBlock unless the request contains an IPAM pool ID that matches the account's designated pool. The ec2:Ipv4IpamPoolId condition key allows this check. Because SCPs affect all IAM principals in the account, they provide a centralized, unbypassable control (except by the management account, which is the intended trust boundary).
Why the Lambda/Config/EventBridge Options Are Wrong
Option A relies on AWS Config to detect non-compliant VPCs and then invokes a Lambda function to delete them. This is a detective/reactive control – the VPC has already been created before remediation occurs. Deleting VPCs can bring down running workloads and is not an acceptable way to enforce policy. Option C is similar, requiring a scheduled Lambda scan that is inefficient and also deletes VPCs. Option D uses EventBridge to watch CloudTrail events and then invoke Lambda to delete the VPC. It too is reactive and fragile; if CloudTrail delivery is delayed or the Lambda fails, non-compliant resources may persist.
Community Perspective
Community comments overwhelmingly support B. One user noted: “Option B meets all of the requirements with least operational overhead” (AzureDP900). Another user highlighted that the presence of AWS Organizations means “we have to use scp rule for central management” ([Removed]). A commenter who considered Option A pointed out that its “issue is the deletion of VPCs” and that it “doesn't mention removing or reclaiming existing IP's” (Spaurito). This reinforces the principle that preventive organization-level policies are superior to reactionary deletion-based approaches.
Additional Considerations
Remember to attach the SCP to the appropriate OUs/accounts. You can also combine the SCP with AWS Config rules if you need ongoing visibility, but the SCP alone satisfies the requirement to prevent unauthorized CIDR allocation. Also note that the condition key is ec2:Ipv4IpamPoolId, which is available for both CreateVpc and AssociateVpcCidrBlock.
Official Reference
Exam Strategy
When a question involves enforcing compliance across all accounts in AWS Organizations, look for a Service Control Policy (SCP) as a preventive, centralized control. Be suspicious of options that use AWS Config, Lambda, or EventBridge to 'delete' resources, as they are reactive and destructive, not preventive.
Related Analysis
Practice All ANS-C01 Questions
Access 137 questions with complete answers and detailed explanations.
View Full ANS-C01 Practice Test →