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?

  1. Create a new AWS Config rule to find all VPCs that are not configured to allocate their CIDR block from an IPAM pool. Invoke an AWS Lambda function to delete these VPCs.
  2. Create a new SCP in Organizations. Add a condition that denies the CreateVpc and AssociateVpcCidrBlock Amazon EC2 actions if the Ipv4IpamPoolId context key value is not the ID of an IPAM pool. Source Reference Answer
  3. Create an AWS Lambda function to check for and delete all VPCs that are not configured to allocate their CIDR block from an IPAM pool. Invoke the Lambda function at regular intervals.
  4. Create an Amazon EventBridge rule to check for AWS CloudTrail events for the CreateVpc and AssociateVpcCidrBlock Amazon EC2 actions. Use the rule to invoke an AWS Lambda function to delete all VPCs that are not configured to allocate their CIDR block from an IPAM pool.

Community Votes

B
100%

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)

AzureDP900 👍 3 Selected: B
Option B meets all of the requirements with least operational overhead: It creates a new SCP in Organizations that denies the CreateVpc and AssociateVpcCidrBlock Amazon EC2 actions if the Ipv4IpamPoolId context key value is not the ID of an IPAM pool. The SCP will prevent users from creating VPCs without the correct CIDR block. It prevents users from associating a CIDR block with existing VPCs unless the CIDR block is from the IPAM pool for that account.
woorkim 👍 1 Selected: B
AWS Organization Service control policy (SCP) to enforce CIDR allocation through IPAM while creating VPCs • Enforce using specific IPAM pools • Enforce specific IPAM pools to specific OUs
Spaurito 👍 1
B - This meets the requirements, although option A would as well. Only issue with option A, is the deletion of VPC's. Doesn't mention removing or reclaiming existing IP's.
[Removed] 👍 1 Selected: B
Question mentions organization so we have to use scp rule for central management
Akshay0403 👍 1 Selected: B
Option B is the most effective and efficient solution because it proactively prevents non-compliant actions at the organization level, enforcing a strict policy that ensures VPC creation and CIDR block associations are limited to IPAM pools. By leveraging SCPs, you can maintain control over your network architecture, ensuring all resources comply with predefined security and operational guidelines.
strike3test 👍 4 Selected: B
The most suitable option for enforcing the policy at the point of action (creating or associating CIDR blocks) across all AWS accounts in the organization is option B. Therefore, the correct answer is: B. Create a new SCP in Organizations. Add a condition that denies the CreateVpc and AssociateVpcCidrBlock Amazon EC2 actions if the Ipv4IpamPoolId context key value is not the ID of an IPAM pool.
rdiaz 👍 1 Selected: A
aws config

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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 →

← Back to ANS-C01 Study Guide