Managing IPAM policies
This section describes the prerequisites for IPAM policies and how to create and enable them.
Prerequisites
Before you begin, make sure that you have the following:
-
An IPAM
-
Amazon Identity and Access Management (IAM) permissions for the IPAM policy operations and for the Amazon Elastic Compute Cloud (Amazon EC2) operations that create the governed resources
Creating an IPAM policy
You can create an IPAM policy by using the Amazon Web Services Management Console or the Amazon CLI.
To create an IPAM policy (console)
Open the IPAM console at https://console.amazonaws.cn/ipam/
. -
In the left navigation pane, choose Policies.
-
Choose Create policy.
-
Enter a Name for your policy (optional).
-
Select the IPAM to associate with this policy.
-
(Optional) Add tags.
-
Choose Create policy.
To create an IPAM policy (Amazon CLI)
-
Use the create-ipam-policy command.
After you create the policy, add rules to it. For more information about allocation rules, see Defining a public IPv4 allocation strategy with IPAM policies.
Enabling an IPAM policy
Specify which accounts should use the policy. A policy's targets apply to all of the rules in the policy, and only one policy can be enabled for a given target.
To enable an IPAM policy (console)
-
In your policy details page, choose the Targets tab.
-
Choose Manage policy targets.
-
Do one of the following:
-
For single account usage (IPAM not integrated with Amazon Organizations, or an account applying a policy to itself), choose Enable for your account.
-
For IPAM integrated with Amazon Organizations (when you're the delegated admin):
-
In the Organizational structure section, select the accounts or organizational units where you want to apply this policy.
-
Check the Enabled checkbox for each target.
-
Choose Save Changes.
-
-
To enable an IPAM policy (Amazon CLI)
-
Use the enable-ipam-policy command based on your setup:
-
For single account usage (IPAM not integrated with Amazon Organizations, or an account applying a policy to itself):
aws ec2 enable-ipam-policy \ --ipam-policy-idipam-policy-12345678 -
For IPAM integrated with Amazon Organizations (when you're the delegated admin), set a policy to target an account in the organization:
aws ec2 enable-ipam-policy \ --ipam-policy-idipam-policy-12345678\ --organization-target-id111122223333 -
For IPAM integrated with Amazon Organizations (when you're the delegated admin), set a policy to target an organizational unit:
aws ec2 enable-ipam-policy \ --ipam-policy-idipam-policy-12345678\ --organization-target-idou-123
-
Enabling a policy for a target replaces any policy that is already enabled for that same target. Policies enabled for different targets coexist. For more information, see Which policy applies to an account.