id
stringlengths
8
78
source
stringclasses
743 values
chunk_id
int64
1
5.05k
text
stringlengths
593
49.7k
vpc-ipam-038
vpc-ipam.pdf
38
in the Free Tier. • If your IPAM is integrated with AWS Organizations, the active IP count covers all the Organization accounts. • You cannot view a breakdown of the active IP count by IP type (public/private) or class (IPv4/IPv6). • IPAM only counts IPs from ENIs owned by monitored accounts. The count may be inaccurate for shared subnets. IP addresses are excluded if the subnet owner or ENI owner is not covered by IPAM. IPAM pool metrics The AWS/IPAM namespace includes the following pool metrics for IPAM. Metric name Description CompliantResourceCidrs NoncompliantResourceCidrs The number of managed resource CIDRs that comply with the allocation rules of the IPAM pool. For more information about allocation rules, see Create a top-level IPv4 pool. The number of managed resource CIDRs that do not comply with the allocation rules of the IPAM pool. For more informati on about allocation rules, see Create a top-level IPv4 pool. Pool and scope metrics 90 Amazon Virtual Private Cloud IP Address Manager Metric name Description PercentAllocated PercentAssigned PercentAvailable IPAM scope metrics The percentage of a pool's IP space that has been allocated to other pools. The percentage of a pools IP space that has been allocated to resources, including manual allocations. The percentage of a pool's IP space that has not been allocated to other pools or resources. The AWS/IPAM namespace includes the following scope metrics for IPAM. Metric name Description CompliantResourceCidrs The number of resource CIDRs that comply with the allocation rules for IPAM pools in the scope. ManagedResourceCidrs The number of resource CIDRs for manageable resources (VPCs or public IPv4 pools) that are allocated from an IPAM pool in the scope. NoncompliantResourceCidrs The number of resource CIDRs that do not comply with the allocation rules for the IPAM pools in the scope. OverlappingResourceCidrs The number of resource CIDRs that overlap in the scope. UnmanagedResourceCidrs The number of resource CIDRs in the scope that are currently associated with manageable resources but are not managed by IPAM. IPAM public IP metrics The AWS/IPAM namespace includes the following public IP metrics for IPAM. Pool and scope metrics 91 Amazon Virtual Private Cloud IP Address Manager Metric name Description AmazonOwnedContigIPs The number of IP addresses within CIDRs that are provisioned to Amazon-provided contiguous public IPv4 pools owned by the IPAM. AllocatedAmazonOwn edContigIPs The number of IP addresses that have been allocated from an Amazon-provided contiguous public IPv4 pool CIDR block. UnallocatedAmazonO wnedContigIPs The number of IP addresses within the Amazon-provided contiguous public IPv4 pool CIDR block owned by the IPAM. AssociatedAmazonOw nedContigIPs The number of Elastic IP addresses that have been allocated from an Amazon-provided contiguous public IPv4 pool CIDR block that are associated with an elastic network interface. UnassociatedAmazon OwnedContigIPs The number of Elastic IP addresses that have been allocated from an Amazon-provided contiguous public IPv4 pool CIDR block that are not associated with an elastic network interface. Metric dimensions To filter the IPAM metrics, use the following dimensions. Dimension Description AddressFamily The IP address family for resource CIDRs (IPv4 or IPv6). Locale PoolID ScopeID The AWS Region where an IPAM pool is available for allocatio ns. The ID of a pool. The ID of a scope. For information about monitoring VPCs with Amazon CloudWatch, see CloudWatch metrics for your VPCs in the Amazon Virtual Private Cloud User Guide. Pool and scope metrics 92 Amazon Virtual Private Cloud IP Address Manager IPAM resource utilization metrics IPAM publishes IP utilization metrics for resources that the IPAM monitors to Amazon CloudWatch. These resources include: • VPCs (IPv4 and IPv6) • Subnets (IPv4) • Public IPv4 pools IPAM calculates and publishes IP utilization metrics separately by IP address family (IPv4 or IPv6). The IP utilization of a resource is calculated across all of its CIDRs of the same address family. For each resource type and address family combination, IPAM uses three rules to determine which metrics to publish: • Up to 50 resources with the highest IP utilization. You can use this information to configure alarms to be alerted if an IP utilization threshold is breached. • Up to 50 resources with the lowest IP utilization. You can use this information to decide if you want to keep or delete resources that are underutilized. • Up to 50 other resources. You can use this information to consistently track the IP utilization of resources that may not be captured within the high or low utilization group. • Up to 50 VPCs containing a CIDR allocated from an IPAM pool (prioritized by total size of CIDR blocks). • Up to 50 subnets whose VPC contains a CIDR allocated from an IPAM pool (prioritized by total size of CIDR blocks). • Up to 50 public IPv4 pools containing a CIDR allocated from an IPAM pool (prioritized by total size of CIDR blocks). After applying each
vpc-ipam-039
vpc-ipam.pdf
39
are underutilized. • Up to 50 other resources. You can use this information to consistently track the IP utilization of resources that may not be captured within the high or low utilization group. • Up to 50 VPCs containing a CIDR allocated from an IPAM pool (prioritized by total size of CIDR blocks). • Up to 50 subnets whose VPC contains a CIDR allocated from an IPAM pool (prioritized by total size of CIDR blocks). • Up to 50 public IPv4 pools containing a CIDR allocated from an IPAM pool (prioritized by total size of CIDR blocks). After applying each rule, the metrics are aggregated and published under the same metric name for each resource type. See below for detailed information on the metric names and their dimensions. Resource utilization metrics 93 Amazon Virtual Private Cloud IP Address Manager Important There is a unique limit for each resource type, address family, and rule combination. The default value of each limit is 50. You can adjust these limits by contacting the AWS Support Center as described in AWS service quotas in the AWS General Reference. Example Example Let’s say that your IPAM monitors 2,500 VPCs and 10,000 subnets, all with IPv4 and IPv6 CIDRs. IPAM publishes the following IP utilization metrics: • Up to 150 metrics for VPC IPv4 IP utilization, including: • The 50 VPCs with the highest IPv4 IP utilization • The 50 VPCs with the lowest IPv4 utilization • Up to 50 VPCs containing an IPv4 CIDR allocated from an IPAM pool • Up to 150 metrics for VPC IPv6 utilization, including: • The 50 VPCs with the highest IPv6 IP utilization • The 50 VPCs with the lowest IPv6 utilization • Up to 50 VPCs containing an IPv6 CIDR allocated from an IPAM pool • Up to 150 metrics for subnet IPv4 utilization, including: • The 50 subnets with the highest IPv4 IP utilization • The 50 subnets with the lowest IPv4 IP utilization • Up to 50 subnets whose VPC contains an IPv4 CIDR allocated from an IPAM pool VPC metrics The VPC metric name and description is listed below. Metric name Description VpcIPUsage The total IPs covered by CIDRs in the VPC’s subnets divided by the total IPs covered by CIDRs in the VPC. This is calculated across all VPC CIDRs in the same IPAM Scope and separately for IPv4 and IPv6 CIDRs. Resource utilization metrics 94 Amazon Virtual Private Cloud IP Address Manager The dimensions you can use to filter VPC metrics are listed below. Dimension Description AddressFamily The IP address family for resource CIDRs (IPv4 or IPv6). OwnerID Region ScopeID VpcID The ID of the VPC owner. The AWS Region where the VPC is located. The ID of the IPAM scope that the VPC belongs to. The ID of the VPC. Subnet metrics The subnet metric name and description is listed below. Metric name Description SubnetIPUsage The number of active IPs divided by total IPs in the subnet's IPv4 CIDR. The dimensions you can use to filter subnet metrics are listed below. Dimension Description AddressFamily The IP address family for resource CIDRs (IPv4 only). OwnerID Region ScopeID SubnetID VpcID The ID of the subnet owner. The AWS Region where the subnet is located. The ID of the IPAM scope that the subnet belongs to. The ID of the subnet. The ID of the VPC that the subnet belongs to. Resource utilization metrics 95 Amazon Virtual Private Cloud Public IPv4 pool metrics IP Address Manager The public IPv4 pool metric name and description is listed below. Metric name Description PublicIPv4PoolIPUsage The number of EIPs from the public IPv4 Pool divided by total IPs in the pool. The dimensions you can use to filter the public IPv4 pool metrics are listed below. Dimension OwnerID Description The ID of the public IPv4 pool owner. PublicIPv4PoolID The ID of the public IPv4 pool. Region ScopeID The AWS Region where the public IPv4 pool is located. The ID of the IPAM scope that the public IPv4 pool belongs to. Public IP insight metrics The public IP insight metric names and descriptions are listed below. Metric name Description AmazonOwnedElasticIPs The number of Amazon-owned Elastic IP addresses that you have provisioned or assigned to resources in your AWS account. AssociatedAmazonOw nedElasticIPs The number of Amazon-owned Elastic IP addresses that you have associated with resources in your AWS account. AssociatedBringYourOwnIPs The number of public IPv4 addresses that you have brought to AWS using Bring your own IP addresses (BYOIP) and have associated with resources in your AWS account. Resource utilization metrics 96 Amazon Virtual Private Cloud IP Address Manager Metric name Description BringYourOwnIPs EC2PublicIPs The number of public IPv4 addresses that you have brought to AWS using Bring your own IP addresses (BYOIP). The number of public IPv4 addresses assigned to
vpc-ipam-040
vpc-ipam.pdf
40
provisioned or assigned to resources in your AWS account. AssociatedAmazonOw nedElasticIPs The number of Amazon-owned Elastic IP addresses that you have associated with resources in your AWS account. AssociatedBringYourOwnIPs The number of public IPv4 addresses that you have brought to AWS using Bring your own IP addresses (BYOIP) and have associated with resources in your AWS account. Resource utilization metrics 96 Amazon Virtual Private Cloud IP Address Manager Metric name Description BringYourOwnIPs EC2PublicIPs The number of public IPv4 addresses that you have brought to AWS using Bring your own IP addresses (BYOIP). The number of public IPv4 addresses assigned to EC2 instances when the instances were launched into a default subnet or into a subnet configured to automatically assign a public IPv4 address. ServiceManagedBrin gYourOwnIPs The number of public IPv4 addresses that you have brought to AWS using Bring your own IP addresses (BYOIP) that are provisioned and managed by an AWS service. ServiceManagedIPs The number of public IPv4 addresses provisioned and managed by an AWS service. UnassociatedAmazon OwnedElasticIPs The number of Amazon-owned Elastic IP addresses that you have not associated with resources in your AWS account. UnassociatedBringY ourOwnIPs The number of public IPv4 addresses that you have brought to AWS using Bring your own IP addresses (BYOIP) and have not associated with any resources in your AWS account. The dimensions you can use to filter the public IP insight metrics are listed below. Dimension Description IpamId Region The ID of the IPAM that the IP address belongs to. The AWS Region where the public IP address is located. Quick tip for creating alarms To quickly create an Amazon CloudWatch alarm for resources with high IP address utilization, open the CloudWatch console, choose Metrics, All metrics, choose the Query tab, choose the Namespace AWS/IPAM > VPC IP Usage Metrics, AWS/IPAM > Subnet IP Usage Resource utilization metrics 97 Amazon Virtual Private Cloud IP Address Manager Metrics, or AWS/IPAM > Public IPv4 Pool IP Usage Metrics, choose the Metric name MAX(VpcIPUsage), MAX(SubnetIPUsage), or MAX(PublicIPv4PoolIPUsage), and choose Create alarm. For more information, see Create alarms on Metrics Insights queries in the Amazon CloudWatch User Guide. View IP address history Follow the steps in this section to view the history of an IP address or CIDR in an IPAM scope. You can use the historical data to analyze and audit your network security and routing policies. IPAM automatically retains IP address monitoring data for up to three years. You can use the IP historical data to search for the status change of IP addresses or CIDRs for the following types of resources: • VPCs • VPC subnets • Elastic IP addresses • EC2 instances • EC2 network interfaces attached to instances Important Although IPAM doesn't monitor Amazon EC2 instances or EC2 network interfaces that are attached to instances, you can use the Search IP history feature to search for historical data on EC2 instance and network interface CIDRs. Note • If you move a resource from one IPAM scope to another, the previous history record ends and a new history record is created under the new scope. For more information, see Move VPC CIDRs between scopes. • If you delete or transfer a resource to an AWS account that's not monitored by your IPAM, any new history related to the resource will not be visible and your IPAM won't monitor the resource. The IP address of the resource, however, will still be searchable. View IP address history 98 Amazon Virtual Private Cloud IP Address Manager • If you Integrate IPAM with accounts outside of your organization, the IPAM owner can view the IP address history of all resource CIDRs owned by those accounts. AWS Management Console To view the history of a CIDR 1. Open the IPAM console at https://console.aws.amazon.com/ipam/. 2. 3. In the navigation pane, choose Search IP history. Enter an IPv4 or IPv6 IP address or CIDR. This must be a specific CIDR for the resource. 4. Choose an IPAM scope ID. 5. Choose a date/time range. 6. If you want to filter the results by VPC, enter a VPC ID. Use this option if the CIDR appears in multiple VPCs. 7. Choose Search. Command line The commands in this section link to the AWS CLI Reference documentation. The documentation provides detailed descriptions of the options that you can use when you run the commands. • View the history of a CIDR: get-ipam-address-history To see examples of how you can use the AWS CLI to analyze and audit IP address usage, see Tutorial: View IP address history using the AWS CLI. The results of the search are organized into the following columns: • Sampled end time: Sampled end time of the resource-to-CIDR association within the IPAM scope. Changes are picked up in periodic snapshots, so the end time might have occurred
vpc-ipam-041
vpc-ipam.pdf
41
link to the AWS CLI Reference documentation. The documentation provides detailed descriptions of the options that you can use when you run the commands. • View the history of a CIDR: get-ipam-address-history To see examples of how you can use the AWS CLI to analyze and audit IP address usage, see Tutorial: View IP address history using the AWS CLI. The results of the search are organized into the following columns: • Sampled end time: Sampled end time of the resource-to-CIDR association within the IPAM scope. Changes are picked up in periodic snapshots, so the end time might have occurred before this specific time. • Sampled start time: Sampled start time of the resource-to-CIDR association within the IPAM scope. Changes are picked up in periodic snapshots, so the start time might have occurred before this specific time. View IP address history 99 Amazon Virtual Private Cloud Example IP Address Manager To help explain the times that you see under Sampled start time and Sampled end time, let’s look at an example use case: At 2:00 PM, a VPC was created with CIDR 10.0.0.0/16. At 3:00 PM, you create an IPAM and IPAM pool with CIDR 10.0.0.0/8, and select the auto-import option to allow IPAM to discover and import any CIDRs that fall within the 10.0.0.0/8 IP address range. Because IPAM picks up changes to CIDRs in periodic snapshots, it doesn’t discover the existing VPC CIDR until 3:05 PM. When you search for the ID of this VPC using the Search IP history feature, the Sampled start time for your VPC is 3:05 PM, which is when IPAM discovered it, not 2:00 PM, which is when you created the VPC. Now, let’s say that you decide to delete the VPC at 5:00 PM. When the VPC is deleted, the CIDR 10.0.0.0/16 that was allocated to the VPC is recycled back into the IPAM pool. IPAM takes its periodic snapshot at 5:05 PM and picks up the change. When you search for the ID of this VPC in Search IP history, 5:05 PM is the Sampled end time for the VPC’s CIDR, not 5:00 PM, which is when the VPC was deleted. • Resource ID: The ID generated when the resource was associated with the CIDR. • Name: The name of the resource (if applicable). • Compliance status: The compliance status of the CIDR. • Compliant: A managed resource complies with the allocation rules of the IPAM pool. • Noncompliant: The resource CIDR does not comply with one or more of the allocation rules of the IPAM pool. Example If a VPC has a CIDR that does not meet the netmask length parameters of the IPAM pool, or if the resource is not in the same AWS Region as the IPAM pool, it will be flagged as noncompliant. • Unmanaged: The resource does not have a CIDR allocated from an IPAM pool and is not being monitored by IPAM for potential CIDR compliance with pool allocation rules. The CIDR is monitored for overlap. • Ignored: The managed resource has been chosen to be exempt from monitoring. Ignored resources are not evaluated for overlap or allocation rule compliance. When a resource is chosen to be ignored, any space allocated to it from an IPAM pool is returned to the pool and the resource will not be imported again through automatic import (if the automatic import allocation rule is set on the pool). View IP address history 100 Amazon Virtual Private Cloud IP Address Manager • -: This resource is not one of the types of resources that IPAM can monitor or manage. • Overlap status: The overlap status of CIDR. • Nonoverlapping: The resource CIDR does not overlap with another CIDR in the same scope. • Overlapping: The resource CIDR overlaps with another CIDR in the same scope. Note that if a resource CIDR is overlapping, it could be overlapping with a manual allocation. • Ignored: The managed resource has been chosen to be exempt from monitoring. IPAM does not evaluate ignored resources for overlap or allocation rule compliance. When a resource is chosen to be ignored, any space allocated to it from an IPAM pool is returned to the pool and the resource will not be imported again through automatic import (if the automatic import allocation rule is set on the pool). • -: This resource is not one of the types of resources that IPAM can monitor or manage. • Resource type • vpc: The CIDR is associated with a VPC. • subnet: The CIDR is associated with a VPC subnet. • eip: The CIDR is associated with an Elastic IP address. • instance: The CIDR is associated with an EC2 instance. • network-interface: The CIDR is associated with a network interface. • VPC ID: The ID of the VPC that
vpc-ipam-042
vpc-ipam.pdf
42
resource will not be imported again through automatic import (if the automatic import allocation rule is set on the pool). • -: This resource is not one of the types of resources that IPAM can monitor or manage. • Resource type • vpc: The CIDR is associated with a VPC. • subnet: The CIDR is associated with a VPC subnet. • eip: The CIDR is associated with an Elastic IP address. • instance: The CIDR is associated with an EC2 instance. • network-interface: The CIDR is associated with a network interface. • VPC ID: The ID of the VPC that this resource belongs to (if applicable). • Region: The AWS Region of this resource. • Owner ID: The AWS account ID of the user that created this resource (if applicable). View public IP insights You can use Public IP insights to see the following: • If your IPAM is integrated with accounts in an AWS Organization, you can view all public IPv4 addresses used by services across all AWS Regions for your entire AWS Organization. • If your IPAM is integrated with a single account, you can view all public IPv4 addresses used by services across all AWS Regions in your account. A public IPv4 address is an IPv4 address that is routable from the internet. A public IPv4 address is necessary for a resource to be directly reachable from the internet over IPv4. View public IP insights 101 Amazon Virtual Private Cloud IP Address Manager Note AWS charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the Amazon VPC pricing page. You can view insights into the following public IPv4 address types: • Elastic IP addresses (EIPs): Static, public IPv4 addresses provided by Amazon that you can associate with an EC2 instance, elastic network interface, or AWS resource. • EC2 public IPv4 addresses: Public IPv4 addresses assigned to an EC2 instance by Amazon (if the EC2 instance is launched into a default subnet or if the instance is launched into a subnet that’s been configured to automatically assign a public IPv4 address). • BYOIPv4 addresses: Public IPv4 addresses in the IPv4 address range that you’ve brought to AWS using Bring your own IP addresses (BYOIP). • Service-managed IPv4 addresses: Public IPv4 addresses automatically provisioned on AWS resources and managed by an AWS service. For example, public IPv4 addresses on Amazon ECS, Amazon RDS, or Amazon WorkSpaces. Public IP insights shows you all public IPv4 addresses used by services across Regions. You can use these insights to identify public IPv4 address usage and view recommendations to release unused Elastic IP addresses. • Public IP types: The number of public IPv4 addresses organized by type. • Amazon-owned EIPs: Elastic IP addresses that you have provisioned or assigned to resources in your AWS account. • EC2 public IPs: Public IPv4 addresses assigned to EC2 instances when the instances were launched into a default subnet or into a subnet that’s been configured to automatically assign a public IPv4 address. • BYOIP: Public IPv4 addresses that you have brought to AWS using Bring your own IP addresses (BYOIP). • Service managed IPs: Public IPv4 addresses provisioned and managed by an AWS service. • Service managed BYOIP: Public IPv4 addresses brought to AWS and managed by an AWS service. View public IP insights 102 Amazon Virtual Private Cloud IP Address Manager • Amazon-owned contiguous EIPs: Elastic IP addresses allocated from an Amazon-provided contiguous public IPv4 IPAM pool. • EIP usage: The number of Elastic IP addresses organized by how they are used. • Associated Amazon-owned EIPs: Elastic IP addresses that you have provisioned in your AWS account and that you have associated with an EC2 instance, network interface, or AWS resource. • Associated BYOIP: Public IPv4 addresses you have brought to AWS using BYOIP that you have associated with a network interface. • Unassociated Amazon-owned EIPs: Elastic IP addresses that you have provisioned in your AWS account but you have not associated with a network interface. • Unassociated BYOIP: Public IPv4 addresses you have brought to AWS using BYOIP but you have not associated with a network interface. • Associated Amazon-owned contiguous EIPs: Elastic IP addresses allocated from an Amazon- provided contiguous public IPv4 IPAM pool and associated with a resource. • Unassociated Amazon-owned contiguous EIPs: Elastic IP addresses allocated from an Amazon-provided contiguous public IPv4 IPAM pool and unassociated with a resource. • Amazon-owned IPv4 contiguous IPs usage: A table that shows contiguous public IPv4 address usage over time and related Amazon-owned IPv4 IPAM pools. • Public IP addresses: A table of public IPv4 addresses and their attributes. • IP address: The public IPv4 address. • Associated: Whether or not the address is associated with
vpc-ipam-043
vpc-ipam.pdf
43
network interface. • Associated Amazon-owned contiguous EIPs: Elastic IP addresses allocated from an Amazon- provided contiguous public IPv4 IPAM pool and associated with a resource. • Unassociated Amazon-owned contiguous EIPs: Elastic IP addresses allocated from an Amazon-provided contiguous public IPv4 IPAM pool and unassociated with a resource. • Amazon-owned IPv4 contiguous IPs usage: A table that shows contiguous public IPv4 address usage over time and related Amazon-owned IPv4 IPAM pools. • Public IP addresses: A table of public IPv4 addresses and their attributes. • IP address: The public IPv4 address. • Associated: Whether or not the address is associated with an EC2 instance, network interface, or AWS resource. • Associated: The public IPv4 address is associated with an EC2 instance, network interface, or AWS resource. • Unassociated: The public IPv4 address is not associated to any resource and is idle in your AWS account. • Address type: The IP address type. • Amazon-owned EIP: The public IPv4 address is an Elastic IP address. • BYOIP: The public IPv4 address was brought to AWS using BYOIP. • EC2 public IP: The public IPv4 address was assigned automatically to an EC2 instance. • Service managed BYOIP: The public IPv4 address was brought to AWS using Bring your own IP (BYOIP). View public IP insights 103 Amazon Virtual Private Cloud IP Address Manager • Service managed IP: The public IPv4 address was provisioned and is managed by an AWS service. • Service: The service that the IP address is associated with. • AGA: An AWS Global Accelerator. If a custom routing accelerator is used, its public IPs are not listed. To view these public IPs, see Viewing your custom routing accelerators. • Database Migration Service: An AWS Database Migration Service (DMS) replication instance. • Redshift: An Amazon Redshift cluster. • RDS: An Amazon Relational Database Service (RDS) instance. • Load balancer (EC2): An Application Load Balancer or a Network Load Balancer. • NAT gateway (VPC): An Amazon VPC public NAT gateway. • Site-to-Site VPN: An AWS Site-to-Site VPN virtual private gateway. • Other: Other service that is not currently identifiable. • Name (EIP ID): If this public IPv4 address is an Elastic IP address allocation, this is the name and ID of the EIP allocation. • Network interface ID: If this public IPv4 address is associated with a network interface, this is the ID of the network interface. • Instance ID: If this public IPv4 address is associated with an EC2 instance, this is the instance ID. • Security groups: If this public IPv4 address is associated with an EC2 instance, this is the name and ID of the security group assigned to the instance. • Public IPv4 pool: If this is an Elastic IP address from an IP address pool owned and managed by Amazon, the value is "-". If this is an Elastic IP address from an IP address range which you own and have brought to Amazon (using BYOIP), the value is the public IPv4 pool ID. • Network border group: If the IP address is advertised, this is the AWS Region from which the IP address is advertised. • Owner ID:The AWS account number of resource owner. • Sample time: The last successful resource discovery time. • Resource discovery ID: ID of the resource discovery that has discovered this public IPv4 address. • Service resource: Resource ARN or ID. View public IP insights 104 Amazon Virtual Private Cloud IP Address Manager If an Elastic IP address is allocated to your account but is not associated with a network interface, a banner appears informing you that you have unassociated EIPs in your account and you should release them. Important Public IP insights was recently updated. If you see an error related to not having permissions to call GetIpamDiscoveredPublicAddresses, the managed permission attached to a resource discovery that was shared with you needs to be updated. Contact the person who created the resource discovery and ask them to update the managed permission AWSRAMPermissionIpamResourceDiscovery to the default version. For more information, see Update a resource share in the AWS RAM User Guide . AWS Management Console To view public IP address insights 1. Open the IPAM console at https://console.aws.amazon.com/ipam/. 2. 3. In the navigation pane, choose Public IP insights. To view details for a public IP address, select an IP address by clicking on it. 4. View the following information about the IP address: • Details: The same information visible in the columns of the main Public IP insights pane, such as the Address type and Service. • Inbound security group rules: If this IP address is associated with an EC2 instance, these are the security group rules that control the inbound traffic to the instance. • Outbound security group rules: If this IP address is associated with an EC2 instance, these
vpc-ipam-044
vpc-ipam.pdf
44
the navigation pane, choose Public IP insights. To view details for a public IP address, select an IP address by clicking on it. 4. View the following information about the IP address: • Details: The same information visible in the columns of the main Public IP insights pane, such as the Address type and Service. • Inbound security group rules: If this IP address is associated with an EC2 instance, these are the security group rules that control the inbound traffic to the instance. • Outbound security group rules: If this IP address is associated with an EC2 instance, these are the security group rules that control the outbound traffic from the instance. • Tags: Key and value pairs that act as metadata for organizing your AWS resources. Command line Use the following command to get the public IP addresses that have been discovered by IPAM: get-ipam-discovered-public-addresses View public IP insights 105 Amazon Virtual Private Cloud IP Address Manager Tutorials for Amazon VPC IP Address Manager The following tutorials show you how to perform common IPAM tasks using the AWS CLI. To get the AWS CLI, see Access IPAM. For more information about the IPAM concepts that are mentioned in these tutorials, see How IPAM works. Contents • Tutorial: Create an IPAM and pools using the console • Tutorial: Create an IPAM and pools using the AWS CLI • Tutorial: View IP address history using the AWS CLI • Tutorial: Bring your ASN to IPAM • Tutorial: Bring your IP addresses to IPAM • Tutorial: Transfer a BYOIP IPv4 CIDR to IPAM • Tutorial: Plan VPC IP address space for subnet IP allocations • Allocate sequential Elastic IP addresses from an IPAM pool Tutorial: Create an IPAM and pools using the console In this tutorial, you create an IPAM, integrate with AWS Organizations, create IP address pools, and create a VPC with a CIDR from an IPAM pool. This tutorial shows you how you can use IPAM to organize IP address space based on different development needs. Once you’ve completed this tutorial, you’ll have one IP address pool for pre- production resources. You can then create other pools based on your routing and security needs, such as a pool for production resources. While you can use IPAM as a single user, integrating with AWS Organizations enables you to manage IP addresses across accounts in your organization. This tutorial covers integrating IPAM with accounts in an organization. It does not cover how to Integrate IPAM with accounts outside of your organization. Note For the purposes of this tutorial, the instructions will tell you to name IPAM resources in a particular way, create IPAM resources in specific Regions, and use specific IP address CIDR Create an IPAM and pools using the console 106 Amazon Virtual Private Cloud IP Address Manager ranges for your pools. This is intended to streamline the choices available in IPAM and get you started with IPAM quickly. Once you’ve completed this tutorial, you may decide to create a new IPAM and configure it differently. Contents • Prerequisites • How AWS Organizations integrates with IPAM • Step 1: Delegate an IPAM administrator • Step 2: Create an IPAM • Step 3: Create a top-level IPAM pool • Step 4: Create Regional IPAM pools • Step 5: Create a pre-production development pool • Step 6: Share the IPAM pool • Step 7: Create a VPC with a CIDR allocated from an IPAM pool • Step 8: Cleanup Prerequisites Before you begin, you must have set up an AWS Organizations account with at least one member account. For how-to instructions, see Creating and managing an organization in the AWS Organizations User Guide. How AWS Organizations integrates with IPAM This section shows an example of the AWS Organizations accounts you use in this tutorial. There are three accounts in your organization that you use when you integrate with IPAM in this tutorial: • The management account (called example-management-account in the following image) to log into the IPAM console and delegate an IPAM admin. You cannot use the organization’s management account as your IPAM admin. • A member account (called example-member-account-1 in the following image) as the IPAM admin account. The IPAM admin account is responsible for creating an IPAM and using it to manage and monitor IP address usage across the organization. Any member account in your organization can be delegated as the IPAM admin. Prerequisites 107 Amazon Virtual Private Cloud IP Address Manager • A member account (called example-member-account-2 in the following above) as the developer account. This account creates a VPC with a CIDR allocated from an IPAM pool. In addition to the accounts, you’ll need the ID of the organizational unit (ou-fssg-q5brfv9c in the preceding image) that contains the member account you’ll use as the developer account. You need
vpc-ipam-045
vpc-ipam.pdf
45
account is responsible for creating an IPAM and using it to manage and monitor IP address usage across the organization. Any member account in your organization can be delegated as the IPAM admin. Prerequisites 107 Amazon Virtual Private Cloud IP Address Manager • A member account (called example-member-account-2 in the following above) as the developer account. This account creates a VPC with a CIDR allocated from an IPAM pool. In addition to the accounts, you’ll need the ID of the organizational unit (ou-fssg-q5brfv9c in the preceding image) that contains the member account you’ll use as the developer account. You need this ID so that, in a later step, when you share your IPAM pool, you can share it with this OU. Note For more information about AWS Organizations account types like management and member accounts, see AWS Organizations terminology and concepts. Step 1: Delegate an IPAM administrator In this step, you’ll delegate an AWS Organizations member account as the IPAM admin. When you delegate an IPAM admin, a service-linked role is automatically created in each of your AWS Organizations member accounts. IPAM monitors the IP address usage in these accounts by Step 1: Delegate an IPAM administrator 108 Amazon Virtual Private Cloud IP Address Manager assuming the service-linked role in each member account. It can then discover the resources and their CIDRs regardless of their Organizational Unit. You cannot complete this step unless you have the required AWS Identity and Access Management (IAM) permissions. For more information, see Integrate IPAM with accounts in an AWS Organization. To delegate an IPAM admin account 1. Using the AWS Organizations management account, open the IPAM console at https:// console.aws.amazon.com/ipam/. 2. In the AWS Management Console, choose the AWS Region in which you want to work with IPAM. 3. In the navigation pane, choose Organization settings. 4. Choose Delegate. The Delegate option is available only if you logged in to the console as the AWS Organizations management account. 5. Enter the AWS account ID for an organization member account. The IPAM administrator must be an AWS Organizations member account, not the management account. 6. Choose Save changes. The Delegated administrator information is populated with details related to the member account. Step 1: Delegate an IPAM administrator 109 Amazon Virtual Private Cloud IP Address Manager Step 2: Create an IPAM In this step you’ll create an IPAM. When you create an IPAM, IPAM automatically creates two scopes for the IPAM: the private scope that’s intended for all private space, and the public scope that’s intended for all public space. The scopes, together with pools and allocations, are key components of your IPAM. For more information, see How IPAM works. To create an IPAM 1. Using the AWS Organizations member account delegated as the IPAM admin in the previous step, open the IPAM console at https://console.aws.amazon.com/ipam/. 2. In the AWS Management Console, choose the AWS Region in which you want to create the IPAM. Create the IPAM in your main Region of operations. 3. On the service home page, choose Create IPAM. 4. Select Allow Amazon VPC IP Address Manager to replicate data from source account(s) into the IPAM delegate account. If you do not select this option, you cannot create an IPAM. 5. Under Operating Regions, choose the AWS Regions in which this IPAM can manage and discover resources. The AWS Region in which you are creating your IPAM is automatically selected as one of the operating Regions. In this tutorial, the home Region of our IPAM is us- east-1, so we’ll choose us-west-1 and us-west-2 as additional operating Regions. If you forget an operating Region, you can edit your IPAM settings later and add or remove Regions. Step 2: Create an IPAM 110 Amazon Virtual Private Cloud IP Address Manager 6. Choose Create IPAM. Step 2: Create an IPAM 111 Amazon Virtual Private Cloud IP Address Manager Step 3: Create a top-level IPAM pool In this tutorial, you create a hierarchy of pools starting with the top-level IPAM pool. In the subsequent steps, you’ll create a pair of Regional pools and a pre-production development pool in one of the regional pools. For more information about pool hierarchies that you can build with IPAM, see Example IPAM pool plans. To create a top-level pool 1. Using the IPAM admin account, open the IPAM console at https://console.aws.amazon.com/ ipam/. Step 3: Create a top-level IPAM pool 112 Amazon Virtual Private Cloud IP Address Manager 2. In the navigation pane, choose Pools. 3. Choose the private scope. 4. Choose Create pool. 5. Under IPAM scope, leave the private scope selected. 6. (Optional) Add a Name tag for the pool and a description for the pool, such as “Global pool”. 7. Under Source, choose IPAM scope. Because this is our top level pool, it will not have a source
vpc-ipam-046
vpc-ipam.pdf
46
Example IPAM pool plans. To create a top-level pool 1. Using the IPAM admin account, open the IPAM console at https://console.aws.amazon.com/ ipam/. Step 3: Create a top-level IPAM pool 112 Amazon Virtual Private Cloud IP Address Manager 2. In the navigation pane, choose Pools. 3. Choose the private scope. 4. Choose Create pool. 5. Under IPAM scope, leave the private scope selected. 6. (Optional) Add a Name tag for the pool and a description for the pool, such as “Global pool”. 7. Under Source, choose IPAM scope. Because this is our top level pool, it will not have a source pool. 8. Under Address family, choose IPv4. 9. Under Resource planning, leave Plan IP space within the scope selected. For more information about using this option to plan for subnet IP space within a VPC, see Tutorial: Plan VPC IP address space for subnet IP allocations. 10. For the Locale, choose None. Locales are the AWS Regions where you want this IPAM pool to be available for allocations. You’ll set the locale for the Regional pools that you create in the next section of this tutorial. Step 3: Create a top-level IPAM pool 113 Amazon Virtual Private Cloud IP Address Manager 11. Choose a CIDR to provision for the pool. In this example, we provision 10.0.0.0/16. Step 3: Create a top-level IPAM pool 114 Amazon Virtual Private Cloud IP Address Manager 12. Leave Configure this pool’s allocation rule settings disabled. This is our top-level pool, and you will not be allocating CIDRs to VPCs directly from this pool. Instead, you will allocate them from a sub-pool that you create from this pool. 13. Choose Create pool. The pool is created and the CIDR is in a Pending-provision state: Step 3: Create a top-level IPAM pool 115 Amazon Virtual Private Cloud IP Address Manager 14. Wait for the state to be Provisioned before you go to the next step. Step 3: Create a top-level IPAM pool 116 Amazon Virtual Private Cloud IP Address Manager Now that you have created your top-level pool, you’ll create Regional pools in us-west-1 and us- west-2. Step 4: Create Regional IPAM pools This section shows you how to organize your IP addresses using two Regional pools. In this tutorial, we’re following one of the example IPAM pool plans and creating two Regional pools which can be used by the member accounts in your organization for allocating CIDRs to their VPCs. To create a Regional pool 1. Using the IPAM admin account, open the IPAM console at https://console.aws.amazon.com/ ipam/. 2. In the navigation pane, choose Pools. Step 4: Create Regional IPAM pools 117 Amazon Virtual Private Cloud 3. Choose the private scope. IP Address Manager 4. Choose Create pool. 5. Under IPAM scope, leave the private scope selected. 6. (Optional) Add a Name tag for the pool and a description for the pool, such as Regional pool us-west-1. 7. Under Source, select IPAM pool and select the top-level pool (“Global pool”) that you created in Step 3: Create a top-level IPAM pool. Then, under Locale, choose us-west-1. Step 4: Create Regional IPAM pools 118 Amazon Virtual Private Cloud IP Address Manager 8. Under Resource planning, leave Plan IP space within the scope selected. For more information about using this option to plan for subnet IP space within a VPC, see Tutorial: Plan VPC IP address space for subnet IP allocations. 9. Under CIDRs to provision, enter 10.0.0.0/18, which will give this pool around 16,000 available IP addresses. Step 4: Create Regional IPAM pools 119 Amazon Virtual Private Cloud IP Address Manager 10. Leave Configure this pool’s allocation rule settings disabled. You will not be allocating CIDRs to VPCs directly from this pool. Instead, you will allocate them from a sub-pool that you create from this pool. 11. Choose Create pool. 12. Return to the Pools view to see the hierarchy of IPAM pools that you’ve created. Step 4: Create Regional IPAM pools 120 Amazon Virtual Private Cloud IP Address Manager 13. Repeat the steps in this section and create a second Regional pool in us-west-2 locale with the CIDR 10.0.64.0/18 provisioned to it. When you complete that process, you’ll have three pools in a hierarchy similar to this one: Step 5: Create a pre-production development pool Follow the steps in this section to create a development pool for pre-production resources within one of your Regional pools. To create a pre-production development pool 1. In the same way that you did in the previous section, using the IPAM admin account, create a pool called Pre-prod pool, but this time use Regional pool us-west-1 as the source pool. Step 5: Create a pre-production development pool 121 Amazon Virtual Private Cloud IP Address Manager 2. Specify a CIDR of 10.0.0.0/20 to provision, which will give this pool around 4,000 IP
vpc-ipam-047
vpc-ipam.pdf
47
this one: Step 5: Create a pre-production development pool Follow the steps in this section to create a development pool for pre-production resources within one of your Regional pools. To create a pre-production development pool 1. In the same way that you did in the previous section, using the IPAM admin account, create a pool called Pre-prod pool, but this time use Regional pool us-west-1 as the source pool. Step 5: Create a pre-production development pool 121 Amazon Virtual Private Cloud IP Address Manager 2. Specify a CIDR of 10.0.0.0/20 to provision, which will give this pool around 4,000 IP addresses. Step 5: Create a pre-production development pool 122 Amazon Virtual Private Cloud IP Address Manager 3. Toggle the option for Configure this pool's allocation rule settings. Do the following: 1. Under CIDR management, for Automatically import discovered resources, leave the default Don't allow option selected. This option would enable IPAM to automatically import resource CIDRs it discovers in the pool's locale. A detailed description of this option is outside the scope of this tutorial, but you can read more about the option in Create a top- level IPv4 pool. 2. Under Netmask compliancy, choose /24 for the minimum, default, and maximum netmask length. A detailed description of this option is outside the scope of this tutorial, but you can read more about the option in Create a top-level IPv4 pool. What’s important to note is that the VPC that you create later with a CIDR from this pool will be limited to /24 based on what we set here. 3. Under Tag compliance, enter environment/pre-prod. This tag will be required for VPCs to allocate space from the pool. We will demonstrate later how this works. Step 5: Create a pre-production development pool 123 Amazon Virtual Private Cloud IP Address Manager 4. Choose Create pool. Step 5: Create a pre-production development pool 124 Amazon Virtual Private Cloud IP Address Manager 5. The pool hierarchy now includes an additional subpool under Regional pool us-west-1: Now you’re ready to share the IPAM pool with another member account in your organization and enable that account to allocate a CIDR from the pool to create a VPC. Step 6: Share the IPAM pool Follow the steps in this section to share the pre-production IPAM pool using AWS Resource Access Manager (RAM). This section consists of two subsections: • Step 6.1. Enable resource sharing in AWS RAM: This step must be done by the AWS Organizations management account. • Step 6.2. Share an IPAM pool using AWS RAM: This step must be done by the IPAM admin. Step 6.1. Enable resource sharing in AWS RAM After you create your IPAM, you’ll want to share IP address pools with other accounts in your organization. Before you share an IPAM pool, complete the steps in this section to enable resource sharing with AWS RAM. Step 6: Share the IPAM pool 125 Amazon Virtual Private Cloud To enable resource sharing IP Address Manager 1. Using the AWS Organizations management account, open the AWS RAM console at https:// console.aws.amazon.com/ram/. 2. In the left navigation pane, choose Settings, choose Enable sharing with AWS Organizations, and then choose Save settings. You can now share an IPAM pool with other members of the organization. Step 6.2. Share an IPAM pool using AWS RAM In this section you’ll share the pre-production development pool with another AWS Organizations member account. For complete instructions on sharing IPAM pools, including information on the required IAM permissions, see Share an IPAM pool using AWS RAM. To share an IPAM pool using AWS RAM 1. Using the IPAM admin account, open the IPAM console at https://console.aws.amazon.com/ ipam/. 2. In the navigation pane, choose Pools. 3. Choose the private scope, choose the pre-production IPAM pool, and choose Actions > View details. Step 6: Share the IPAM pool 126 Amazon Virtual Private Cloud IP Address Manager 4. Under Resource sharing, choose Create resource share. The AWS RAM console opens. You'll share the pool using AWS RAM. 5. Choose Create a resource share. The AWS RAM console opens. 6. In the AWS RAM console, choose Create a resource share again. 7. Add a Name for the shared pool. 8. Under Select resource type, choose IPAM pools, and then choose the ARN of the pre- production development pool. Step 6: Share the IPAM pool 127 Amazon Virtual Private Cloud IP Address Manager 9. Choose Next. 10. Leave the default AWSRAMDefaultPermissionsIpamPool permission selected. The details of the permission options are out of scope for this tutorial, but you can find out more about these options in Share an IPAM pool using AWS RAM. Step 6: Share the IPAM pool 128 Amazon Virtual Private Cloud IP Address Manager 11. Choose Next. 12. Under Principals, choose Allow sharing only within your organization. Enter your AWS
vpc-ipam-048
vpc-ipam.pdf
48
resource type, choose IPAM pools, and then choose the ARN of the pre- production development pool. Step 6: Share the IPAM pool 127 Amazon Virtual Private Cloud IP Address Manager 9. Choose Next. 10. Leave the default AWSRAMDefaultPermissionsIpamPool permission selected. The details of the permission options are out of scope for this tutorial, but you can find out more about these options in Share an IPAM pool using AWS RAM. Step 6: Share the IPAM pool 128 Amazon Virtual Private Cloud IP Address Manager 11. Choose Next. 12. Under Principals, choose Allow sharing only within your organization. Enter your AWS Organizations organization unit ID (as mentioned in How AWS Organizations integrates with IPAM, and then choose Add . Step 6: Share the IPAM pool 129 Amazon Virtual Private Cloud IP Address Manager 13. Choose Next. 14. Review the resource share options and the principals that you’ll be sharing with, and then choose Create. Now that the pool has been shared, go to the next step to create a VPC with a CIDR allocated from an IPAM pool. Step 7: Create a VPC with a CIDR allocated from an IPAM pool Follow the steps in this section to create a VPC with a CIDR allocated from the pre-production pool. This step should be completed by the member account in the OU that the IPAM pool was shared Step 7: Create a VPC with a CIDR allocated from an IPAM pool 130 Amazon Virtual Private Cloud IP Address Manager with in the previous section (called example-member-account-2 in How AWS Organizations integrates with IPAM). For more information about the IAM permissions that are required to create VPCs, see Amazon VPC policy examples in the Amazon VPC User Guide. To create a VPC with a CIDR allocated from an IPAM pool 1. Using the member account, open the VPC console at https://console.aws.amazon.com/vpc/ as the member account that you'll use as the developer account. 2. Choose Create VPC. 3. Do the following: 1. Enter a name, such as Example VPC. 2. Choose IPAM-allocated IPv4 CIDR block. 3. Under IPv4 IPAM pool, choose the ID of the pre-production pool. 4. Choose a Netmask length. Because you limited the available netmask length for this pool to /24 (in Step 5: Create a pre-production development pool), the only netmask option available is /24. Step 7: Create a VPC with a CIDR allocated from an IPAM pool 131 Amazon Virtual Private Cloud IP Address Manager 4. For demonstration purposes, under Tags, do not add any additional tags at this time. When you created the pre-prod pool (in Step 5: Create a pre-production development pool), you added an allocation rule that required any VPCs that are created with CIDRs from this pool to have an environment/pre-prod tag. Leave the environment/pre-prod tag off for now so that you can see that an error appears telling you that a required tag was not added. 5. Choose Create VPC. 6. An error appears telling you that a required tag was not added. The error appears because you set an allocation rule when you created the pre-prod pool (in Step 5: Create a pre-production development pool). The allocation rule required any VPCs that are created with CIDRs from this pool to have an environment/pre-prod tag. Step 7: Create a VPC with a CIDR allocated from an IPAM pool 132 Amazon Virtual Private Cloud IP Address Manager 7. Now, under Tags, add the tag environment/pre-prod and choose Create VPC again. 8. The VPC is created successfully, and the VPC complies with the tag rule on the pre-production pool: Step 7: Create a VPC with a CIDR allocated from an IPAM pool 133 Amazon Virtual Private Cloud IP Address Manager In the Resources pane of the IPAM console, the IPAM admin will be able to see and manage the VPC and its allocated CIDR. Note that it takes some time for the VPC to appear in the Resources pane. Step 8: Cleanup In this tutorial, you created an IPAM with a delegated admin, created multiple pools, and enabled a member account in your organization to allocate a VPC CIDR from a pool. Follow the steps in this section to clean up the resources that you created in this tutorial. To cleanup the resources created in this tutorial 1. Using the member account that created the example VPC, delete the VPC. For detailed instructions, see Delete your VPC in the Amazon Virtual Private Cloud User Guide. Step 8: Cleanup 134 Amazon Virtual Private Cloud IP Address Manager 2. Using the IPAM admin account, delete the example resource share in the AWS RAM console. For detailed instructions, see Deleting a resource share in AWSAWS RAM in the AWS Resource Access Manager User Guide. 3. Using the IPAM admin account, log into the RAM console and disable sharing with
vpc-ipam-049
vpc-ipam.pdf
49
in this tutorial. To cleanup the resources created in this tutorial 1. Using the member account that created the example VPC, delete the VPC. For detailed instructions, see Delete your VPC in the Amazon Virtual Private Cloud User Guide. Step 8: Cleanup 134 Amazon Virtual Private Cloud IP Address Manager 2. Using the IPAM admin account, delete the example resource share in the AWS RAM console. For detailed instructions, see Deleting a resource share in AWSAWS RAM in the AWS Resource Access Manager User Guide. 3. Using the IPAM admin account, log into the RAM console and disable sharing with AWS Organizations that you enable in Step 6.1. Enable resource sharing in AWS RAM. 4. Using the IPAM admin account, delete the example IPAM by selecting the IPAM in the IPAM console and then choosing Actions > Delete. For detailed instructions, see Delete an IPAM. 5. When you’re prompted to delete the IPAM, choose Cascade delete. This will delete all scopes and pools within the IPAM before deleting the IPAM. 6. Enter delete and then choose Delete. 7. Using the AWS Organizations management account, log into the IPAM console, choose Settings, and remove the delegated administrator account. 8. (Optional) When you integrate IPAM with AWS Organizations, IPAM automatically creates a service-linked role in each member account. Using each AWS Organizations member account, log into IAM and delete the AWSServiceRoleForIPAM service linked role in each member account. 9. Cleanup is complete. Step 8: Cleanup 135 Amazon Virtual Private Cloud IP Address Manager Tutorial: Create an IPAM and pools using the AWS CLI Follow the steps in this tutorial to use the AWS CLI to create an IPAM, create IP address pools, and allocate a VPC with a CIDR from an IPAM pool. The following is an example hierarchy of the pool structure that you will create by following the steps in this section: • IPAM operating in AWS Region 1, AWS Region 2 • Private scope • Top-level pool • Regional pool in AWS Region 2 • Development pool • Allocation for a VPC Note In this section, you'll create an IPAM. By default, you can only create one IPAM. For more information, see Quotas for your IPAM. If you have already delegated an IPAM account and created an IPAM, you can skip steps 1 and 2. Contents • Step 1: Enable IPAM in your organization • Step 2: Create an IPAM • Step 3: Create an IPv4 address pool • Step 4: Provision a CIDR to the top-level pool • Step 5. Create a Regional pool with CIDR sourced from the top-level pool • Step 6: Provision a CIDR to the Regional pool • Step 7. Create a RAM share for enabling IP assignments across accounts • Step 8. Create a VPC • Step 9. Cleanup Create an IPAM and pools using the AWS CLI 136 Amazon Virtual Private Cloud IP Address Manager Step 1: Enable IPAM in your organization This step is optional. Complete this step to enable IPAM in your organization and configure your delegated IPAM using the AWS CLI. For more information about the role of the IPAM account, see Integrate IPAM with accounts in an AWS Organization. This request must be made from an AWS Organizations management account. When you run the following command, ensure that you’re using a role with an IAM policy that permits the following actions: • ec2:EnableIpamOrganizationAdminAccount • organizations:EnableAwsServiceAccess • organizations:RegisterDelegatedAdministrator • iam:CreateServiceLinkedRole aws ec2 enable-ipam-organization-admin-account --region us-east-1 --delegated-admin- account-id 11111111111 You should see the following output, indicating that enabling was successful. { "Success": true } Step 2: Create an IPAM Follow the steps in this section to create an IPAM and view additional information about the scopes that are created. You will use this IPAM when you create pools and provision IP address ranges for those pools in later steps. Note The operating Regions option determines which AWS Regions the IPAM pools can be used for. For more information about operating Regions, see Create an IPAM. Step 1: Enable IPAM in your organization 137 Amazon Virtual Private Cloud IP Address Manager To create an IPAM using the AWS CLI 1. Run the following command to create the IPAM instance. aws ec2 create-ipam --description my-ipam --region us-east-1 --operating- regions RegionName=us-west-2 When you create an IPAM, AWS automatically does the following: • Returns a globally unique resource ID (IpamId) for the IPAM. • Creates a default public scope (PublicDefaultScopeId) and a default private scope (PrivateDefaultScopeId). { "Ipam": { "OwnerId": "123456789012", "IpamId": "ipam-0de83dba6694560a9", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-0de83dba6694560a9", "PublicDefaultScopeId": "ipam-scope-02a24107598e982c5", "PrivateDefaultScopeId": "ipam-scope-065e7dfe880df679c", "ScopeCount": 2, "Description": "my-ipam", "OperatingRegions": [ { "RegionName": "us-west-2" }, { "RegionName": "us-east-1" } ], "Tags": [] } } 2. Run the following command to view additional information related to the scopes. The public scope is intended for IP addresses that are going to be
vpc-ipam-050
vpc-ipam.pdf
50
create-ipam --description my-ipam --region us-east-1 --operating- regions RegionName=us-west-2 When you create an IPAM, AWS automatically does the following: • Returns a globally unique resource ID (IpamId) for the IPAM. • Creates a default public scope (PublicDefaultScopeId) and a default private scope (PrivateDefaultScopeId). { "Ipam": { "OwnerId": "123456789012", "IpamId": "ipam-0de83dba6694560a9", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-0de83dba6694560a9", "PublicDefaultScopeId": "ipam-scope-02a24107598e982c5", "PrivateDefaultScopeId": "ipam-scope-065e7dfe880df679c", "ScopeCount": 2, "Description": "my-ipam", "OperatingRegions": [ { "RegionName": "us-west-2" }, { "RegionName": "us-east-1" } ], "Tags": [] } } 2. Run the following command to view additional information related to the scopes. The public scope is intended for IP addresses that are going to be accessed via public internet. The private scope is intended for IP addresses that are not going to be accessed via public internet. aws ec2 describe-ipam-scopes --region us-east-1 Step 2: Create an IPAM 138 Amazon Virtual Private Cloud IP Address Manager In the output, you see the available scopes. You'll use the private scope ID in the next step. { "IpamScopes": [ { "OwnerId": "123456789012", "IpamScopeId": "ipam-scope-02a24107598e982c5", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-02a24107598e982c5", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-0de83dba6694560a9", "IpamScopeType": "public", "IsDefault": true, "PoolCount": 0 }, { "OwnerId": "123456789012", "IpamScopeId": "ipam-scope-065e7dfe880df679c", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-065e7dfe880df679c", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-0de83dba6694560a9", "IpamScopeType": "private", "IsDefault": true, "PoolCount": 0 } ] } Step 3: Create an IPv4 address pool Follow the steps in this section to create an IPv4 address pool. Important You won't use the --locale option on this top-level pool. You will set the locale option later on the Regional pool. The locale is the AWS Region where you want a pool to be available for CIDR allocations. As a result of not setting the locale on the top-level pool, the locale will default to None. If a pool has a locale of None, the pool won't be available to VPC resources in any AWS Region. You can only manually allocate IP address space in the pool to reserve space. Step 3: Create an IPv4 address pool 139 Amazon Virtual Private Cloud IP Address Manager To create an IPv4 address pool for all of your AWS resources using the AWS CLI 1. Run the following command to create an IPv4 address pool. Use the ID of the private scope of the IPAM that you created in the previous step. aws ec2 create-ipam-pool --ipam-scope-id ipam-scope-065e7dfe880df679c -- description "top-level-pool" --address-family ipv4 In the output, you'll see a state of create-in-progress for the pool. { "IpamPool": { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0008f25d7187a08d9", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0008f25d7187a08d9", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-065e7dfe880df679c", "IpamScopeType": "private", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-0de83dba6694560a9", "Locale": "None", "PoolDepth": 1, "State": "create-in-progress", "Description": "top-level-pool", "AutoImport": false, "AddressFamily": "ipv4", "Tags": [] } } 2. Run the following command until you see a state of create-complete in the output. aws ec2 describe-ipam-pools The following example output shows the correct state. { "IpamPools": [ { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0008f25d7187a08d9", Step 3: Create an IPv4 address pool 140 Amazon Virtual Private Cloud IP Address Manager "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0008f25d7187a08d9", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-065e7dfe880df679c", "IpamScopeType": "private", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-0de83dba6694560a9", "Locale": "None", "PoolDepth": 1, "State": "create-complete", "Description": "top-level-pool", "AutoImport": false, "AddressFamily": "ipv4" } ] } Step 4: Provision a CIDR to the top-level pool Follow the steps in this section to provision a CIDR to the top-level pool, and then verify that the CIDR is provisioned. For more information, see Provision CIDRs to a pool. To provision a CIDR block to the pool using the AWS CLI 1. Run the following command to provision the CIDR. aws ec2 provision-ipam-pool-cidr --region us-east-1 --ipam-pool-id ipam- pool-0008f25d7187a08d9 --cidr 10.0.0.0/8 In the output, you can verify the state of the provisioning. { "IpamPoolCidr": { "Cidr": "10.0.0.0/8", "State": "pending-provision" } } 2. Run the following command until you see a state of provisioned in the output. Step 4: Provision a CIDR to the top-level pool 141 Amazon Virtual Private Cloud IP Address Manager aws ec2 get-ipam-pool-cidrs --region us-east-1 --ipam-pool-id ipam- pool-0008f25d7187a08d9 The following example output shows the correct state. { "IpamPoolCidrs": [ { "Cidr": "10.0.0.0/8", "State": "provisioned" } ] } Step 5. Create a Regional pool with CIDR sourced from the top-level pool When you create an IPAM pool, the pool belongs to the AWS Region of the IPAM by default. When you create a VPC, the pool that the VPC draws from must be in the same Region as the VPC. You can use the --locale option when you create a pool to make the pool available to services in a Region other than the Region of the IPAM. Follow the steps in this section to create a Regional pool in another locale. To create a pool with a CIDR sourced from the previous pool using the AWS CLI 1. Run the following command to create the pool and insert space with a known available CIDR from the previous pool. aws ec2 create-ipam-pool --description "regional--pool" --region us-east-1 --ipam- scope-id ipam-scope-065e7dfe880df679c --source-ipam-pool-id ipam-pool-0008f25d7187a08d9 --locale us-west-2 --address-family ipv4 In the output, you'll see the ID of
vpc-ipam-051
vpc-ipam.pdf
51
the --locale option when you create a pool to make the pool available to services in a Region other than the Region of the IPAM. Follow the steps in this section to create a Regional pool in another locale. To create a pool with a CIDR sourced from the previous pool using the AWS CLI 1. Run the following command to create the pool and insert space with a known available CIDR from the previous pool. aws ec2 create-ipam-pool --description "regional--pool" --region us-east-1 --ipam- scope-id ipam-scope-065e7dfe880df679c --source-ipam-pool-id ipam-pool-0008f25d7187a08d9 --locale us-west-2 --address-family ipv4 In the output, you'll see the ID of the pool that you created. You'll need this ID in the next step. { "IpamPool": { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0da89c821626f1e4b", Step 5. Create a Regional pool with CIDR sourced from the top-level pool 142 Amazon Virtual Private Cloud IP Address Manager "SourceIpamPoolId": "ipam-pool-0008f25d7187a08d9", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0da89c821626f1e4b", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-065e7dfe880df679c", "IpamScopeType": "private", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-0de83dba6694560a9", "Locale": "us-west-2", "PoolDepth": 2, "State": "create-in-progress", "Description": "regional--pool", "AutoImport": false, "AddressFamily": "ipv4", "Tags": [] } } 2. Run the following command until you see a state of create-complete in the output. aws ec2 describe-ipam-pools In the output, you see the pools that you have in your IPAM. In this tutorial, we created a top- level and a Regional pool, so you'll see them both. { "IpamPools": [ { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0008f25d7187a08d9", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0008f25d7187a08d9", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-065e7dfe880df679c", "IpamScopeType": "private", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-0de83dba6694560a9", "Locale": "None", "PoolDepth": 1, "State": "create-complete", "Description": "top-level-pool", "AutoImport": false, "AddressFamily": "ipv4" }, { Step 5. Create a Regional pool with CIDR sourced from the top-level pool 143 Amazon Virtual Private Cloud IP Address Manager "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0da89c821626f1e4b", "SourceIpamPoolId": "ipam-pool-0008f25d7187a08d9", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0da89c821626f1e4b", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-065e7dfe880df679c", "IpamScopeType": "private", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-0de83dba6694560a9", "Locale": "us-west-2", "PoolDepth": 2, "State": "create-complete", "Description": "regional--pool", "AutoImport": false, "AddressFamily": "ipv4" } ] } Step 6: Provision a CIDR to the Regional pool Follow the steps in this section to assign a CIDR block to the pool, and validate that it’s been successfully provisioned. To assign a CIDR block to the Regional pool using the AWS CLI 1. Run the following command to provision the CIDR. aws ec2 provision-ipam-pool-cidr --region us-east-1 --ipam-pool-id ipam- pool-0da89c821626f1e4b --cidr 10.0.0.0/16 In the output, you see the state of the pool. { "IpamPoolCidr": { "Cidr": "10.0.0.0/16", "State": "pending-provision" } } 2. Run the following command until you see the state of provisioned in the output. Step 6: Provision a CIDR to the Regional pool 144 Amazon Virtual Private Cloud IP Address Manager aws ec2 get-ipam-pool-cidrs --region us-east-1 --ipam-pool-id ipam- pool-0da89c821626f1e4b The following example output shows the correct state. { "IpamPoolCidrs": [ { "Cidr": "10.0.0.0/16", "State": "provisioned" } ] } 3. Run the following command to query the top-level pool to view the allocations. The Regional pool is considered an allocation within the top-level pool. aws ec2 get-ipam-pool-allocations --region us-east-1 --ipam-pool-id ipam- pool-0008f25d7187a08d9 In the output, you see the Regional pool as an allocation in the top-level pool. { "IpamPoolAllocations": [ { "Cidr": "10.0.0.0/16", "IpamPoolAllocationId": "ipam-pool-alloc- fbd525f6c2bf4e77a75690fc2d93479a", "ResourceId": "ipam-pool-0da89c821626f1e4b", "ResourceType": "ipam-pool", "ResourceOwner": "123456789012" } ] } Step 7. Create a RAM share for enabling IP assignments across accounts This step is optional. You can complete this step only if you completed Integrate IPAM with accounts in an AWS Organization. Step 7. Create a RAM share for enabling IP assignments across accounts 145 Amazon Virtual Private Cloud IP Address Manager When you create an IPAM pool AWS RAM share, it enables IP assignments across accounts. RAM sharing is only available in your home AWS Region. Note that you create this share in the same Region as the IPAM, not in the local Region for the pool. All administrative operations on IPAM resources are made through the home Region of your IPAM. The example in this tutorial creates a single share for a single pool, but you can add multiple pools to a single share. For more information, including an explanation of the options that you must enter, see Share an IPAM pool using AWS RAM. Run the following command to create a resource share. aws ram create-resource-share --region us-east-1 --name pool_share --resource- arns arn:aws:ec2::123456789012:ipam-pool/ipam-pool-0dec9695bca83e606 -- principals 123456 The output shows that the pool was created. { "resourceShare": { "resourceShareArn": "arn:aws:ram:us-west-2:123456789012:resource- share/3ab63985-99d9-1cd2-7d24-75e93EXAMPLE", "name": "pool_share", "owningAccountId": "123456789012", "allowExternalPrincipals": false, "status": "ACTIVE", "creationTime": 1565295733.282, "lastUpdatedTime": 1565295733.282 } } Step 8. Create a VPC Run the following command to create a VPC and assign a CIDR block to the VPC from the pool in your newly created IPAM. aws ec2 create-vpc --region us-east-1 --ipv4-ipam-pool-id ipam-pool-04111dca0d960186e --cidr-block 10.0.0.0/24 The output shows that the VPC was created. { "Vpc": { Step 8. Create a VPC 146 Amazon Virtual Private Cloud IP Address Manager "CidrBlock": "10.0.0.0/24", "DhcpOptionsId": "dopt-19edf471", "State": "pending", "VpcId": "vpc-0983f3c454f3d8be5", "OwnerId": "123456789012", "InstanceTenancy": "default", "Ipv6CidrBlockAssociationSet": [], "CidrBlockAssociationSet": [ { "AssociationId": "vpc-cidr-assoc-00b24cc1c2EXAMPLE", "CidrBlock": "10.0.0.0/24", "CidrBlockState": {
vpc-ipam-052
vpc-ipam.pdf
52
share/3ab63985-99d9-1cd2-7d24-75e93EXAMPLE", "name": "pool_share", "owningAccountId": "123456789012", "allowExternalPrincipals": false, "status": "ACTIVE", "creationTime": 1565295733.282, "lastUpdatedTime": 1565295733.282 } } Step 8. Create a VPC Run the following command to create a VPC and assign a CIDR block to the VPC from the pool in your newly created IPAM. aws ec2 create-vpc --region us-east-1 --ipv4-ipam-pool-id ipam-pool-04111dca0d960186e --cidr-block 10.0.0.0/24 The output shows that the VPC was created. { "Vpc": { Step 8. Create a VPC 146 Amazon Virtual Private Cloud IP Address Manager "CidrBlock": "10.0.0.0/24", "DhcpOptionsId": "dopt-19edf471", "State": "pending", "VpcId": "vpc-0983f3c454f3d8be5", "OwnerId": "123456789012", "InstanceTenancy": "default", "Ipv6CidrBlockAssociationSet": [], "CidrBlockAssociationSet": [ { "AssociationId": "vpc-cidr-assoc-00b24cc1c2EXAMPLE", "CidrBlock": "10.0.0.0/24", "CidrBlockState": { "State": "associated" } } ], "IsDefault": false } } Step 9. Cleanup Follow the steps in this section to delete the IPAM resources you've created in this tutorial. 1. Delete the VPC. aws ec2 delete-vpc --vpc-id vpc-0983f3c454f3d8be5 2. Delete the IPAM pool RAM share. aws ram delete-resource-share --resource-share-arn arn:aws:ram:us- west-2:123456789012:resource-share/3ab63985-99d9-1cd2-7d24-75e93EXAMPLE 3. Deprovision pool CIDR from the Regional pool. aws ec2 deprovision-ipam-pool-cidr --ipam-pool-id ipam-pool-0da89c821626f1e4b -- region us-east-1 4. Deprovision pool CIDR from the top-level pool. aws ec2 deprovision-ipam-pool-cidr --ipam-pool-id ipam-pool-0008f25d7187a08d9 -- region us-east-1 Step 9. Cleanup 147 Amazon Virtual Private Cloud 5. Delete the IPAM aws ec2 delete-ipam --region us-east-1 IP Address Manager Tutorial: View IP address history using the AWS CLI The scenarios in this section show you how to analyze and audit IP address usage using the AWS CLI. For general information about using the AWS CLI, see Using the AWS CLI in the AWS Command Line Interface User Guide. Contents • Overview • Scenarios Overview IPAM automatically retains your IP address monitoring data for up to three years. You can use the historical data to analyze and audit your network security and routing policies. You can search for historical insights for the following types of resources: • VPCs • VPC subnets • Elastic IP addresses • EC2 instances that are running • EC2 network interfaces attached to instances Important Although IPAM doesn't monitor Amazon EC2 instances or EC2 network interfaces attached to instances, you can use the Search IP history feature to search for historical data on EC2 instance and network interface CIDRs. View IP address history using the AWS CLI 148 Amazon Virtual Private Cloud IP Address Manager Note • The commands in this tutorial must be run using the account that owns the IPAM and the AWS Region that hosts the IPAM. • Records of changes to CIDRs are picked up in periodic snapshots, which means that it can take some time for records to appear or be updated, and the values for SampledStartTime and SampledEndTime can differ from the actual times they occurred. Scenarios The scenarios in this section show you how to analyze and audit IP address usage using the AWS CLI. For more information about the values mentioned in this tutorial like sampled end time and start time, see View IP address history. Scenario 1: Which resources were associated with 10.2.1.155/32 between 1:00 AM and 9:00 PM on December 27, 2021 (UTC)? 1. Run the following command: aws ec2 get-ipam-address-history --region us-east-1 --cidr 10.2.1.155/32 --ipam- scope-id ipam-scope-05b579a1909c5fc7a --start-time 2021-12-20T01:00:00.000Z --end- time 2021-12-27T21:00:00.000Z 2. View the results of the analysis. In the example below, the CIDR was allocated to a network interface and EC2 instance over the course of the time period. Note that no SampledEndTime value means the record is still active. For more information about the values shown in the following output, see View IP address history. { "HistoryRecords": [ { "ResourceOwnerId": "123456789012", "ResourceRegion": "us-east-1", "ResourceType": "network-interface", "ResourceId": "eni-0b4e53eb1733aba16", "ResourceCidr": "10.2.1.155/32", "VpcId": "vpc-0f5ee7e1ba908a378", "SampledStartTime": "2021-12-27T20:08:46.672000+00:00" Scenarios 149 IP Address Manager Amazon Virtual Private Cloud }, { "ResourceOwnerId": "123456789012", "ResourceRegion": "us-east-1", "ResourceType": "instance", "ResourceId": "i-064da1f79baed14f3", "ResourceCidr": "10.2.1.155/32", "VpcId": "vpc-0f5ee7e1ba908a378", "SampledStartTime": "2021-12-27T20:08:46.672000+00:00" } ] } If the owner ID of the instance to which a network interface is attached differs from the owner ID of the network interface (as is the case for NAT gateways, Lambda network interfaces in VPCs, and other AWS services), the ResourceOwnerId is amazon-aws rather than the account ID of the owner of the network interface. The following example shows the record for a CIDR associated with a NAT gateway: { "HistoryRecords": [ { "ResourceOwnerId": "123456789012", "ResourceRegion": "us-east-1", "ResourceType": "network-interface", "ResourceId": "eni-0b4e53eb1733aba16", "ResourceCidr": "10.0.0.176/32", "VpcId": "vpc-0f5ee7e1ba908a378", "SampledStartTime": "2021-12-27T20:08:46.672000+00:00" }, { "ResourceOwnerId": "amazon-aws", "ResourceRegion": "us-east-1", "ResourceType": "instance", "ResourceCidr": "10.0.0.176/32", "VpcId": "vpc-0f5ee7e1ba908a378", "SampledStartTime": "2021-12-27T20:08:46.672000+00:00" } ] } Scenarios 150 Amazon Virtual Private Cloud IP Address Manager Scenario 2: Which resources were associated with 10.2.1.0/24 from December 1, 2021 to December 27, 2021 (UTC)? 1. Run the following command: aws ec2 get-ipam-address-history --region us-east-1 --cidr 10.2.1.0/24 --ipam- scope-id ipam-scope-05b579a1909c5fc7a --start-time 2021-12-01T00:00:00.000Z --end- time 2021-12-27T23:59:59.000Z 2. View the results of the analysis. In the example below, the CIDR was allocated to a subnet and VPC over the course of the time period. Note that
vpc-ipam-053
vpc-ipam.pdf
53
"ResourceId": "eni-0b4e53eb1733aba16", "ResourceCidr": "10.0.0.176/32", "VpcId": "vpc-0f5ee7e1ba908a378", "SampledStartTime": "2021-12-27T20:08:46.672000+00:00" }, { "ResourceOwnerId": "amazon-aws", "ResourceRegion": "us-east-1", "ResourceType": "instance", "ResourceCidr": "10.0.0.176/32", "VpcId": "vpc-0f5ee7e1ba908a378", "SampledStartTime": "2021-12-27T20:08:46.672000+00:00" } ] } Scenarios 150 Amazon Virtual Private Cloud IP Address Manager Scenario 2: Which resources were associated with 10.2.1.0/24 from December 1, 2021 to December 27, 2021 (UTC)? 1. Run the following command: aws ec2 get-ipam-address-history --region us-east-1 --cidr 10.2.1.0/24 --ipam- scope-id ipam-scope-05b579a1909c5fc7a --start-time 2021-12-01T00:00:00.000Z --end- time 2021-12-27T23:59:59.000Z 2. View the results of the analysis. In the example below, the CIDR was allocated to a subnet and VPC over the course of the time period. Note that no SampledEndTime value means the record is still active. For more information about the values shown in the following output, see View IP address history. { "HistoryRecords": [ { "ResourceOwnerId": "123456789012", "ResourceRegion": "us-east-1", "ResourceType": "subnet", "ResourceId": "subnet-0864c82a42f5bffed", "ResourceCidr": "10.2.1.0/24", "VpcId": "vpc-0f5ee7e1ba908a378", "SampledStartTime": "2021-12-27T20:08:46.672000+00:00" }, { "ResourceOwnerId": "123456789012", "ResourceRegion": "us-east-1", "ResourceType": "vpc", "ResourceId": "vpc-0f5ee7e1ba908a378", "ResourceCidr": "10.2.1.0/24", "ResourceComplianceStatus": "compliant", "ResourceOverlapStatus": "nonoverlapping", "VpcId": "vpc-0f5ee7e1ba908a378", "SampledStartTime": "2021-12-27T20:08:46.672000+00:00" } ] } Scenarios 151 Amazon Virtual Private Cloud IP Address Manager Scenario 3: Which resources were associated with 2605:9cc0:409::/56 from December 1, 2021 to December 27, 2021 (UTC)? 1. Run the following command, where --region is the IPAM home Region: aws ec2 get-ipam-address-history --region us-east-1 --cidr 2605:9cc0:409::/56 -- ipam-scope-id ipam-scope-07cb485c8b4a4d7cc --start-time 2021-12-01T01:00:00.000Z -- end-time 2021-12-27T23:59:59.000Z 2. View the results of the analysis. In the example below, the CIDR was allocated to two different VPCs over the course of the time period in a Region outside the IPAM home Region. Note that no SampledEndTime value means the record is still active. For more information about the values shown in the following output, see View IP address history. { "HistoryRecords": [ { "ResourceOwnerId": "123456789012", "ResourceRegion": "us-east-2", "ResourceType": "vpc", "ResourceId": "vpc-01d967bf3b923f72c", "ResourceCidr": "2605:9cc0:409::/56", "ResourceName": "First example VPC", "ResourceComplianceStatus": "compliant", "ResourceOverlapStatus": "nonoverlapping", "VpcId": "vpc-01d967bf3b923f72c", "SampledStartTime": "2021-12-23T20:02:00.701000+00:00", "SampledEndTime": "2021-12-23T20:12:59.848000+00:00" }, { "ResourceOwnerId": "123456789012", "ResourceRegion": "us-east-2", "ResourceType": "vpc", "ResourceId": "vpc-03e62c7eca81cb652", "ResourceCidr": "2605:9cc0:409::/56", "ResourceName": "Second example VPC", "ResourceComplianceStatus": "compliant", "ResourceOverlapStatus": "nonoverlapping", "VpcId": "vpc-03e62c7eca81cb652", "SampledStartTime": "2021-12-27T15:11:00.046000+00:00" } ] Scenarios 152 Amazon Virtual Private Cloud } IP Address Manager Scenario 4: Which resources were associated with 10.0.0.0/24 in the last 24 hours (assuming the current time is midnight on December 27, 2021 (UTC))? 1. Run the following command: aws ec2 get-ipam-address-history --region us-east-1 --cidr 10.0.0.0/24 --ipam- scope-id ipam-scope-05b579a1909c5fc7a --start-time 2021-12-27T00:00:00.000Z 2. View the results of the analysis. In the example below, the CIDR has been allocated to numerous subnets and VPCs over the time period. Note that no SampledEndTime value means the record is still active. For more information about the values shown in the following output, see View IP address history. { "HistoryRecords": [ { "ResourceOwnerId": "123456789012", "ResourceRegion": "us-east-2", "ResourceType": "subnet", "ResourceId": "subnet-0d1b8f899725aa72d", "ResourceCidr": "10.0.0.0/24", "ResourceName": "Example name", "VpcId": "vpc-042b8a44f64267d67", "SampledStartTime": "2021-12-11T16:35:59.074000+00:00", "SampledEndTime": "2021-12-28T15:34:00.017000+00:00" }, { "ResourceOwnerId": "123456789012", "ResourceRegion": "us-east-2", "ResourceType": "vpc", "ResourceId": "vpc-09754dfd85911abec", "ResourceCidr": "10.0.0.0/24", "ResourceName": "Example name", "ResourceComplianceStatus": "unmanaged", "ResourceOverlapStatus": "overlapping", "VpcId": "vpc-09754dfd85911abec", "SampledStartTime": "2021-12-27T20:07:59.947000+00:00", "SampledEndTime": "2021-12-28T15:34:00.017000+00:00" }, Scenarios 153 Amazon Virtual Private Cloud { IP Address Manager "ResourceOwnerId": "123456789012", "ResourceRegion": "us-west-2", "ResourceType": "vpc", "ResourceId": "vpc-0a8347f594bea5901", "ResourceCidr": "10.0.0.0/24", "ResourceName": "Example name", "ResourceComplianceStatus": "unmanaged", "ResourceOverlapStatus": "overlapping", "VpcId": "vpc-0a8347f594bea5901", "SampledStartTime": "2021-12-11T16:35:59.318000+00:00" }, { "ResourceOwnerId": "123456789012", "ResourceRegion": "us-east-1", "ResourceType": "subnet", "ResourceId": "subnet-0af7eadb0798e9148", "ResourceCidr": "10.0.0.0/24", "ResourceName": "Example name", "VpcId": "vpc-03298ba16756a8736", "SampledStartTime": "2021-12-14T21:07:22.357000+00:00" } ] } Scenario 5: Which resources are currently associated with 10.2.1.155/32? 1. Run the following command: aws ec2 get-ipam-address-history --region us-east-1 --cidr 10.2.1.155/32 --ipam- scope-id ipam-scope-05b579a1909c5fc7a 2. View the results of the analysis. In the example below, the CIDR was allocated to a network interface and EC2 instance over the time period. Note that no SampledEndTime value means the record is still active. For more information about the values shown in the following output, see View IP address history. { "HistoryRecords": [ { "ResourceOwnerId": "123456789012", Scenarios 154 Amazon Virtual Private Cloud IP Address Manager "ResourceRegion": "us-east-1", "ResourceType": "network-interface", "ResourceId": "eni-0b4e53eb1733aba16", "ResourceCidr": "10.2.1.155/32", "VpcId": "vpc-0f5ee7e1ba908a378", "SampledStartTime": "2021-12-27T20:08:46.672000+00:00" }, { "ResourceOwnerId": "123456789012", "ResourceRegion": "us-east-1", "ResourceType": "instance", "ResourceId": "i-064da1f79baed14f3", "ResourceCidr": "10.2.1.155/32", "VpcId": "vpc-0f5ee7e1ba908a378", "SampledStartTime": "2021-12-27T20:08:46.672000+00:00" } ] } Scenario 6: Which resources are currently associated with 10.2.1.0/24? 1. Run the following command: aws ec2 get-ipam-address-history --region us-east-1 --cidr 10.2.1.0/24 --ipam- scope-id ipam-scope-05b579a1909c5fc7a 2. View the results of the analysis. In the example below, the CIDR was allocated to a VPC and subnet over the time period. Only the results that match this exact /24 CIDR are returned, not all /32 within the /24 CIDR. Note that no SampledEndTime value means the record is still active. For more information about the values shown in the following output, see View IP address history. { "HistoryRecords": [ { "ResourceOwnerId": "123456789012", "ResourceRegion": "us-east-1", "ResourceType": "subnet", "ResourceId": "subnet-0864c82a42f5bffed", "ResourceCidr": "10.2.1.0/24", "VpcId": "vpc-0f5ee7e1ba908a378", Scenarios 155 Amazon Virtual Private Cloud IP Address Manager "SampledStartTime": "2021-12-27T20:08:46.672000+00:00" }, { "ResourceOwnerId": "123456789012", "ResourceRegion": "us-east-1", "ResourceType": "vpc", "ResourceId": "vpc-0f5ee7e1ba908a378", "ResourceCidr": "10.2.1.0/24", "ResourceComplianceStatus": "compliant", "ResourceOverlapStatus": "nonoverlapping", "VpcId": "vpc-0f5ee7e1ba908a378",
vpc-ipam-054
vpc-ipam.pdf
54
allocated to a VPC and subnet over the time period. Only the results that match this exact /24 CIDR are returned, not all /32 within the /24 CIDR. Note that no SampledEndTime value means the record is still active. For more information about the values shown in the following output, see View IP address history. { "HistoryRecords": [ { "ResourceOwnerId": "123456789012", "ResourceRegion": "us-east-1", "ResourceType": "subnet", "ResourceId": "subnet-0864c82a42f5bffed", "ResourceCidr": "10.2.1.0/24", "VpcId": "vpc-0f5ee7e1ba908a378", Scenarios 155 Amazon Virtual Private Cloud IP Address Manager "SampledStartTime": "2021-12-27T20:08:46.672000+00:00" }, { "ResourceOwnerId": "123456789012", "ResourceRegion": "us-east-1", "ResourceType": "vpc", "ResourceId": "vpc-0f5ee7e1ba908a378", "ResourceCidr": "10.2.1.0/24", "ResourceComplianceStatus": "compliant", "ResourceOverlapStatus": "nonoverlapping", "VpcId": "vpc-0f5ee7e1ba908a378", "SampledStartTime": "2021-12-27T20:08:46.672000+00:00" } ] } Scenario 7: Which resources are currently associated with 54.0.0.9/32? In this example, 54.0.0.9/32 is assigned to an Elastic IP address that is not part of the AWS Organization integrated with your IPAM. 1. Run the following command: aws ec2 get-ipam-address-history --region us-east-1 --cidr 54.0.0.9/32 --ipam- scope-id ipam-scope-05b579a1909c5fc7a 2. Since 54.0.0.9/32 is assigned to an Elastic IP address that is not part of the AWS Organization integrated with the IPAM in this example, no records are returned. { "HistoryRecords": [] } Tutorial: Bring your ASN to IPAM If your applications are using trusted IP addresses and Autonomous System Numbers (ASNs) that your partners or customers have allow listed in their network, you can run these applications in AWS without requiring your partners or customers to change their allow lists. Bring your ASN to IPAM 156 Amazon Virtual Private Cloud IP Address Manager An Autonomous System Number (ASN) is a globally unique number which enables a group of networks to be identified over the internet and exchange routing data with other networks dynamically using Border Gateway Protocol. Internet service providers (ISPs), for example, use ASNs to identify the network traffic source. Not all organizations purchase their own ASNs, but for organizations which do, they can bring their ASN to AWS. Bring your own autonomous system number (BYOASN) enables you to advertise the IPv4 or IPv6 addresses that you bring to AWS with your own public ASN instead of the AWS ASN. When you use BYOASN, the traffic originating from your IP address carries your ASN instead of the AWS ASN, and your workloads are reachable by customers or partners that have allow listed traffic based on your IP address and ASN. Important • Complete this tutorial using the IPAM admin account in your IPAM’s home Region. • This tutorial assumes you own the public ASN you’d like to bring to IPAM and that you’ve already brought a BYOIP CIDR to AWS and provisioned it to a pool in your public scope. You can bring an ASN to IPAM at any time, but to use it, you have to associate with a CIDR that you’ve brought to your AWS account. This tutorial assumes that you have already done that. For more information, see Tutorial: Bring your IP addresses to IPAM. • You can change between your advertising your own ASN or an AWS ASN without delay, but you are limited to changing from an AWS ASN to your own ASN once per hour. • If your BYOIP CIDR is currently advertised, you do not have to withdraw it from advertising to associate with your ASN. Onboarding prerequisites for your ASN You will need the following to complete this tutorial: • Your public 2-byte or 4-byte ASN. • If you've already brought an IP address range to AWS with Tutorial: Bring your IP addresses to IPAM, you need the IP address CIDR range. You'll also need a private key. You can use the private key that you created when you brought the IP address CIDR range to AWS or you can create a new private key as described in Create a private key and generate an X.509 certificate in the Amazon EC2 User Guide. Onboarding prerequisites for your ASN 157 Amazon Virtual Private Cloud IP Address Manager • When you bring an IPv4 or IPv6 address range to AWS with Tutorial: Bring your IP addresses to IPAM, you create an X.509 certificate and upload the X.509 certificate to the RDAP record in your RIR. You must upload the same certificate you created to the RDAP record in your RIR for the ASN. Be sure to include the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- strings before and after the encoded portion. All of this content must be on a single, long line. The procedure for updating RDAP depends on your RIR: • For ARIN, use the Account Manager portal to add the certificate in the "Public Comments" section for the "Network Information" object representing your ASN by using the "Modify ASN" option. Do not add it to the comments section for your organization. • For RIPE, add the certificate as a new "descr" field to the “aut-num” object representing your ASN.
vpc-ipam-055
vpc-ipam.pdf
55
for the ASN. Be sure to include the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- strings before and after the encoded portion. All of this content must be on a single, long line. The procedure for updating RDAP depends on your RIR: • For ARIN, use the Account Manager portal to add the certificate in the "Public Comments" section for the "Network Information" object representing your ASN by using the "Modify ASN" option. Do not add it to the comments section for your organization. • For RIPE, add the certificate as a new "descr" field to the “aut-num” object representing your ASN. These can usually be found in the "My Resources" section of the RIPE Database portal . Do not add it to the comments section for your organization or the "remarks" field of the “aut-num” object. • For APNIC, email the certificate to [email protected] to manually add it to the "remarks" field for your ASN. Send the email using the APNIC authorized contact for the ASN. • When you bring an IP address range to IPAM, you create a ROA to verify that you control the IP address space that you are bringing to IPAM. In addition to that ROA, you must have a second ROA in your RIR with the ASN that you are bringing to IPAM. If you don’t have this second ROA for the ASN in your RIR, complete 3. Create a ROA object in your RIR. Ignore the other steps. Tutorial steps Complete the steps below using the AWS console or the AWS CLI. AWS Management Console 1. Open the IPAM console at https://console.aws.amazon.com/ipam/. 2. In the left navigation pane, choose IPAMs. 3. Choose your IPAM. 4. Choose the BYOASNs tab and choose Provision BYOASNs. 5. Enter the ASN. As a result, the Message field is automatically populated with the message you will need to sign in the next step. Tutorial steps 158 Amazon Virtual Private Cloud IP Address Manager • The format of the message is as follows, where ACCOUNT is your AWS account number, ASN is the ASN you are bringing to IPAM, and YYYYMMDD is the expiry date of the message (which defaults to the last day of the next month). Example: text_message="1|aws|ACCOUNT|ASN|YYYYMMDD|SHA256|RSAPSS" 6. Copy the message and replace the expiry date with your own value if you want to. 7. Sign the message using the private key. Example: signed_message=$( echo -n $text_message | openssl dgst -sha256 -sigopt rsa_padding_mode:pss -sigopt rsa_pss_saltlen:-1 -sign private-key.pem -keyform PEM | openssl base64 | tr -- '+=/' '-_~' | tr -d "\n") 8. Under Signature, enter the signature. 9. (Optional) To provision another ASN, choose Provision another ASN. You can provision up to 5 ASNs. To increase this quota, see Quotas for your IPAM. 10. Choose Provision. 11. View the provisioning process in the BYOASNs tab. Wait for the State to change from Pending-provision to Provisioned. BYOASNs in a Failed-provision state are automatically removed after 7 days. Once the ASN is successfully provisioned, you can associate it with a BYOIP CIDR. 12. In the left navigation pane, choose Pools. 13. Choose your public scope. For more information about scopes, see How IPAM works. 14. Choose a regional pool that has a BYOIP CIDR provisioned to it. The pool must have Service set to EC2 and must have a locale chosen. 15. Choose the CIDRs tab and select a BYOIP CIDR. 16. Choose Actions > Manage BYOASN associations. 17. Under Associated BYOASNs, choose the ASN you brought to AWS. If you have multiple ASNs, you can associate multiple ASNs to the BYOIP CIDR. You can associate as many ASNs as you can bring to IPAM. Note that you can bring up to 5 ASNs to IPAM by default. For more information, see Quotas for your IPAM. 18. Choose Associate. 19. Wait for the ASN association to complete. Once the ASN is successfully associated with the BYOIP CIDR, you can advertise the BYOIP CIDR again. 20. Choose the pool CIDRs tab. Tutorial steps 159 Amazon Virtual Private Cloud IP Address Manager 21. Select the BYOIP CIDR and choose Actions > Advertise. As a result, your ASN options are displayed: the Amazon ASN and any ASNs you’ve brought to IPAM. 22. Select the ASN you brought to IPAM and choose Advertise CIDR. As a result, the BYOIP CIDR is advertised and the value in the Advertising column changes from Withdrawn to Advertised. The Autonomous System Number column displays the ASN associated with the CIDR. 23. (optional) If you decide that you want to change the ASN association back to the Amazon ASN, select the BYOIP CIDR and choose Actions > Advertise again. This time, choose the Amazon ASN. You can swap back to the Amazon ASN at any time, but you can only change to a custom ASN once every hour. The
vpc-ipam-056
vpc-ipam.pdf
56
the ASN you brought to IPAM and choose Advertise CIDR. As a result, the BYOIP CIDR is advertised and the value in the Advertising column changes from Withdrawn to Advertised. The Autonomous System Number column displays the ASN associated with the CIDR. 23. (optional) If you decide that you want to change the ASN association back to the Amazon ASN, select the BYOIP CIDR and choose Actions > Advertise again. This time, choose the Amazon ASN. You can swap back to the Amazon ASN at any time, but you can only change to a custom ASN once every hour. The tutorial is complete. Cleanup 1. Disassociate the ASN from the BYOIP CIDR • To withdraw the BYOIP CIDR from advertising, in your pool in the public scope, choose the BYOIP CIDR and choose Actions > Withdraw from advertising. • To disassociate the ASN from the CIDR, choose Actions > Manage BYOASN associations. 2. Deprovision the ASN • To deprovision the ASN, in the BYOASNs tab, choose the ASN and choose Deprovision ASN. As a result, the ASN is deprovisioned. BYOASNs in a Deprovisioned state are automatically removed after 7 days. Cleanup is complete. Command line 1. Provision your ASN by including your ASN and authorization message. The signature is the message signed with your private key. aws ec2 provision-ipam-byoasn --ipam-id $ipam_id --asn 12345 --asn- authorization-context Message="$text_message",Signature="$signed_message" 2. Describe your ASN to track the provisioning process. If the request succeeds, you should see the ProvisionStatus set to provisioned after a few minutes. Tutorial steps 160 Amazon Virtual Private Cloud IP Address Manager aws ec2 describe-ipam-byoasn 3. Associate your ASN with your BYOIP CIDR. Any custom ASN you wish to advertise from must first be associated with your CIDR. aws ec2 associate-ipam-byoasn --asn 12345 --cidr xxx.xxx.xxx.xxx/n 4. Describe your CIDR to track the association process. aws ec2 describe-byoip-cidrs --max-results 10 5. Advertise your CIDR with your ASN. If the CIDR is already advertised, this will swap the origin ASN from Amazon’s to yours. aws ec2 advertise-byoip-cidr --asn 12345 --cidr xxx.xxx.xxx.xxx/n 6. Describe your CIDR to see the ASN state change from associated to advertised. aws ec2 describe-byoip-cidrs --max-results 10 The tutorial is complete. Cleanup 1. Do one of the following: • To withdraw just your ASN advertisement and go back to using the Amazon ASNs while keeping the CIDR advertised you must call advertise-byoip-cidr with the special AWS value for the asn parameter. You can swap back to the Amazon ASN at any time, but you can only change to a custom ASN once every hour. aws ec2 advertise-byoip-cidr --asn AWS --cidr xxx.xxx.xxx.xxx/n • To withdraw your CIDR and ASN advertisement simultaneously, you can call withdraw- byoip-cidr. aws ec2 withdraw-byoip-cidr --cidr xxx.xxx.xxx.xxx/n 2. To clean up your ASN, you must first disassociate it from your BYOIP CIDR. Tutorial steps 161 Amazon Virtual Private Cloud IP Address Manager aws ec2 disassociate-ipam-byoasn --asn 12345 --cidr xxx.xxx.xxx.xxx/n 3. Once your ASN is disassociated from all the BYOIP CIDRs with which you associated it, you can deprovision it. aws ec2 deprovision-ipam-byoasn --ipam-id $ipam_id --asn 12345 4. The BYOIP CIDR can also be deprovisioned once all ASN associations are removed. aws ec2 deprovision-ipam-pool-cidr --ipam-pool-id ipam-pool-1234567890abcdef0 -- cidr xxx.xxx.xxx.xxx/n 5. Confirm the deprovisioning. aws ec2 get-ipam-pool-cidrs --ipam-pool-id ipam-pool-1234567890abcdef0 Cleanup is complete. Tutorial: Bring your IP addresses to IPAM The tutorials in this section walk you through the process of bringing public IP address space to AWS and managing the space with IPAM. Managing public IP address space with IPAM has the following benefits: • Improves public IP addresses utilization across your organization: You can use IPAM to share IP address space across AWS accounts. Without using IPAM, you cannot share your public IP space across AWS Organizations accounts. • Simplifies the process of bringing public IP space to AWS: You can use IPAM to onboard public IP address space once, and then use IPAM to distribute your public IPs across Regions to resources like EC2 instances and application load balancers. Without IPAM, you have to onboard your public IPs for each AWS Region. Contents • Verify domain control • Bring your own IP to IPAM using both the AWS Management Console and the AWS CLI Bring your IP addresses to IPAM 162 Amazon Virtual Private Cloud IP Address Manager • Bring your own IP CIDR to IPAM using only the AWS CLI Verify domain control Before you bring an IP address range to AWS, you have to use one of the options described in this section to verify that you control the IP address space. Later, when you bring the IP address range to AWS, AWS validates that you control the IP address range. This validation ensures that customers cannot use IP ranges belonging to others, preventing routing and security issues. There are two methods that you can
vpc-ipam-057
vpc-ipam.pdf
57
addresses to IPAM 162 Amazon Virtual Private Cloud IP Address Manager • Bring your own IP CIDR to IPAM using only the AWS CLI Verify domain control Before you bring an IP address range to AWS, you have to use one of the options described in this section to verify that you control the IP address space. Later, when you bring the IP address range to AWS, AWS validates that you control the IP address range. This validation ensures that customers cannot use IP ranges belonging to others, preventing routing and security issues. There are two methods that you can use to verify that you control the range: • X.509 certificate: If your IP address range is registered with an Internet Registry that supports RDAP (such as ARIN, RIPE and APNIC), you can use an X.509 certificate to verify ownership of your domain. • DNS TXT record: Regardless of whether your Internet Registry supports RDAP, you can use a verification token and a DNS TXT record to verify ownership of your domain. Contents • Verify your domain with an X.509 certificate • Verify your domain with a DNS TXT record Verify your domain with an X.509 certificate This section describes how to verify your domain with an X.509 certificate before you bring your IP address range to IPAM. To verify your domain with an X.509 certificate 1. Complete the three steps in Prerequisites for BYOIP in Amazon EC2 in the Amazon EC2 User Guide. Note When you create the ROAs, for IPv4 CIDRs you must set the maximum length of an IP address prefix to /24. For IPv6 CIDRs, if you are adding them to an advertisable pool, the maximum length of an IP address prefix must be /48. This ensures that you have full flexibility to divide your public IP address across AWS Regions. IPAM Verify domain control 163 Amazon Virtual Private Cloud IP Address Manager enforces the maximum length you set. The maximum length is the smallest prefix length announcement you will allow for this route. For example, if you bring a /20 CIDR block to AWS, by setting the maximum length to /24, you can divide the larger block any way you like (such as with /21, /22, or /24) and distribute those smaller CIDR blocks to any Region. If you were to set the maximum length to /23, you would not be able to divide and advertise a /24 from the larger block. Also, note that /24 is the smallest IPv4 block and /48 is the smallest IPv6 block you can advertise from a Region to the internet. 2. Complete steps 1 and 2 only under Provision a publicly advertisable address range in AWS in the Amazon EC2 User Guide, and don't provision the address range (step 3) yet. Save the text_message and signed_message. You'll need them later in this process. When you've completed these steps, continue with Bring your own IP to IPAM using both the AWS Management Console and the AWS CLI or Bring your own IP CIDR to IPAM using only the AWS CLI. Verify your domain with a DNS TXT record Complete the steps in this section to verify your domain with a DNS TXT record before you bring your IP address range to IPAM. You can use DNS TXT records to validate that you control a public IP address range. DNS TXT records are a type of DNS record that contain information about your domain name. This feature enables you to bring IP addresses registered with any internet registry (such as JPNIC, LACNIC, and AFRINIC), not just those that support RDAP (Registration Data Access Protocol) record-based validations (such as ARIN, RIPE and APNIC). Important Before you can continue, you must have already created an IPAM in the Free or Advanced Tier. If you don’t have an IPAM, complete Create an IPAM first. Contents • Step 1: Create a ROA if you don't have one • Step 2. Create a verification token • Step 3. Set up the DNS zone and TXT record Verify domain control 164 Amazon Virtual Private Cloud IP Address Manager Step 1: Create a ROA if you don't have one You must have a Route Origin Authorization (ROA) in your Regional Internet Registry (RIR) for IP address ranges you wish to advertise. If you don’t have a ROA in your RIR, complete 3. Create a ROA object in your RIR in the Amazon EC2 User Guide. Ignore the other steps. The most specific IPv4 address range that you can bring is /24. The most specific IPv6 address range that you can bring is /48 for CIDRs that are publicly advertisable and /60 for CIDRs that are not publicly advertisable. Step 2. Create a verification token A verification token is an AWS-generated random value that you can use to
vpc-ipam-058
vpc-ipam.pdf
58
in your Regional Internet Registry (RIR) for IP address ranges you wish to advertise. If you don’t have a ROA in your RIR, complete 3. Create a ROA object in your RIR in the Amazon EC2 User Guide. Ignore the other steps. The most specific IPv4 address range that you can bring is /24. The most specific IPv6 address range that you can bring is /48 for CIDRs that are publicly advertisable and /60 for CIDRs that are not publicly advertisable. Step 2. Create a verification token A verification token is an AWS-generated random value that you can use to prove control of an external resource. For example, you can use a verification token to validate that you control a public IP address range when you bring an IP address range to AWS (BYOIP). Complete the steps in this section to create a verification token which you'll need in a later step in this tutorial to bring your IP address range to IPAM. Use the instructions below for either the AWS console or the AWS CLI. AWS Management Console To create a verification token 1. Open the IPAM console at https://console.aws.amazon.com/ipam/. 2. 3. In the AWS Management Console, choose the AWS Region where you created your IPAM. In the left navigation pane, choose IPAMs. 4. Choose your IPAM and then choose the Verification tokens tab. 5. Select Create verification token. 6. After you create the token, leave this browser tab open. You’ll need the Token value, Token name in the next step and the Token ID in a later step. Note the following: • Once you create a verification token, you can reuse the token for multiple BYOIP CIDRs that you provision from your IPAM within 72 hours. If you want to provision more CIDRs after 72 hours, you need a new token. • You can create up to 100 tokens. If you reach the limit, delete expired tokens. Verify domain control 165 Amazon Virtual Private Cloud Command line IP Address Manager • Request that IPAM creates a verification token that you will use for the DNS configuration with create-ipam-external-resource-verification-token: aws ec2 create-ipam-external-resource-verification-token --ipam-id ipam-id This will return an IpamExternalResourceVerificationTokenId and token with TokenName and TokenValue, and the expiration time (NotAfter) of the token. { "IpamExternalResourceVerificationToken": { "IpamExternalResourceVerificationTokenId": "ipam-ext-res-ver- token-0309ce7f67a768cf0", "IpamId": "ipam-0f9e8725ac3ae5754", "TokenValue": "a34597c3-5317-4238-9ce7-50da5b6e6dc8", "TokenName": "86950620", "NotAfter": "2024-05-19T14:28:15.927000+00:00", "Status": "valid", "Tags": [], "State": "create-in-progress" } } Note the following: • Once you create a verification token, you can reuse the token for multiple BYOIP CIDRs that you provision from your IPAM within 72 hours. If you want to provision more CIDRs after 72 hours, you need a new token. • You can view your tokens using describe-ipam-external-resource-verification-tokens. • You can create up to 100 tokens. If you reach the limit, you can delete expired tokens using delete-ipam-external-resource-verification-token. Step 3. Set up the DNS zone and TXT record Complete the steps in this section to set up the DNS zone and TXT record. If you are not using Route53 as your DNS, then follow the documentation provided by your DNS provider to set up a DNS Zone and add a TXT record. If you are using Route53, note the following: Verify domain control 166 Amazon Virtual Private Cloud IP Address Manager • To create a Reverse Lookup Zone in the AWS console, see Creating a public hosted zone in the Amazon Route 53 Developer Guide or use the AWS CLI command create-hosted-zone. • To create a record in the Reverse Lookup Zone in the AWS console, see Creating records by using the Amazon Route 53 console in the Amazon Route 53 Developer Guide or use the AWS CLI command change-resource-record-sets. • After you are done creating your hosted zone, delegate the hosted zone from your RIR to the name servers provided by Route53 (such as for LACNIC or APNIC). Whether you are using another DNS provider or Route53, when you set up the TXT record, note the following: • Record name should be your token name. • Record type should be TXT. • ResourceRecord Value should be the token value. Example: • Name: 86950620.113.0.203.in-addr.arpa • Type: TXT • ResourceRecords Value: a34597c3-5317-4238-9ce7-50da5b6e6dc8 Where: • 86950620 is the verification token name. • 113.0.203.in-addr.arpa is the Reverse Lookup Zone name. • TXT is the record type. • a34597c3-5317-4238-9ce7-50da5b6e6dc8 is the verification token value. Note Depending on the size of the prefix to be brought to IPAM with BYOIP, one or more authentication records must be created in the DNS. These authentication records are of the record type TXT and must be placed into the reverse zone of the prefix itself or its parent prefix. Verify domain control 167 Amazon Virtual Private Cloud IP Address Manager • For IPv4, authentication records need to align to ranges at an octet boundary that make up the prefix.
vpc-ipam-059
vpc-ipam.pdf
59
is the Reverse Lookup Zone name. • TXT is the record type. • a34597c3-5317-4238-9ce7-50da5b6e6dc8 is the verification token value. Note Depending on the size of the prefix to be brought to IPAM with BYOIP, one or more authentication records must be created in the DNS. These authentication records are of the record type TXT and must be placed into the reverse zone of the prefix itself or its parent prefix. Verify domain control 167 Amazon Virtual Private Cloud IP Address Manager • For IPv4, authentication records need to align to ranges at an octet boundary that make up the prefix. • Examples • For 198.18.123.0/24, which is already aligned at an octet boundary, you would need to create a single authentication record at: • token-name.123.18.198.in-addr.arpa. IN TXT “token-value” • For 198.18.12.0/22, which itself is not aligned to octet boundary, you would need to create four authentication records. These records must cover the subnets 198.18.12.0/24, 198.18.13.0/24, 198.18.14.0/24, and 198.18.15.0/24 which are aligned at an octet boundary. The corresponding DNS entries must be: • token-name.12.18.198.in-addr.arpa. IN TXT “token-value” • token-name.13.18.198.in-addr.arpa. IN TXT “token-value” • token-name.14.18.198.in-addr.arpa. IN TXT “token-value” • token-name.15.18.198.in-addr.arpa. IN TXT “token-value” • For 198.18.0.0/16, which is already aligned at an octet boundary, you need to create a single authentication record: • token-name.18.198.in-addr.arpa. IN TXT “token-value” • For IPv6, authentication records need to align to ranges at nibble boundary that make up the prefix. Valid nibble values are e.g. 32, 36, 40, 44, 48, 52, 56, and 60. • Examples • For 2001:0db8::/40, which is already aligned at nibble boundary, you need to create a single authentication record: • token-name.0.0.8.b.d.0.1.0.0.2.ip6.arpa TXT “token-value” • For 2001:0db8:80::/42, which is itself not aligned at nibble boundary, you need to create four authentication records. These records must cover the subnets 2001:db8:80::/44, 2001:db8:90::/44, 2001:db8:a0::/44, and 2001:db8:b0::/44 which are aligned at a nibble boundary. The corresponding DNS entries must be: • token-name.8.0.0.8.b.d.0.1.0.0.2.ip6.arpa TXT “token-value” • token-name.9.0.0.8.b.d.0.1.0.0.2.ip6.arpa TXT “token-value” • token-name.a.0.0.8.b.d.0.1.0.0.2.ip6.arpa IN TXT “token-value” • token-name.b.0.0.8.b.d.0.1.0.0.2.ip6.arpa IN TXT “token-value” Verify domain control 168 Amazon Virtual Private Cloud IP Address Manager • For the non-advertised range 2001:db8:0:1000::/54, which is itself not aligned at a nibble boundary, you need to create four authentication records. These records must cover the subnets 2001:db8:0:1000::/56, 2001:db8:0:1100::/56, 2001:db8:0:1200::/56, and 2001:db8:0:1300::/56 which are aligned at a nibble boundary. The corresponding DNS entries must be: • token-name.0.1.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa IN TXT “token- value” • token-name.1.1.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa IN TXT “token- value” • token-name.2.1.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa IN TXT “token- value” • token-name.3.1.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa IN TXT “token- value” • To validate the correct number of hexadecimal numbers between the token-name and the "ip6.arpa" string, multiply the number by four. The result should match the prefix length. For example, for a /56 prefix you should have 14 hexadecimal digits. When you've completed these steps, continue with Bring your own IP to IPAM using both the AWS Management Console and the AWS CLI or Bring your own IP CIDR to IPAM using only the AWS CLI. Bring your own IP to IPAM using both the AWS Management Console and the AWS CLI Bringing Your Own IP (BYOIP) to IPAM allows you to use your organization's existing IPv4 and IPv6 address ranges in AWS. This enables you to maintain consistent branding, improve network performance, enhance security, and simplify management by unifying on-premises and cloud environments under your own IP address space. Follow these steps to bring an IPv4 or IPv6 CIDR to IPAM using both the AWS Management Console and the AWS CLI. Note Before you begin, you must have first verified domain control. BYOIP with AWS console and CLI 169 Amazon Virtual Private Cloud IP Address Manager Once you bring an IPv4 address range to AWS, you can use all of the IP addresses in the range, including the first address (the network address) and the last address (the broadcast address). Contents • Bring your own IPv4 CIDR to IPAM using both the AWS Management Console and the AWS CLI • Bring your own IPv6 CIDR to IPAM using the AWS Management Console Bring your own IPv4 CIDR to IPAM using both the AWS Management Console and the AWS CLI Follow these steps to bring an IPv4 CIDR to IPAM and allocate an Elastic IP address (EIP) using both the AWS Management Console and the AWS CLI. Important • This tutorial assumes you have already completed the steps in the following sections: • Integrate IPAM with accounts in an AWS Organization. • Create an IPAM. • Each step of this tutorial must be done by one of three AWS Organizations accounts: • The management account. • The member account configured to be your IPAM administrator in Integrate IPAM with accounts in an AWS Organization. In this tutorial, this account will be called the IPAM account. • The member account in your organization which will allocate CIDRs from an
vpc-ipam-060
vpc-ipam.pdf
60
both the AWS Management Console and the AWS CLI. Important • This tutorial assumes you have already completed the steps in the following sections: • Integrate IPAM with accounts in an AWS Organization. • Create an IPAM. • Each step of this tutorial must be done by one of three AWS Organizations accounts: • The management account. • The member account configured to be your IPAM administrator in Integrate IPAM with accounts in an AWS Organization. In this tutorial, this account will be called the IPAM account. • The member account in your organization which will allocate CIDRs from an IPAM pool. In this tutorial, this account will be called the member account. Contents • Step 1: Create AWS CLI named profiles and IAM roles • Step 2: Create a top-level IPAM pool • Step 3. Create a Regional pool within the top-level pool • Step 4: Advertise the CIDR • Step 5. Share the Regional pool • Step 6: Allocate an Elastic IP address from the pool BYOIP with AWS console and CLI 170 Amazon Virtual Private Cloud IP Address Manager • Step 7: Associate the Elastic IP address with an EC2 instance • Step 8: Cleanup • Alternative to Step 6 Step 1: Create AWS CLI named profiles and IAM roles To complete this tutorial as a single AWS user, you can use AWS CLI named profiles to switch from one IAM role to another. Named profiles are collections of settings and credentials that you refer to when using the --profile option with the AWS CLI. For more information about how to create IAM roles and named profiles for AWS accounts, see Using an IAM role in the AWS CLI. Create one role and one named profile for each of the three AWS accounts you will use in this tutorial: • A profile called management-account for the AWS Organizations management account. • A profile called ipam-account for the AWS Organizations member account that is configured to be your IPAM administrator. • A profile called member-account for the AWS Organizations member account in your organization which will allocate CIDRs from an IPAM pool. After you have created the IAM roles and named profiles, return to this page and go to the next step. You will notice throughout the rest of this tutorial that the sample AWS CLI commands use the --profile option with one of the named profiles to indicate which account must run the command. Step 2: Create a top-level IPAM pool Complete the steps in this section to create a top-level IPAM pool. This step must be done by the IPAM account. To create a pool 1. Open the IPAM console at https://console.aws.amazon.com/ipam/. 2. In the navigation pane, choose Pools. 3. By default, when you create a pool, the default private scope is selected. Choose the public scope. For more information about scopes, see How IPAM works. BYOIP with AWS console and CLI 171 Amazon Virtual Private Cloud 4. Choose Create pool. IP Address Manager 5. (Optional) Add a Name tag for the pool and a Description for the pool. 6. Under Source, choose IPAM scope. 7. Under Address family, choose IPv4. 8. Under Resource planning, leave Plan IP space within the scope selected. For more information about using this option to plan for subnet IP space within a VPC, see Tutorial: Plan VPC IP address space for subnet IP allocations. 9. Under Locale, choose None. The IPAM integration with BYOIP requires that the locale is set on whichever pool will be used for the BYOIP CIDR. Since we are going to create a top-level IPAM pool with a Regional pool within it, and we’re going to allocate space to an Elastic IP address from the Regional pool, you will set the locale on the Regional pool and not the top-level pool. You’ll add the locale to the Regional pool when you create the Regional pool in a later step. Note If you are creating a single pool only and not a top-level pool with Regional pools within it, you would want to choose a Locale for this pool so that the pool is available for allocations. 10. Under Public IP source, choose BYOIP. 11. Under CIDRs to provision, do one of the following: • If you verified your domain control with an X.509 certificate, you must include the CIDR and the BYOIP message and certificate signature that you created in that step so we can verify that you control the public space. • If you verified your domain control with a DNS TXT record, you must include the CIDR and IPAM verification token that you created in that step so we can verify that you control the public space. Note that when provisioning an IPv4 CIDR to a pool within the top-level pool, the minimum IPv4
vpc-ipam-061
vpc-ipam.pdf
61
to provision, do one of the following: • If you verified your domain control with an X.509 certificate, you must include the CIDR and the BYOIP message and certificate signature that you created in that step so we can verify that you control the public space. • If you verified your domain control with a DNS TXT record, you must include the CIDR and IPAM verification token that you created in that step so we can verify that you control the public space. Note that when provisioning an IPv4 CIDR to a pool within the top-level pool, the minimum IPv4 CIDR you can provision is /24; more specific CIDRs (such as /25) are not permitted. BYOIP with AWS console and CLI 172 Amazon Virtual Private Cloud IP Address Manager Important While most provisioning will be completed within two hours, it may take up to one week to complete the provisioning process for publicly advertisable ranges. 12. Leave Configure this pool's allocation rule settings unselected. 13. (Optional) Choose Tags for the pool. 14. Choose Create pool. Ensure that this CIDR has been provisioned before you continue. You can see the state of provisioning in the CIDRs tab in the pool details page. Step 3. Create a Regional pool within the top-level pool Create a Regional pool within the top-level pool. The IPAM integration with BYOIP requires that the locale is set on whichever pool will be used for the BYOIP CIDR. You’ll add the locale to the Regional pool when you create the Regional pool in this section. The Locale must be part of one of the operating Regions you configured when you created the IPAM. For example, a locale of us- east-1 means that us-east-1 must be an operating Region for the IPAM. A locale of us-east-1- scl-1 (a network border group used for Local Zones) means that the IPAM must have an operating Region of us-east-1. This step must be done by the IPAM account. To create a Regional pool within a top-level pool 1. Open the IPAM console at https://console.aws.amazon.com/ipam/. 2. In the navigation pane, choose Pools. 3. By default, when you create a pool, the default private scope is selected. If you don’t want to use the default private scope, from the dropdown menu at the top of the content pane, choose the scope you want to use. For more information about scopes, see How IPAM works. 4. Choose Create pool. 5. (Optional) Add a Name tag for the pool and a Description for the pool. 6. Under Source, choose the top-level pool that you created in the previous section. BYOIP with AWS console and CLI 173 Amazon Virtual Private Cloud IP Address Manager 7. Under Resource planning, leave Plan IP space within the scope selected. For more information about using this option to plan for subnet IP space within a VPC, see Tutorial: Plan VPC IP address space for subnet IP allocations. 8. Under Locale, choose the locale for the pool. In this tutorial, we'll use us-east-2 as the locale for the Regional pool. The available options come from the operating Regions that you chose when you created your IPAM. The locale for the pool should be one of the following: • An AWS Region where you want this IPAM pool to be available for allocations. • The network border group for an AWS Local Zone where you want this IPAM pool to be available for allocations (supported Local Zones). This option is only available for IPAM IPv4 pools in the public scope. • An AWS Dedicated Local Zone. To create a pool within an AWS Dedicated Local Zone, enter the AWS Dedicated Local Zone in the selector input. For example, you can only allocate a CIDR for a VPC from an IPAM pool that shares a locale with the VPC’s Region. Note that when you have chosen a locale for a pool, you cannot modify it. If the home Region of the IPAM is unavailable due to an outage and the pool has a locale different than the home Region of the IPAM, the pool can still be used to allocate IP addresses. Choosing a locale ensures there are no cross-region dependencies between your pool and the resources allocating from it. 9. Under Service, choose EC2 (EIP/VPC). The service you select determines the AWS service where the CIDR will be advertisable. Currently, the only option is EC2 (EIP/VPC), which means that the CIDRs allocated from this pool will be advertisable for the Amazon EC2 service (for Elastic IP addresses) and the Amazon VPC service (for CIDRs associated with VPCs). 10. Under CIDRs to provision, choose a CIDR to provision for the pool. Note When provisioning a CIDR to a Regional pool within the top-level pool, the most specific IPv4 CIDR you can provision is /24;
vpc-ipam-062
vpc-ipam.pdf
62
and the resources allocating from it. 9. Under Service, choose EC2 (EIP/VPC). The service you select determines the AWS service where the CIDR will be advertisable. Currently, the only option is EC2 (EIP/VPC), which means that the CIDRs allocated from this pool will be advertisable for the Amazon EC2 service (for Elastic IP addresses) and the Amazon VPC service (for CIDRs associated with VPCs). 10. Under CIDRs to provision, choose a CIDR to provision for the pool. Note When provisioning a CIDR to a Regional pool within the top-level pool, the most specific IPv4 CIDR you can provision is /24; more specific CIDRs (such as /25) are not permitted. After you create the Regional pool, you can create smaller pools (such as /25) within the same Regional pool. Note that if you share the Regional pool or pools within it, these pools can only be used in the locale set on the same Regional pool. BYOIP with AWS console and CLI 174 Amazon Virtual Private Cloud IP Address Manager 11. Enable Configure this pool's allocation rule settings. You have the same allocation rule options here as you did when you created the top-level pool. See Create a top-level IPv4 pool for an explanation of the options that are available when you create pools. The allocation rules for the Regional pool are not inherited from the top-level pool. If you do not apply any rules here, there will be no allocation rules set for the pool. 12. (Optional) Choose Tags for the pool. 13. When you’ve finished configuring your pool, choose Create pool. Ensure that this CIDR has been provisioned before you continue. You can see the state of provisioning in the CIDRs tab in the pool details page. Step 4: Advertise the CIDR The steps in this section must be done by the IPAM account. Once you associate the Elastic IP address (EIP) with an instance or Elastic Load Balancer, you can then start advertising the CIDR you brought to AWS that is in pool that has the Service EC2 (EIP/VPC) configured. In this tutorial, that's your Regional pool. By default the CIDR is not advertised, which means it's not publicly accessible over the internet. This step must be done by the IPAM account. Note The advertisement status doesn't not restrict your ability to allocate Elastic IP addresses. Even if your BYOIPv4 CIDR is not advertised, you can still can create EIPs from the IPAM pool. To advertise the CIDR 1. Open the IPAM console at https://console.aws.amazon.com/ipam/. 2. In the navigation pane, choose Pools. 3. By default, when you create a pool, the default private scope is selected. Choose the public scope. For more information about scopes, see How IPAM works. 4. Choose the Regional pool you created in this tutorial. 5. Choose the CIDRs tab. BYOIP with AWS console and CLI 175 Amazon Virtual Private Cloud IP Address Manager 6. Select the BYOIP CIDR and choose Actions > Advertise. 7. Choose Advertise CIDR. As a result, the BYOIP CIDR is advertised and the value in the Advertising column changes from Withdrawn to Advertised. Step 5. Share the Regional pool Follow the steps in this section to share the IPAM pool using AWS Resource Access Manager (RAM). Enable resource sharing in AWS RAM After you create your IPAM, you’ll want to share the regional pool with other accounts in your organization. Before you share an IPAM pool, complete the steps in this section to enable resource sharing with AWS RAM. If you are using the AWS CLI to enable resource sharing, use the -- profile management-account option. To enable resource sharing 1. Using the AWS Organizations management account, open the AWS RAM console at https:// console.aws.amazon.com/ram/. 2. In the left navigation pane, choose Settings, choose Enable sharing with AWS Organizations, and then choose Save settings. You can now share an IPAM pool with other members of the organization. Share an IPAM pool using AWS RAM In this section you’ll share the regional pool with another AWS Organizations member account. For complete instructions on sharing IPAM pools, including information on the required IAM permissions, see Share an IPAM pool using AWS RAM. If you are using the AWS CLI to enable resource sharing, use the --profile ipam-account option. To share an IPAM pool using AWS RAM 1. Using the IPAM admin account, open the IPAM console at https://console.aws.amazon.com/ ipam/. 2. In the navigation pane, choose Pools. 3. Choose the private scope, choose the IPAM pool, and choose Actions > View details. BYOIP with AWS console and CLI 176 Amazon Virtual Private Cloud IP Address Manager 4. Under Resource sharing, choose Create resource share. The AWS RAM console opens. You share the pool using AWS RAM. 5. Choose Create a resource share. 6. In the AWS RAM console, choose Create a resource
vpc-ipam-063
vpc-ipam.pdf
63
resource sharing, use the --profile ipam-account option. To share an IPAM pool using AWS RAM 1. Using the IPAM admin account, open the IPAM console at https://console.aws.amazon.com/ ipam/. 2. In the navigation pane, choose Pools. 3. Choose the private scope, choose the IPAM pool, and choose Actions > View details. BYOIP with AWS console and CLI 176 Amazon Virtual Private Cloud IP Address Manager 4. Under Resource sharing, choose Create resource share. The AWS RAM console opens. You share the pool using AWS RAM. 5. Choose Create a resource share. 6. In the AWS RAM console, choose Create a resource share again. 7. Add a Name for the shared pool. 8. Under Select resource type, choose IPAM pools, and then choose the ARN of the pool you want to share. 9. Choose Next. 10. Choose the AWSRAMPermissionIpamPoolByoipCidrImport permission. The details of the permission options are out of scope for this tutorial, but you can find out more about these options in Share an IPAM pool using AWS RAM. 11. Choose Next. 12. Under Principals > Select principal type, choose AWS account and enter the account ID of the account that will be bringing an IP address range to IPAM and choose Add . 13. Choose Next. 14. Review the resource share options and the principals that you’ll be sharing with, and then choose Create. 15. To allow the member-account account to allocate IP address CIDRS from the IPAM pool, create a second resource share with AWSRAMDefaultPermissionsIpamPool. The value for --resource-arns is the ARN of the IPAM pool that you created in the previous section. The value for --principals is the account ID of the member-account. The value for -- permission-arns is the ARN of the AWSRAMDefaultPermissionsIpamPool permission. Step 6: Allocate an Elastic IP address from the pool Complete the steps in this section to allocate an Elastic IP address from the pool. Note that if you are using public IPv4 pools to allocate Elastic IP addresses, you can use the alternative steps in Alternative to Step 6 rather than the steps in this section. Important If you see an error related to not having permissions to call ec2:AllocateAddress, the managed permission currently assigned to the IPAM pool that was shared with you needs to be updated. Contact the person who created the resource share and ask them to update BYOIP with AWS console and CLI 177 Amazon Virtual Private Cloud IP Address Manager the managed permission AWSRAMPermissionIpamResourceDiscovery to the default version. For more information, see Update a resource share in the AWS RAM User Guide . AWS Management Console Follow the steps in Allocate an Elastic IP address in the Amazon EC2 User Guide to allocate the address, but note the following: • This step must be done by the member account. • Ensure that the AWS Region you are in in the EC2 console matches the Locale option you chose when you created the Regional pool. • When you choose the address pool, choose the option to Allocate using an IPv4 IPAM pool and choose the Regional pool you created. Command line Allocate an address from the pool with the allocate-address command. The --region you use must match the -locale option you chose when you created the pool in Step 2. Include the ID of the IPAM pool you created in Step 2 in --ipam-pool-id. Optionally, you can also choose a specific /32 in your IPAM pool by using the --address option. aws ec2 allocate-address --region us-east-1 --ipam-pool-id ipam- pool-07ccc86aa41bef7ce Example response: { "PublicIp": "18.97.0.41", "AllocationId": "eipalloc-056cdd6019c0f4b46", "PublicIpv4Pool": "ipam-pool-07ccc86aa41bef7ce", "NetworkBorderGroup": "us-east-1", "Domain": "vpc" } For more information, see Allocate an Elastic IP address in the Amazon EC2 User Guide. BYOIP with AWS console and CLI 178 Amazon Virtual Private Cloud IP Address Manager Step 7: Associate the Elastic IP address with an EC2 instance Complete the steps in this section to associate the Elastic IP address with an EC2 instance. AWS Management Console Follow the steps in Associate an Elastic IP address in the Amazon EC2 User Guide to allocate an Elastic IP address from the IPAM pool, but note the following: When you use AWS Management Console option, the AWS Region you associate the Elastic IP address in must match the Locale option you chose when you created the Regional pool. This step must be done by the member account. Command line This step must be done by the member account. Use the --profile member-account option. Associate the Elastic IP address with an instance with the associate-address command. The -- region you associate the Elastic IP address in must match the --locale option you chose when you created the Regional pool. aws ec2 associate-address --region us-east-1 --instance-id i-07459a6fca5b35823 -- public-ip 18.97.0.41 Example response: { "AssociationId": "eipassoc-06aa85073d3936e0e" } For more information, see Associate an Elastic IP address with an
vpc-ipam-064
vpc-ipam.pdf
64
must match the Locale option you chose when you created the Regional pool. This step must be done by the member account. Command line This step must be done by the member account. Use the --profile member-account option. Associate the Elastic IP address with an instance with the associate-address command. The -- region you associate the Elastic IP address in must match the --locale option you chose when you created the Regional pool. aws ec2 associate-address --region us-east-1 --instance-id i-07459a6fca5b35823 -- public-ip 18.97.0.41 Example response: { "AssociationId": "eipassoc-06aa85073d3936e0e" } For more information, see Associate an Elastic IP address with an instance or network interface in the Amazon EC2 User Guide. Step 8: Cleanup Follow the steps in this section to clean up the resources you've provisioned and created in this tutorial. BYOIP with AWS console and CLI 179 Amazon Virtual Private Cloud IP Address Manager Step 1: Withdraw the CIDR from advertising This step must be done by the IPAM account. 1. Open the IPAM console at https://console.aws.amazon.com/ipam/. 2. In the navigation pane, choose Pools. 3. By default, when you create a pool, the default private scope is selected. Choose the public scope. 4. Choose the Regional pool you created in this tutorial. 5. Choose the CIDRs tab. 6. Select the BYOIP CIDR and choose Actions > Withdraw from advertising. 7. Choose Withdraw CIDR. As a result, the BYOIP CIDR is no longer advertised and the value in the Advertising column changes from Advertised to Withdrawn. Step 2: Disassociate the Elastic IP address This step must be done by the member account. If you are using the AWS CLI, use the --profile member-account option. • Complete the steps in Disassociate an Elastic IP address in the Amazon EC2 User Guide to disassociate the EIP. When you open EC2 in the AWS Management console, the AWS Region you disassociate the EIP in must match the Locale option you chose when you created the pool that will be used for the BYOIP CIDR. In this tutorial, that pool is the Regional pool. Step 3: Release the Elastic IP address This step must be done by the member account. If you are using the AWS CLI, use the --profile member-account option. • Complete the steps in Release an Elastic IP address in the Amazon EC2 User Guide to release an Elastic IP address (EIP) from the public IPv4 pool. When you open EC2 in the AWS Management console, the AWS Region you allocate the EIP in must match the Locale option you chose when you created the pool that will be used for the BYOIP CIDR. BYOIP with AWS console and CLI 180 Amazon Virtual Private Cloud IP Address Manager Step 4: Delete any RAM shares and disable RAM integration with AWS Organizations This step must be done by the IPAM account and management account respectively. If you are using the AWS CLI to delete the RAM shares and disable RAM integration, use the --profile ipam-account and --profile management-account options. • Complete the steps in Deleting a resource share in AWS RAM and Disabling resource sharing with AWS Organizations in the AWS RAM User Guide, in that order, to delete the RAM shares and disable RAM integration with AWS Organizations. Step 5: Deprovision the CIDRs from the Regional pool and top-level pool This step must be done by the IPAM account. If you are using the AWS CLI to share the pool, use the --profile ipam-account option. • Complete the steps in Deprovision CIDRs from a pool to deprovision the CIDRs from the Regional pool and then the top-level pool, in that order. Step 6: Delete the Regional pool and top-level pool This step must be done by the IPAM account. If you are using the AWS CLI to share the pool, use the --profile ipam-account option. • Complete the steps in Delete a pool to delete the Regional pool and then the top-level pool, in that order. Alternative to Step 6 If you are using public IPv4 pools to allocate Elastic IP addresses, you can use the steps in this section rather than the steps in Step 6: Allocate an Elastic IP address from the pool. Contents • Step 1: Create a public IPv4 pool • Step 2: Provision the public IPv4 CIDR to your public IPv4 pool • Step 3: Allocate an Elastic IP address from the public IPv4 pool • Alternative to Step 6 cleanup BYOIP with AWS console and CLI 181 Amazon Virtual Private Cloud IP Address Manager Step 1: Create a public IPv4 pool This step should be done by the member account that will provision an Elastic IP address. Note • This step must be done by the member account using the AWS CLI. • Public IPv4 pools and IPAM pools are managed by distinct resources in
vpc-ipam-065
vpc-ipam.pdf
65
public IPv4 pool • Step 2: Provision the public IPv4 CIDR to your public IPv4 pool • Step 3: Allocate an Elastic IP address from the public IPv4 pool • Alternative to Step 6 cleanup BYOIP with AWS console and CLI 181 Amazon Virtual Private Cloud IP Address Manager Step 1: Create a public IPv4 pool This step should be done by the member account that will provision an Elastic IP address. Note • This step must be done by the member account using the AWS CLI. • Public IPv4 pools and IPAM pools are managed by distinct resources in AWS. Public IPv4 pools are single account resources that enable you to convert your publicly-owned CIDRs to Elastic IP addresses. IPAM pools can be used to allocate your public space to public IPv4 pools. To create a public IPv4 pool using the AWS CLI • Run the following command to provision the CIDR. When you run the command in this section, the value for --region must match the Locale option you chose when you created the pool that will be used for the BYOIP CIDR. aws ec2 create-public-ipv4-pool --region us-east-2 --profile member-account In the output, you'll see the public IPv4 pool ID. You will need this ID in the next step. { "PoolId": "ipv4pool-ec2-09037ce61cf068f9a" } Step 2: Provision the public IPv4 CIDR to your public IPv4 pool Provision the public IPv4 CIDR to your public IPv4 pool. The value for --region must match the Locale value you chose when you created the pool that will be used for the BYOIP CIDR. The --netmask-length is the amount of space out of the IPAM pool that you want to bring to your public pool. The value cannot be larger than the netmask length of the IPAM pool. The least specific --netmask-length you can define is 24. BYOIP with AWS console and CLI 182 Amazon Virtual Private Cloud IP Address Manager Note • If you are bringing a /24 CIDR range to IPAM to share across an AWS Organization, you can provision smaller prefixes to multiple IPAM pools, say /27 (using -- netmask- length 27), rather than provisioning the entire /24 CIDR (using -- netmask-length 24) as is shown in this tutorial. • This step must be done by the member account using the AWS CLI. To create a public IPv4 pool using the AWS CLI 1. Run the following command to provision the CIDR. aws ec2 provision-public-ipv4-pool-cidr --region us-east-2 --ipam-pool-id ipam- pool-04d8e2d9670eeab21 --pool-id ipv4pool-ec2-09037ce61cf068f9a --netmask-length 24 --profile member-account In the output, you'll see the provisioned CIDR. { "PoolId": "ipv4pool-ec2-09037ce61cf068f9a", "PoolAddressRange": { "FirstAddress": "130.137.245.0", "LastAddress": "130.137.245.255", "AddressCount": 256, "AvailableAddressCount": 256 } } 2. Run the following command to view the CIDR provisioned in the public IPv4 pool. aws ec2 describe-public-ipv4-pools --region us-east-2 --max-results 10 -- profile member-account In the output, you'll see the provisioned CIDR. By default the CIDR is not advertised, which means it's not publicly accessible over the internet. You will have the chance to set this CIDR to advertised in the last step of this tutorial. { BYOIP with AWS console and CLI 183 Amazon Virtual Private Cloud IP Address Manager "PublicIpv4Pools": [ { "PoolId": "ipv4pool-ec2-09037ce61cf068f9a", "Description": "", "PoolAddressRanges": [ { "FirstAddress": "130.137.245.0", "LastAddress": "130.137.245.255", "AddressCount": 256, "AvailableAddressCount": 255 } ], "TotalAddressCount": 256, "TotalAvailableAddressCount": 255, "NetworkBorderGroup": "us-east-2", "Tags": [] } ] } Once you create the public IPv4 pool, to view the public IPv4 pool allocated in the IPAM Regional pool, open the IPAM console and view the allocation in the Regional pool under Allocations or Resources. Step 3: Allocate an Elastic IP address from the public IPv4 pool Complete the steps in Allocate an Elastic IP address in the Amazon EC2 User Guide to allocate an EIP from the public IPv4 pool. When you open EC2 in the AWS Management console, the AWS Region you allocate the EIP in must match the Locale option you chose when you created the pool that will be used for the BYOIP CIDR. This step must be done by the member account. If you are using the AWS CLI, use the --profile member-account option. Once you've completed these three steps, return to Step 7: Associate the Elastic IP address with an EC2 instance and continue until you complete the tutorial. Alternative to Step 6 cleanup Complete these steps to clean up public IPv4 pools created with the alternative to Step 9. You should complete these steps after you release the Elastic IP address during the standard cleanup process in Step 8: Cleanup. BYOIP with AWS console and CLI 184 Amazon Virtual Private Cloud IP Address Manager Step 1: Deprovision the public IPv4 CIDR from your public IPv4 pool Important This step must be done by the member account using the AWS CLI. 1. View your BYOIP CIDRs. aws ec2 describe-public-ipv4-pools --region us-east-2 --profile
vpc-ipam-066
vpc-ipam.pdf
66
and continue until you complete the tutorial. Alternative to Step 6 cleanup Complete these steps to clean up public IPv4 pools created with the alternative to Step 9. You should complete these steps after you release the Elastic IP address during the standard cleanup process in Step 8: Cleanup. BYOIP with AWS console and CLI 184 Amazon Virtual Private Cloud IP Address Manager Step 1: Deprovision the public IPv4 CIDR from your public IPv4 pool Important This step must be done by the member account using the AWS CLI. 1. View your BYOIP CIDRs. aws ec2 describe-public-ipv4-pools --region us-east-2 --profile member-account In the output, you'll see the IP addresses in your BYOIP CIDR. { "PublicIpv4Pools": [ { "PoolId": "ipv4pool-ec2-09037ce61cf068f9a", "Description": "", "PoolAddressRanges": [ { "FirstAddress": "130.137.245.0", "LastAddress": "130.137.245.255", "AddressCount": 256, "AvailableAddressCount": 256 } ], "TotalAddressCount": 256, "TotalAvailableAddressCount": 256, "NetworkBorderGroup": "us-east-2", "Tags": [] } ] } 2. Run the following command to release the last IP address in the CIDR from the public IPv4 pool. Enter the IP address with a netmask of /32. aws ec2 deprovision-public-ipv4-pool-cidr --region us-east-2 --pool-id ipv4pool- ec2-09037ce61cf068f9a --cidr 130.137.245.255/32 --profile member-account In the output, you'll see the deprovisioned CIDR. BYOIP with AWS console and CLI 185 Amazon Virtual Private Cloud IP Address Manager { "PoolId": "ipv4pool-ec2-09037ce61cf068f9a", "DeprovisionedAddresses": [ "130.137.245.255" ] } Important You must rerun this command for each IP address in the CIDR range. If your CIDR is a /24, you will have to run this command to deprovision each of the 256 IP addresses in the /24 CIDR. 3. View your BYOIP CIDRs again and ensure there are no more provisioned addresses. When you run the command in this section, the value for --region must match the Region of your IPAM. aws ec2 describe-public-ipv4-pools --region us-east-2 --profile member-account In the output, you'll see the IP addresses count in your public IPv4 pool. { "PublicIpv4Pools": [ { "PoolId": "ipv4pool-ec2-09037ce61cf068f9a", "Description": "", "PoolAddressRanges": [], "TotalAddressCount": 0, "TotalAvailableAddressCount": 0, "NetworkBorderGroup": "us-east-2", "Tags": [] } ] } BYOIP with AWS console and CLI 186 Amazon Virtual Private Cloud IP Address Manager Note It can take some time for IPAM to discover that public IPv4 pool allocations have been removed. You cannot continue to clean up and deprovision the IPAM pool CIDR until you see that the allocation has been removed from IPAM. Step 2: Delete the public IPv4 pool This step must be done by the member account. • Run the following command to delete the public IPv4 pool the CIDR. When you run the command in this section, the value for --region must match the Locale option you chose when you created the pool that will be used for the BYOIP CIDR. In this tutorial, that pool is the Regional pool. This step must be done using the AWS CLI. aws ec2 delete-public-ipv4-pool --region us-east-2 --pool-id ipv4pool- ec2-09037ce61cf068f9a --profile member-account In the output, you'll see the return value true. { "ReturnValue": true } Once you delete the pool, to view the allocation unmanaged by IPAM, open the IPAM console and view the details of the Regional pool under Allocations. Bring your own IPv6 CIDR to IPAM using the AWS Management Console Follow the steps in this tutorial to bring an IPv6 CIDR to IPAM and allocate a VPC with the CIDR using both the AWS Management Console and the AWS CLI. If you do not need to advertise your IPv6 addresses over the Internet, you can provision a private GUA IPv6 address to an IPAM. For more information, see Enable provisioning private IPv6 GUA CIDRs. BYOIP with AWS console and CLI 187 Amazon Virtual Private Cloud IP Address Manager Important • This tutorial assumes you have already completed the steps in the following sections: • Integrate IPAM with accounts in an AWS Organization. • Create an IPAM. • Each step of this tutorial must be done by one of three AWS Organizations accounts: • The management account. • The member account configured to be your IPAM administrator in Integrate IPAM with accounts in an AWS Organization. In this tutorial, this account will be called the IPAM account. • The member account in your organization which will allocate CIDRs from an IPAM pool. In this tutorial, this account will be called the member account. Contents • Step 1: Create a top-level IPAM pool • Step 2. Create a Regional pool within the top-level pool • Step 3. Share the Regional pool • Step 4: Create a VPC • Step 5: Advertise the CIDR • Step 6: Cleanup Step 1: Create a top-level IPAM pool Since you are going to create a top-level IPAM pool with a Regional pool within it, and we’re going to allocate space to a resource from the Regional pool, you will set the locale on the Regional pool and not the top-level pool. You’ll
vpc-ipam-067
vpc-ipam.pdf
67
will be called the member account. Contents • Step 1: Create a top-level IPAM pool • Step 2. Create a Regional pool within the top-level pool • Step 3. Share the Regional pool • Step 4: Create a VPC • Step 5: Advertise the CIDR • Step 6: Cleanup Step 1: Create a top-level IPAM pool Since you are going to create a top-level IPAM pool with a Regional pool within it, and we’re going to allocate space to a resource from the Regional pool, you will set the locale on the Regional pool and not the top-level pool. You’ll add the locale to the Regional pool when you create the Regional pool in a later step. The IPAM integration with BYOIP requires that the locale is set on whichever pool will be used for the BYOIP CIDR. This step must be done by the IPAM account. To create a pool 1. Open the IPAM console at https://console.aws.amazon.com/ipam/. BYOIP with AWS console and CLI 188 Amazon Virtual Private Cloud IP Address Manager 2. In the navigation pane, choose Pools. 3. By default, when you create a pool, the default private scope is selected. Choose the public scope. For more information about scopes, see How IPAM works. 4. Choose Create pool. 5. (Optional) Add a Name tag for the pool and a Description for the pool. 6. Under Source, choose IPAM scope. 7. Under Address family, choose IPv6. 8. Under Resource planning, leave Plan IP space within the scope selected. For more information about using this option to plan for subnet IP space within a VPC, see Tutorial: Plan VPC IP address space for subnet IP allocations. 9. Under Locale, choose None. You will set the locale on the Regional pool. The locale is the AWS Region where you want this IPAM pool to be available for allocations. For example, you can only allocate a CIDR for a VPC from an IPAM pool that shares a locale with the VPC’s Region. Note that when you have chosen a locale for a pool, you cannot modify it. If the home Region of the IPAM is unavailable due to an outage and the pool has a locale different than the home Region of the IPAM, the pool can still be used to allocate IP addresses. Note If you are creating a single pool only and not a top-level pool with Regional pools within it, you would want to choose a Locale for this pool so that the pool is available for allocations. 10. Under Public IP source, BYOIP is selected by default. 11. Under CIDRs to provision, do one of the following: • If you verified your domain control with an X.509 certificate, you must include the CIDR and the BYOIP message and certificate signature that you created in that step so we can verify that you control the public space. • If you verified your domain control with a DNS TXT record, you must include the CIDR and IPAM verification token that you created in that step so we can verify that you control the public space. BYOIP with AWS console and CLI 189 Amazon Virtual Private Cloud IP Address Manager Note that when provisioning an IPv6 CIDR to a pool within the top-level pool, the most specific IPv6 address range that you can bring is /48 for CIDRs that are publicly advertisable and /60 for CIDRs that are not publicly advertisable. Important While most provisioning will be completed within two hours, it may take up to one week to complete the provisioning process for publicly advertisable ranges. 12. Leave Configure this pool's allocation rule settings unselected. 13. (Optional) Choose Tags for the pool. 14. Choose Create pool. Ensure that this CIDR has been provisioned before you continue. You can see the state of provisioning in the CIDRs tab in the pool details page. Step 2. Create a Regional pool within the top-level pool Create a Regional pool within the top-level pool. A Locale is required on the pool and it must be one of the operating Regions you configured when you created the IPAM. This step must be done by the IPAM account. To create a Regional pool within a top-level pool 1. Open the IPAM console at https://console.aws.amazon.com/ipam/. 2. In the navigation pane, choose Pools. 3. By default, when you create a pool, the default private scope is selected. If you don’t want to use the default private scope, from the dropdown menu at the top of the content pane, choose the scope you want to use. For more information about scopes, see How IPAM works. 4. Choose Create pool. 5. (Optional) Add a Name tag for the pool and a description for the pool. 6. Under Source, choose the top-level pool that you created in the previous section. 7.
vpc-ipam-068
vpc-ipam.pdf
68
pool 1. Open the IPAM console at https://console.aws.amazon.com/ipam/. 2. In the navigation pane, choose Pools. 3. By default, when you create a pool, the default private scope is selected. If you don’t want to use the default private scope, from the dropdown menu at the top of the content pane, choose the scope you want to use. For more information about scopes, see How IPAM works. 4. Choose Create pool. 5. (Optional) Add a Name tag for the pool and a description for the pool. 6. Under Source, choose the top-level pool that you created in the previous section. 7. Under Resource planning, leave Plan IP space within the scope selected. For more information about using this option to plan for subnet IP space within a VPC, see Tutorial: Plan VPC IP address space for subnet IP allocations. BYOIP with AWS console and CLI 190 Amazon Virtual Private Cloud IP Address Manager 8. Choose the locale for the pool. Choosing a locale ensures there are no cross-region dependencies between your pool and the resources allocating from it. The available options come from the operating Regions that you chose when you created your IPAM. In this tutorial, we'll use us-east-2 as the locale for the Regional pool. The locale is the AWS Region where you want this IPAM pool to be available for allocations. For example, you can only allocate a CIDR for a VPC from an IPAM pool that shares a locale with the VPC’s Region. Note that when you have chosen a locale for a pool, you cannot modify it. If the home Region of the IPAM is unavailable due to an outage and the pool has a locale different than the home Region of the IPAM, the pool can still be used to allocate IP addresses. 9. Under Service, choose EC2 (EIP/VPC). The service you select determines the AWS service where the CIDR will be advertisable. Currently, the only option is EC2 (EIP/VPC), which means that the CIDRs allocated from this pool will be advertisable for the Amazon EC2 service and the Amazon VPC service (for CIDRs associated with VPCs). 10. Under CIDRs to provision, choose a CIDR to provision for the pool. Note that when provisioning an IPv6 CIDR to a pool within the top-level pool, the most specific IPv6 address range that you can bring is /48 for CIDRs that are publicly advertisable and /60 for CIDRs that are not publicly advertisable. 11. Enable Configure this pool's allocation rule settings and choose optional allocation rules for this pool: • Automatically import discovered resources: This option is not available if the Locale is set to None. If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. Note the following: • The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. • IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. • If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. • If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only. • Minimum netmask length: The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant and the largest size CIDR block that can be allocated from the pool. The minimum netmask length must be less than the maximum netmask length. BYOIP with AWS console and CLI 191 Amazon Virtual Private Cloud IP Address Manager Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128. • Default netmask length: A default netmask length for allocations added to this pool. • Maximum netmask length: The maximum netmask length that will be required for CIDR allocations in this pool. This value dictates the smallest size CIDR block that can be allocated from the pool. Ensure that this value is minimum /48. • Tagging requirements: The tags that are required for resources to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging rules are changed on the pool, the resource may be marked as noncompliant. • Locale: The locale that will be required for resources that use CIDRs from this pool. Automatically imported resources that do not have this locale will be marked noncompliant. Resources that are not automatically imported into the pool will not be allowed to allocate space from the pool unless they are in this locale. 12. (Optional) Choose Tags for the pool. 13. When you’ve finished configuring your pool, choose Create pool. Ensure that
vpc-ipam-069
vpc-ipam.pdf
69
have their tags changed after they have allocated space or if the allocation tagging rules are changed on the pool, the resource may be marked as noncompliant. • Locale: The locale that will be required for resources that use CIDRs from this pool. Automatically imported resources that do not have this locale will be marked noncompliant. Resources that are not automatically imported into the pool will not be allowed to allocate space from the pool unless they are in this locale. 12. (Optional) Choose Tags for the pool. 13. When you’ve finished configuring your pool, choose Create pool. Ensure that this CIDR has been provisioned before you continue. You can see the state of provisioning in the CIDRs tab in the pool details page. Step 3. Share the Regional pool Follow the steps in this section to share the IPAM pool using AWS Resource Access Manager (RAM). Enable resource sharing in AWS RAM After you create your IPAM, you’ll want to share the regional pool with other accounts in your organization. Before you share an IPAM pool, complete the steps in this section to enable resource sharing with AWS RAM. If you are using the AWS CLI to enable resource sharing, use the -- profile management-account option. To enable resource sharing 1. Using the AWS Organizations management account, open the AWS RAM console at https:// console.aws.amazon.com/ram/. 2. In the left navigation pane, choose Settings, choose Enable sharing with AWS Organizations, and then choose Save settings. BYOIP with AWS console and CLI 192 Amazon Virtual Private Cloud IP Address Manager You can now share an IPAM pool with other members of the organization. Share an IPAM pool using AWS RAM In this section you’ll share the regional pool with another AWS Organizations member account. For complete instructions on sharing IPAM pools, including information on the required IAM permissions, see Share an IPAM pool using AWS RAM. If you are using the AWS CLI to enable resource sharing, use the --profile ipam-account option. To share an IPAM pool using AWS RAM 1. Using the IPAM admin account, open the IPAM console at https://console.aws.amazon.com/ ipam/. 2. In the navigation pane, choose Pools. 3. Choose the private scope, choose the IPAM pool, and choose Actions > View details. 4. Under Resource sharing, choose Create resource share. The AWS RAM console opens. You share the pool using AWS RAM. 5. Choose Create a resource share. 6. In the AWS RAM console, choose Create a resource share again. 7. Add a Name for the shared pool. 8. Under Select resource type, choose IPAM pools, and then choose the ARN of the pool you want to share. 9. Choose Next. 10. Choose the AWSRAMPermissionIpamPoolByoipCidrImport permission. The details of the permission options are out of scope for this tutorial, but you can find out more about these options in Share an IPAM pool using AWS RAM. 11. Choose Next. 12. Under Principals > Select principal type, choose AWS account and enter the account ID of the account that will be bringing an IP address range to IPAM and choose Add . 13. Choose Next. 14. Review the resource share options and the principals that you’ll be sharing with, and then choose Create. 15. To allow the member-account account to allocate IP address CIDRS from the IPAM pool, create a second resource share with AWSRAMDefaultPermissionsIpamPool. The value BYOIP with AWS console and CLI 193 Amazon Virtual Private Cloud IP Address Manager for --resource-arns is the ARN of the IPAM pool that you created in the previous section. The value for --principals is the account ID of the member-account. The value for -- permission-arns is the ARN of the AWSRAMDefaultPermissionsIpamPool permission. Step 4: Create a VPC Complete the steps in Create a VPC in the Amazon VPC User Guide. This step must be done by the member account. Note • When you open VPC in the AWS Management console, the AWS Region you create the VPC in must match the Locale option you chose when you created the pool that will be used for the BYOIP CIDR. • When you reach the step to choose a CIDR for the VPC, you will have an option to use a CIDR from an IPAM pool. Choose the Regional pool you created in this tutorial. When you create the VPC, AWS allocates a CIDR in the IPAM pool to the VPC. You can view the allocation in IPAM by choosing a pool in the content pane of the IPAM console and viewing the Allocations tab for the pool. Step 5: Advertise the CIDR The steps in this section must be done by the IPAM account. Once you create the VPC, you can then start advertising the CIDR you brought to AWS that is in the pool that has the Service EC2 (EIP/ VPC)
vpc-ipam-070
vpc-ipam.pdf
70
an IPAM pool. Choose the Regional pool you created in this tutorial. When you create the VPC, AWS allocates a CIDR in the IPAM pool to the VPC. You can view the allocation in IPAM by choosing a pool in the content pane of the IPAM console and viewing the Allocations tab for the pool. Step 5: Advertise the CIDR The steps in this section must be done by the IPAM account. Once you create the VPC, you can then start advertising the CIDR you brought to AWS that is in the pool that has the Service EC2 (EIP/ VPC) configured. In this tutorial, that's your Regional pool. By default the CIDR is not advertised, which means it's not publicly accessible over the internet. This step must be done by the IPAM account. To advertise the CIDR 1. Open the IPAM console at https://console.aws.amazon.com/ipam/. 2. In the navigation pane, choose Pools. 3. By default, when you create a pool, the default private scope is selected. Choose the public scope. For more information about scopes, see How IPAM works. BYOIP with AWS console and CLI 194 Amazon Virtual Private Cloud IP Address Manager 4. Choose the Regional pool you created in this tutorial. 5. Choose the CIDRs tab. 6. Select the BYOIP CIDR and choose Actions > Advertise. 7. Choose Advertise CIDR. As a result, the BYOIP CIDR is advertised and the value in the Advertising column changes from Withdrawn to Advertised. Step 6: Cleanup Follow the steps in this section to clean up the resources you've provisioned and created in this tutorial. Step 1: Withdraw the CIDR from advertising This step must be done by the IPAM account. 1. Open the IPAM console at https://console.aws.amazon.com/ipam/. 2. In the navigation pane, choose Pools. 3. By default, when you create a pool, the default private scope is selected. Choose the public scope. 4. Choose the Regional pool you created in this tutorial. 5. Choose the CIDRs tab. 6. Select the BYOIP CIDR and choose Actions > Withdraw from advertising. 7. Choose Withdraw CIDR. As a result, the BYOIP CIDR is no longer advertised and the value in the Advertising column changes from Advertised to Withdrawn. Step 2: Delete the VPC This step must be done by the member account. • Complete the steps in Delete a VPC in the Amazon VPC User Guide to delete the VPC. When you open VPC in the AWS Management console, the AWS Region delete the VPC from must match the Locale option you chose when you created the pool that will be used for the BYOIP CIDR. In this tutorial, that pool is the Regional pool. BYOIP with AWS console and CLI 195 Amazon Virtual Private Cloud IP Address Manager When you delete the VPC, it takes time for IPAM to discover that the resource has been deleted and to deallocate the CIDR allocated to the VPC. You cannot continue to the next step in the cleanup until you see that IPAM has removed the allocation from the pool in the pool details Allocations tab. Step 3: Delete the RAM shares and disable RAM integration with AWS Organizations This step must be done by the IPAM account and management account respectively. • Complete the steps in Deleting a resource share in AWS RAM and Disabling resource sharing with AWS Organizations in the AWS RAM User Guide, in that order, to delete the RAM shares and disable RAM integration with AWS Organizations. Step 4: Deprovision the CIDRs from the Regional pool and top-level pool This step must be done by the IPAM account. • Complete the steps in Deprovision CIDRs from a pool to deprovision the CIDRs from the Regional pool and then the top-level pool, in that order. Step 5: Delete the Regional pool and top-level pool This step must be done by the IPAM account. • Complete the steps in Delete a pool to delete the Regional pool and then the top-level pool, in that order. Bring your own IP CIDR to IPAM using only the AWS CLI Bringing Your Own IP (BYOIP) to IPAM allows you to use your organization's existing IPv4 and IPv6 address ranges in AWS. This enables you to maintain consistent branding, improve network performance, enhance security, and simplify management by unifying on-premises and cloud environments under your own IP address space. Follow these steps to bring an IPv4 or IPv6 CIDR to IPAM using only the AWS CLI. BYOIP with AWS CLI only 196 Amazon Virtual Private Cloud IP Address Manager Note Before you begin, you must have first verified domain control. Once you bring an IPv4 address range to AWS, you can use all of the IP addresses in the range, including the first address (the network address) and the last address (the broadcast address). Contents • Bring your
vpc-ipam-071
vpc-ipam.pdf
71
branding, improve network performance, enhance security, and simplify management by unifying on-premises and cloud environments under your own IP address space. Follow these steps to bring an IPv4 or IPv6 CIDR to IPAM using only the AWS CLI. BYOIP with AWS CLI only 196 Amazon Virtual Private Cloud IP Address Manager Note Before you begin, you must have first verified domain control. Once you bring an IPv4 address range to AWS, you can use all of the IP addresses in the range, including the first address (the network address) and the last address (the broadcast address). Contents • Bring your own public IPv4 CIDR to IPAM using only the AWS CLI • Bring your own IPv6 CIDR to IPAM using only the AWS CLI Bring your own public IPv4 CIDR to IPAM using only the AWS CLI Follow these steps to bring an IPv4 CIDR to IPAM and allocate an Elastic IP address (EIP) with the CIDR using only the AWS CLI. Important • This tutorial assumes you have already completed the steps in the following sections: • Integrate IPAM with accounts in an AWS Organization. • Create an IPAM. • Each step of this tutorial must be done by one of three AWS Organizations accounts: • The management account. • The member account configured to be your IPAM administrator in Integrate IPAM with accounts in an AWS Organization. In this tutorial, this account will be called the IPAM account. • The member account in your organization which will allocate CIDRs from an IPAM pool. In this tutorial, this account will be called the member account. Contents • Step 1: Create AWS CLI named profiles and IAM roles • Step 2: Create an IPAM • Step 3: Create a top-level IPAM pool BYOIP with AWS CLI only 197 Amazon Virtual Private Cloud IP Address Manager • Step 4: Provision a CIDR to the top-level pool • Step 5: Create a Regional pool within the top-level pool • Step 6: Provision a CIDR to the Regional pool • Step 7: Advertise the CIDR • Step 8: Share the Regional pool • Step 9: Allocate an Elastic IP address from the pool • Step 10: Associate the Elastic IP address with an EC2 instance • Step 11: Cleanup • Alternative to Step 9 Step 1: Create AWS CLI named profiles and IAM roles To complete this tutorial as a single AWS user, you can use AWS CLI named profiles to switch from one IAM role to another. Named profiles are collections of settings and credentials that you refer to when using the --profile option with the AWS CLI. For more information about how to create IAM roles and named profiles for AWS accounts, see Using an IAM role in the AWS CLI. Create one role and one named profile for each of the three AWS accounts you will use in this tutorial: • A profile called management-account for the AWS Organizations management account. • A profile called ipam-account for the AWS Organizations member account that is configured to be your IPAM administrator. • A profile called member-account for the AWS Organizations member account in your organization which will allocate CIDRs from an IPAM pool. After you have created the IAM roles and named profiles, return to this page and go to the next step. You will notice throughout the rest of this tutorial that the sample AWS CLI commands use the --profile option with one of the named profiles to indicate which account must run the command. Step 2: Create an IPAM This step is optional. If you already have an IPAM created with operating Regions of us-east-1 and us-west-2 created, you can skip this step. Create an IPAM and specify an operating region of BYOIP with AWS CLI only 198 Amazon Virtual Private Cloud IP Address Manager us-east-1 and us-west-2 . You must select an operating region so that you can use the locale option when you create your IPAM pool. The IPAM integration with BYOIP requires that the locale is set on whichever pool will be used for the BYOIP CIDR. This step must be done by the IPAM account. Run the following command: aws ec2 create-ipam --description my-ipam --region us-east-1 --operating- regions RegionName=us-west-2 --profile ipam-account In the output, you'll see the IPAM you've created. Note the value for PublicDefaultScopeId. You will need your public scope ID in the next step. You are using the public scope because BYOIP CIDRs are public IP addresses, which is what the public scope is meant for. { "Ipam": { "OwnerId": "123456789012", "IpamId": "ipam-090e48e75758de279", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "PublicDefaultScopeId": "ipam-scope-0087d83896280b594", "PrivateDefaultScopeId": "ipam-scope-08b70b04fbd524f8d", "ScopeCount": 2, "Description": "my-ipam", "OperatingRegions": [ { "RegionName": "us-east-1" }, { "RegionName": "us-west-2" } ], "Tags": [] } } Step 3: Create a top-level IPAM pool Complete the steps in this section to create
vpc-ipam-072
vpc-ipam.pdf
72
us-east-1 --operating- regions RegionName=us-west-2 --profile ipam-account In the output, you'll see the IPAM you've created. Note the value for PublicDefaultScopeId. You will need your public scope ID in the next step. You are using the public scope because BYOIP CIDRs are public IP addresses, which is what the public scope is meant for. { "Ipam": { "OwnerId": "123456789012", "IpamId": "ipam-090e48e75758de279", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "PublicDefaultScopeId": "ipam-scope-0087d83896280b594", "PrivateDefaultScopeId": "ipam-scope-08b70b04fbd524f8d", "ScopeCount": 2, "Description": "my-ipam", "OperatingRegions": [ { "RegionName": "us-east-1" }, { "RegionName": "us-west-2" } ], "Tags": [] } } Step 3: Create a top-level IPAM pool Complete the steps in this section to create a top-level IPAM pool. This step must be done by the IPAM account. BYOIP with AWS CLI only 199 Amazon Virtual Private Cloud IP Address Manager To create an IPv4 address pool for all of your AWS resources using the AWS CLI 1. Run the following command to create an IPAM pool. Use the ID of the public scope of the IPAM that you created in the previous step. This step must be done by the IPAM account. aws ec2 create-ipam-pool --region us-east-1 --ipam-scope-id ipam- scope-0087d83896280b594 --description "top-level-IPv4-pool" --address-family ipv4 --profile ipam-account In the output, you'll see create-in-progress, which indicates that pool creation is in progress. { "IpamPool": { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0a03d430ca3f5c035", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0a03d430ca3f5c035", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "Locale": "None", "PoolDepth": 1, "State": "create-in-progress", "Description": "top-level-pool", "AutoImport": false, "AddressFamily": "ipv4", "Tags": [] } } 2. Run the following command until you see a state of create-complete in the output. aws ec2 describe-ipam-pools --region us-east-1 --profile ipam-account The following example output shows the state of the pool. { BYOIP with AWS CLI only 200 Amazon Virtual Private Cloud IP Address Manager "IpamPools": [ { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0a03d430ca3f5c035", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0a03d430ca3f5c035", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "Locale": "None", "PoolDepth": 1, "State": "create-complete", "Description": "top-level-IPV4-pool", "AutoImport": false, "AddressFamily": "ipv4", "Tags": [] } ] } Step 4: Provision a CIDR to the top-level pool Provision a CIDR block to the top-level pool. Note that when provisioning an IPv4 CIDR to a pool within the top-level pool, the minimum IPv4 CIDR you can provision is /24; more specific CIDRs (such as /25) are not permitted. Note • If you verified your domain control with an X.509 certificate, you must include the CIDR and the BYOIP message and certificate signature that you created in that step so we can verify that you control the public space. • If you verified your domain control with a DNS TXT record, you must include the CIDR and IPAM verification token that you created in that step so we can verify that you control the public space. BYOIP with AWS CLI only 201 Amazon Virtual Private Cloud IP Address Manager You only need to verify domain control when you provision the BYOIP CIDR to the top-level pool. For the Regional pool within the top-level pool, you can omit the domain ownership verification option. This step must be done by the IPAM account. Important You only need to verify domain control when you provision the BYOIP CIDR to the top- level pool. For the Regional pool within the top-level pool, you can omit the domain control option. Once you onboard your BYOIP to IPAM, you are not required to perform ownership validation when you divide the BYOIP across Regions and accounts. To provision a CIDR block to the pool using the AWS CLI 1. To provision the CIDR with certificate information, use the following command example. In addition to replacing the values as needed in the example, ensure that you replace Message and Signature values with the text_message and signed_message values that you got in Verify your domain with an X.509 certificate. aws ec2 provision-ipam-pool-cidr --region us-east-1 --ipam- pool-id ipam-pool-0a03d430ca3f5c035 --cidr 130.137.245.0/24 -- verification-method remarks-x509 --cidr-authorization-context Message="1|aws|470889052444|130.137.245.0/24|20250101|SHA256| RSAPSS",Signature="W3gdQ9PZHLjPmrnGM~cvGx~KCIsMaU0P7ENO7VRnfSuf9NuJU5RUveQzus~QmF~Nx42j3z7d65uyZZiDRX7KMdW4KadaLiClyRXN6ps9ArwiUWSp9yHM~U- hApR89Kt6GxRYOdRaNx8yt-uoZWzxct2yIhWngy- du9pnEHBOX6WhoGYjWszPw0iV4cmaAX9DuMs8ASR83K127VvcBcRXElT5URr3gWEB1CQe3rmuyQk~gAdbXiDN-94- oS9AZlafBbrFxRjFWRCTJhc7Cg3ASbRO-VWNci- C~bWAPczbX3wPQSjtWGV3k1bGuD26ohUc02o8oJZQyYXRpgqcWGVJdQ__" --profile ipam-account To provision the CIDR with verification token information, use the following command example. In addition to replacing the values as needed in the example, ensure that you replace ipam-ext-res-ver-token-0309ce7f67a768cf0 with the IpamExternalResourceVerificationTokenId token ID that you got in Verify your domain with a DNS TXT record. aws ec2 provision-ipam-pool-cidr --region us-east-1 --ipam-pool-id ipam- pool-0a03d430ca3f5c035 --cidr 130.137.245.0/24 --verification-method dns- BYOIP with AWS CLI only 202 Amazon Virtual Private Cloud IP Address Manager token --ipam-external-resource-verification-token-id ipam-ext-res-ver- token-0309ce7f67a768cf0 --profile ipam-account In the output, you'll see the CIDR pending provision. { "IpamPoolCidr": { "Cidr": "130.137.245.0/24", "State": "pending-provision" } } 2. Ensure that this CIDR has been provisioned before you continue. Important While most provisioning will be completed within two hours, it may take up to one week to complete the provisioning process for publicly advertisable ranges. Run the following command until you see a state of provisioned in the output. aws ec2 get-ipam-pool-cidrs --region us-east-1 --ipam-pool-id ipam- pool-0a03d430ca3f5c035 --profile ipam-account The following example
vpc-ipam-073
vpc-ipam.pdf
73
with AWS CLI only 202 Amazon Virtual Private Cloud IP Address Manager token --ipam-external-resource-verification-token-id ipam-ext-res-ver- token-0309ce7f67a768cf0 --profile ipam-account In the output, you'll see the CIDR pending provision. { "IpamPoolCidr": { "Cidr": "130.137.245.0/24", "State": "pending-provision" } } 2. Ensure that this CIDR has been provisioned before you continue. Important While most provisioning will be completed within two hours, it may take up to one week to complete the provisioning process for publicly advertisable ranges. Run the following command until you see a state of provisioned in the output. aws ec2 get-ipam-pool-cidrs --region us-east-1 --ipam-pool-id ipam- pool-0a03d430ca3f5c035 --profile ipam-account The following example output shows the state. { "IpamPoolCidrs": [ { "Cidr": "130.137.245.0/24", "State": "provisioned" } ] } BYOIP with AWS CLI only 203 Amazon Virtual Private Cloud IP Address Manager Step 5: Create a Regional pool within the top-level pool Create a Regional pool within the top-level pool. The locale for the pool should be one of the following: • An AWS Region where you want this IPAM pool to be available for allocations. • The network border group for an AWS Local Zone where you want this IPAM pool to be available for allocations (supported Local Zones). This option is only available for IPAM IPv4 pools in the public scope. • An AWS Dedicated Local Zone. To create a pool within an AWS Dedicated Local Zone, enter the AWS Dedicated Local Zone in the selector input. For example, you can only allocate a CIDR for a VPC from an IPAM pool that shares a locale with the VPC’s Region. Note that when you have chosen a locale for a pool, you cannot modify it. If the home Region of the IPAM is unavailable due to an outage and the pool has a locale different than the home Region of the IPAM, the pool can still be used to allocate IP addresses. When you run the commands in this section, the value for --region must include the --locale option you entered when you created the pool that will be used for the BYOIP CIDR. For example, if you created the BYOIP pool with a locale of us-east-1, the --region should be us-east-1. If you created the BYOIP pool with a locale of us-east-1-scl-1 (a network border group used for Local Zones), the --region should be us-east-1 because that Region manages the locale us-east-1-scl-1. This step must be done by the IPAM account. Choosing a locale ensures there are no cross-region dependencies between your pool and the resources allocating from it. The available options come from the operating Regions that you chose when you created your IPAM. In this tutorial, we'll use us-west-2 as the locale for the Regional pool. Important When you create the pool, you must include --aws-service ec2. The service you select determines the AWS service where the CIDR will be advertisable. Currently, the only option is ec2, which means that the CIDRs allocated from this pool will be advertisable for the Amazon EC2 service (for Elastic IP addresses) and the Amazon VPC service (for CIDRs associated with VPCs). BYOIP with AWS CLI only 204 Amazon Virtual Private Cloud IP Address Manager To create a Regional pool using the AWS CLI 1. Run the following command to create the pool. aws ec2 create-ipam-pool --description "Regional-IPv4-pool" --region us-east-1 --ipam-scope-id ipam-scope-0087d83896280b594 --source-ipam-pool-id ipam- pool-0a03d430ca3f5c035 --locale us-west-2 --address-family ipv4 --aws-service ec2 --profile ipam-account In the output, you'll see IPAM creating the pool. { "IpamPool": { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0d8f3646b61ca5987", "SourceIpamPoolId": "ipam-pool-0a03d430ca3f5c035", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0d8f3646b61ca5987", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "Locale": "us-west-2", "PoolDepth": 2, "State": "create-in-progress", "Description": "Regional--pool", "AutoImport": false, "AddressFamily": "ipv4", "Tags": [], "ServiceType": "ec2" } } 2. Run the following command until you see a state of create-complete in the output. aws ec2 describe-ipam-pools --region us-east-1 --profile ipam-account In the output, you see the pools that you have in your IPAM. In this tutorial, we created a top- level and a Regional pool, so you'll see them both. BYOIP with AWS CLI only 205 Amazon Virtual Private Cloud IP Address Manager Step 6: Provision a CIDR to the Regional pool Provision a CIDR block to the Regional pool. Note When provisioning a CIDR to a Regional pool within the top-level pool, the most specific IPv4 CIDR you can provision is /24; more specific CIDRs (such as /25) are not permitted. After you create the Regional pool, you can create smaller pools (such as /25) within the same Regional pool. Note that if you share the Regional pool or pools within it, these pools can only be used in the locale set on the same Regional pool. This step must be done by the IPAM account. To assign a CIDR block to the Regional pool using the AWS CLI 1. Run the following command to provision the CIDR. aws ec2 provision-ipam-pool-cidr
vpc-ipam-074
vpc-ipam.pdf
74
pool, the most specific IPv4 CIDR you can provision is /24; more specific CIDRs (such as /25) are not permitted. After you create the Regional pool, you can create smaller pools (such as /25) within the same Regional pool. Note that if you share the Regional pool or pools within it, these pools can only be used in the locale set on the same Regional pool. This step must be done by the IPAM account. To assign a CIDR block to the Regional pool using the AWS CLI 1. Run the following command to provision the CIDR. aws ec2 provision-ipam-pool-cidr --region us-east-1 --ipam-pool-id ipam- pool-0d8f3646b61ca5987 --cidr 130.137.245.0/24 --profile ipam-account In the output, you'll see the CIDR pending provision. { "IpamPoolCidr": { "Cidr": "130.137.245.0/24", "State": "pending-provision" } } 2. Run the following command until you see the state of provisioned in the output. aws ec2 get-ipam-pool-cidrs --region us-east-1 --ipam-pool-id ipam- pool-0d8f3646b61ca5987 --profile ipam-account The following example output shows the correct state. BYOIP with AWS CLI only 206 Amazon Virtual Private Cloud IP Address Manager { "IpamPoolCidrs": [ { "Cidr": "130.137.245.0/24", "State": "provisioned" } ] } Step 7: Advertise the CIDR The steps in this section must be done by the IPAM account. Once you associate the Elastic IP address (EIP) with an instance or Elastic Load Balancer, you can then start advertising the CIDR you brought to AWS that is in pool that has --aws-service ec2 defined. In this tutorial, that's your Regional pool. By default the CIDR is not advertised, which means it's not publicly accessible over the internet. When you run the command in this section, the value for --region must match the --locale option you entered when you created the pool that will be used for the BYOIP CIDR. This step must be done by the IPAM account. Note The advertisement status doesn't not restrict your ability to allocate Elastic IP addresses. Even if your BYOIPv4 CIDR is not advertised, you can still can create EIPs from the IPAM pool. Start advertising the CIDR using the AWS CLI • Run the following command to advertise the CIDR. aws ec2 advertise-byoip-cidr --region us-west-2 --cidr 130.137.245.0/24 -- profile ipam-account In the output, you'll see the CIDR is advertised. { "ByoipCidr": { "Cidr": "130.137.245.0/24", BYOIP with AWS CLI only 207 Amazon Virtual Private Cloud IP Address Manager "State": "advertised" } } Step 8: Share the Regional pool Follow the steps in this section to share the IPAM pool using AWS Resource Access Manager (RAM). Enable resource sharing in AWS RAM After you create your IPAM, you’ll want to share the regional pool with other accounts in your organization. Before you share an IPAM pool, complete the steps in this section to enable resource sharing with AWS RAM. If you are using the AWS CLI to enable resource sharing, use the -- profile management-account option. To enable resource sharing 1. Using the AWS Organizations management account, open the AWS RAM console at https:// console.aws.amazon.com/ram/. 2. In the left navigation pane, choose Settings, choose Enable sharing with AWS Organizations, and then choose Save settings. You can now share an IPAM pool with other members of the organization. Share an IPAM pool using AWS RAM In this section you’ll share the regional pool with another AWS Organizations member account. For complete instructions on sharing IPAM pools, including information on the required IAM permissions, see Share an IPAM pool using AWS RAM. If you are using the AWS CLI to enable resource sharing, use the --profile ipam-account option. To share an IPAM pool using AWS RAM 1. Using the IPAM admin account, open the IPAM console at https://console.aws.amazon.com/ ipam/. 2. In the navigation pane, choose Pools. 3. Choose the private scope, choose the IPAM pool, and choose Actions > View details. 4. Under Resource sharing, choose Create resource share. The AWS RAM console opens. You share the pool using AWS RAM. BYOIP with AWS CLI only 208 Amazon Virtual Private Cloud IP Address Manager 5. Choose Create a resource share. 6. In the AWS RAM console, choose Create a resource share again. 7. Add a Name for the shared pool. 8. Under Select resource type, choose IPAM pools, and then choose the ARN of the pool you want to share. 9. Choose Next. 10. Choose the AWSRAMPermissionIpamPoolByoipCidrImport permission. The details of the permission options are out of scope for this tutorial, but you can find out more about these options in Share an IPAM pool using AWS RAM. 11. Choose Next. 12. Under Principals > Select principal type, choose AWS account and enter the account ID of the account that will be bringing an IP address range to IPAM and choose Add . 13. Choose Next. 14. Review the resource share options and the principals that you’ll be sharing with, and then choose Create. 15.
vpc-ipam-075
vpc-ipam.pdf
75
pool you want to share. 9. Choose Next. 10. Choose the AWSRAMPermissionIpamPoolByoipCidrImport permission. The details of the permission options are out of scope for this tutorial, but you can find out more about these options in Share an IPAM pool using AWS RAM. 11. Choose Next. 12. Under Principals > Select principal type, choose AWS account and enter the account ID of the account that will be bringing an IP address range to IPAM and choose Add . 13. Choose Next. 14. Review the resource share options and the principals that you’ll be sharing with, and then choose Create. 15. To allow the member-account account to allocate IP address CIDRS from the IPAM pool, create a second resource share with AWSRAMDefaultPermissionsIpamPool. The value for --resource-arns is the ARN of the IPAM pool that you created in the previous section. The value for --principals is the account ID of the member-account. The value for -- permission-arns is the ARN of the AWSRAMDefaultPermissionsIpamPool permission. Step 9: Allocate an Elastic IP address from the pool Complete the steps in this section to allocate an Elastic IP address from the pool. Note that if you are using public IPv4 pools to allocate Elastic IP addresses, you can use the alternative steps in Alternative to Step 9 rather than the steps in this section. Important If you see an error related to not having permissions to call ec2:AllocateAddress, the managed permission currently assigned to the IPAM pool that was shared with you needs to be updated. Contact the person who created the resource share and ask them to update the managed permission AWSRAMPermissionIpamResourceDiscovery to the default version. For more information, see Update a resource share in the AWS RAM User Guide . BYOIP with AWS CLI only 209 Amazon Virtual Private Cloud AWS Management Console IP Address Manager Follow the steps in Allocate an Elastic IP address in the Amazon EC2 User Guide to allocate the address, but note the following: • This step must be done by the member account. • Ensure that the AWS Region you are in in the EC2 console matches the Locale option you chose when you created the Regional pool. • When you choose the address pool, choose the option to Allocate using an IPv4 IPAM pool and choose the Regional pool you created. Command line Allocate an address from the pool with the allocate-address command. The --region you use must match the -locale option you chose when you created the pool in Step 2. Include the ID of the IPAM pool you created in Step 2 in --ipam-pool-id. Optionally, you can also choose a specific /32 in your IPAM pool by using the --address option. aws ec2 allocate-address --region us-east-1 --ipam-pool-id ipam- pool-07ccc86aa41bef7ce Example response: { "PublicIp": "18.97.0.41", "AllocationId": "eipalloc-056cdd6019c0f4b46", "PublicIpv4Pool": "ipam-pool-07ccc86aa41bef7ce", "NetworkBorderGroup": "us-east-1", "Domain": "vpc" } For more information, see Allocate an Elastic IP address in the Amazon EC2 User Guide. Step 10: Associate the Elastic IP address with an EC2 instance Complete the steps in this section to associate the Elastic IP address with an EC2 instance. BYOIP with AWS CLI only 210 Amazon Virtual Private Cloud AWS Management Console IP Address Manager Follow the steps in Associate an Elastic IP address in the Amazon EC2 User Guide to allocate an Elastic IP address from the IPAM pool, but note the following: When you use AWS Management Console option, the AWS Region you associate the Elastic IP address in must match the Locale option you chose when you created the Regional pool. This step must be done by the member account. Command line This step must be done by the member account. Use the --profile member-account option. Associate the Elastic IP address with an instance with the associate-address command. The -- region you associate the Elastic IP address in must match the --locale option you chose when you created the Regional pool. aws ec2 associate-address --region us-east-1 --instance-id i-07459a6fca5b35823 -- public-ip 18.97.0.41 Example response: { "AssociationId": "eipassoc-06aa85073d3936e0e" } For more information, see Associate an Elastic IP address with an instance or network interface in the Amazon EC2 User Guide. Step 11: Cleanup Follow the steps in this section to clean up the resources you've provisioned and created in this tutorial. When you run the commands in this section, the value for --region must include the -- locale option you entered when you created the pool that will be used for the BYOIP CIDR. Clean up using the AWS CLI 1. View the EIP allocation managed in IPAM. BYOIP with AWS CLI only 211 Amazon Virtual Private Cloud IP Address Manager This step must be done by the IPAM account. aws ec2 get-ipam-pool-allocations --region us-west-2 --ipam-pool-id ipam- pool-0d8f3646b61ca5987 --profile ipam-account The output shows the allocation in IPAM. { "IpamPoolAllocations": [ { "Cidr": "130.137.245.0/24", "IpamPoolAllocationId": "ipam-pool- alloc-5dedc8e7937c4261b56dc3e3eb53dc45", "ResourceId":
vpc-ipam-076
vpc-ipam.pdf
76
created in this tutorial. When you run the commands in this section, the value for --region must include the -- locale option you entered when you created the pool that will be used for the BYOIP CIDR. Clean up using the AWS CLI 1. View the EIP allocation managed in IPAM. BYOIP with AWS CLI only 211 Amazon Virtual Private Cloud IP Address Manager This step must be done by the IPAM account. aws ec2 get-ipam-pool-allocations --region us-west-2 --ipam-pool-id ipam- pool-0d8f3646b61ca5987 --profile ipam-account The output shows the allocation in IPAM. { "IpamPoolAllocations": [ { "Cidr": "130.137.245.0/24", "IpamPoolAllocationId": "ipam-pool- alloc-5dedc8e7937c4261b56dc3e3eb53dc45", "ResourceId": "ipv4pool-ec2-0019eed22a684e0b2", "ResourceType": "ec2-public-ipv4-pool", "ResourceOwner": "123456789012" } ] } 2. Stop advertising the IPv4 CIDR. This step must be done by the IPAM account. aws ec2 withdraw-byoip-cidr --region us-west-2 --cidr 130.137.245.0/24 -- profile ipam-account In the output, you'll see the CIDR State has changed from advertised to provisioned. { "ByoipCidr": { "Cidr": "130.137.245.0/24", "State": "provisioned" } } 3. Release the Elastic IP address. This step must be done by the member account. BYOIP with AWS CLI only 212 Amazon Virtual Private Cloud IP Address Manager aws ec2 release-address --region us-west-2 --allocation- id eipalloc-0db3405026756dbf6 --profile member-account You will not see any output when you run this command. 4. View the EIP allocation is no longer managed in IPAM. It can take some time for IPAM to discover that the Elastic IP address has been removed. You cannot continue to clean up and deprovision the IPAM pool CIDR until you see that the allocation has been removed from IPAM. When you run the command in this section, the value for --region must include the -- locale option you entered when you created the pool that will be used for the BYOIP CIDR. This step must be done by the IPAM account. aws ec2 get-ipam-pool-allocations --region us-west-2 --ipam-pool-id ipam- pool-0d8f3646b61ca5987 --profile ipam-account The output shows the allocation in IPAM. { "IpamPoolAllocations": [] } 5. Deprovision the Regional pool CIDR. When you run the commands in this step, the value for -- region must match the Region of your IPAM. This step must be done by the IPAM account. aws ec2 deprovision-ipam-pool-cidr --region us-east-1 --ipam-pool-id ipam- pool-0d8f3646b61ca5987 --cidr 130.137.245.0/24 --profile ipam-account In the output, you'll see the CIDR pending deprovision. { "IpamPoolCidr": { "Cidr": "130.137.245.0/24", "State": "pending-deprovision" BYOIP with AWS CLI only 213 Amazon Virtual Private Cloud IP Address Manager } } Deprovisioning takes time to complete. Check the status of deprovisioning. aws ec2 get-ipam-pool-cidrs --region us-east-1 --ipam-pool-id ipam- pool-0d8f3646b61ca5987 --profile ipam-account Wait until you see deprovisioned before you continue to the next step. { "IpamPoolCidr": { "Cidr": "130.137.245.0/24", "State": "deprovisioned" } } 6. Delete the RAM shares and disable RAM integration with AWS Organizations. Complete the steps in Deleting a resource share in AWS RAM and Disabling resource sharing with AWS Organizations in the AWS RAM User Guide, in that order, to delete the RAM shares and disable RAM integration with AWS Organizations. This step must be done by the IPAM account and management account respectively. If you are using the AWS CLI to delete the RAM shares and disable RAM integration, use the -- profile ipam-account and --profile management-account options. 7. Delete the Regional pool. When you run the command in this step, the value for --region must match the Region of your IPAM. This step must be done by the IPAM account. aws ec2 delete-ipam-pool --region us-east-1 --ipam-pool-id ipam- pool-0d8f3646b61ca5987 --profile ipam-account In the output, you can see the delete state. BYOIP with AWS CLI only 214 Amazon Virtual Private Cloud IP Address Manager { "IpamPool": { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0d8f3646b61ca5987", "SourceIpamPoolId": "ipam-pool-0a03d430ca3f5c035", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0d8f3646b61ca5987", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "Locale": "us-east-1", "PoolDepth": 2, "State": "delete-in-progress", "Description": "reg-ipv4-pool", "AutoImport": false, "Advertisable": true, "AddressFamily": "ipv4" } } 8. Deprovision the top-level pool CIDR. When you run the commands in this step, the value for --region must match the Region of your IPAM. This step must be done by the IPAM account. aws ec2 deprovision-ipam-pool-cidr --region us-east-1 --ipam-pool-id ipam- pool-0a03d430ca3f5c035 --cidr 130.137.245.0/24 --profile ipam-account In the output, you'll see the CIDR pending deprovision. { "IpamPoolCidr": { "Cidr": "130.137.245.0/24", "State": "pending-deprovision" } } BYOIP with AWS CLI only 215 Amazon Virtual Private Cloud IP Address Manager Deprovisioning takes time to complete. Run the following command to check the status of deprovisioning. aws ec2 get-ipam-pool-cidrs --region us-east-1 --ipam-pool-id ipam- pool-0a03d430ca3f5c035 --profile ipam-account Wait until you see deprovisioned before you continue to the next step. { "IpamPoolCidr": { "Cidr": "130.137.245.0/24", "State": "deprovisioned" } } 9. Delete the top-level pool. When you run the command in this step, the value for --region must match the Region of your IPAM. This step must be done by the IPAM account. aws ec2 delete-ipam-pool --region us-east-1 --ipam-pool-id ipam- pool-0a03d430ca3f5c035 --profile ipam-account In the output, you can see the
vpc-ipam-077
vpc-ipam.pdf
77
Cloud IP Address Manager Deprovisioning takes time to complete. Run the following command to check the status of deprovisioning. aws ec2 get-ipam-pool-cidrs --region us-east-1 --ipam-pool-id ipam- pool-0a03d430ca3f5c035 --profile ipam-account Wait until you see deprovisioned before you continue to the next step. { "IpamPoolCidr": { "Cidr": "130.137.245.0/24", "State": "deprovisioned" } } 9. Delete the top-level pool. When you run the command in this step, the value for --region must match the Region of your IPAM. This step must be done by the IPAM account. aws ec2 delete-ipam-pool --region us-east-1 --ipam-pool-id ipam- pool-0a03d430ca3f5c035 --profile ipam-account In the output, you can see the delete state. { "IpamPool": { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0a03d430ca3f5c035", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0a03d430ca3f5c035", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", BYOIP with AWS CLI only 216 Amazon Virtual Private Cloud IP Address Manager "Locale": "us-east-1", "PoolDepth": 2, "State": "delete-in-progress", "Description": "top-level-pool", "AutoImport": false, "Advertisable": true, "AddressFamily": "ipv4" } } 10. Delete the IPAM. When you run the command in this step, the value for --region must match the Region of your IPAM. This step must be done by the IPAM account. aws ec2 delete-ipam --region us-east-1 --ipam-id ipam-090e48e75758de279 -- profile ipam-account In the output, you'll see the IPAM response. This means that the IPAM was deleted. { "Ipam": { "OwnerId": "123456789012", "IpamId": "ipam-090e48e75758de279", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "PublicDefaultScopeId": "ipam-scope-0087d83896280b594", "PrivateDefaultScopeId": "ipam-scope-08b70b04fbd524f8d", "ScopeCount": 2, "OperatingRegions": [ { "RegionName": "us-east-1" }, { "RegionName": "us-west-2" } ], BYOIP with AWS CLI only 217 Amazon Virtual Private Cloud IP Address Manager } } Alternative to Step 9 If you are using public IPv4 pools to allocate Elastic IP addresses, you can use the steps in this section rather than the steps in Step 9: Allocate an Elastic IP address from the pool. Contents • Step 1: Create a public IPv4 pool • Step 2: Provision the public IPv4 CIDR to your public IPv4 pool • Step 3: Create an Elastic IP address from the public IPv4 pool • Alternative to Step 9 cleanup Step 1: Create a public IPv4 pool This step would typically be done by a different AWS account which wants to provision an Elastic IP address, such as the member account. Important Public IPv4 pools and IPAM pools are managed by distinct resources in AWS. Public IPv4 pools are single account resources that enable you to convert your publicly-owned CIDRs to Elastic IP addresses. IPAM pools can be used to allocate your public space to public IPv4 pools. To create a public IPv4 pool using the AWS CLI • Run the following command to provision the CIDR. When you run the command in this section, the value for --region must match the --locale option you entered when you created the pool that will be used for the BYOIP CIDR. aws ec2 create-public-ipv4-pool --region us-west-2 --profile member-account In the output, you'll see the public IPv4 pool ID. You will need this ID in the next step. BYOIP with AWS CLI only 218 Amazon Virtual Private Cloud IP Address Manager { "PoolId": "ipv4pool-ec2-0019eed22a684e0b2" } Step 2: Provision the public IPv4 CIDR to your public IPv4 pool Provision the public IPv4 CIDR to your public IPv4 pool. The value for --region must match the --locale value you entered when you created the pool that will be used for the BYOIP CIDR. The least specific --netmask-length you can define is 24. This step must be done by the member account. To create a public IPv4 pool using the AWS CLI 1. Run the following command to provision the CIDR. aws ec2 provision-public-ipv4-pool-cidr --region us-west-2 --ipam-pool-id ipam- pool-0d8f3646b61ca5987 --pool-id ipv4pool-ec2-0019eed22a684e0b2 --netmask-length 24 --profile member-account In the output, you'll see the provisioned CIDR. { "PoolId": "ipv4pool-ec2-0019eed22a684e0b2", "PoolAddressRange": { "FirstAddress": "130.137.245.0", "LastAddress": "130.137.245.255", "AddressCount": 256, "AvailableAddressCount": 256 } } 2. Run the following command to view the CIDR provisioned in the public IPv4 pool. aws ec2 describe-byoip-cidrs --region us-west-2 --max-results 10 --profile member- account BYOIP with AWS CLI only 219 Amazon Virtual Private Cloud IP Address Manager In the output, you'll see the provisioned CIDR. By default the CIDR is not advertised, which means it's not publicly accessible over the internet. You will have the chance to set this CIDR to advertised in the last step of this tutorial. { "ByoipCidrs": [ { "Cidr": "130.137.245.0/24", "StatusMessage": "Cidr successfully provisioned", "State": "provisioned" } ] } Step 3: Create an Elastic IP address from the public IPv4 pool Create an Elastic IP address (EIP) from the public IPv4 pool. When you run the commands in this section, the value for --region must match the --locale option you entered when you created the pool that will be used for the BYOIP CIDR. This step must be done by the member account. To create an EIP from the public IPv4 pool using the AWS CLI 1. Run the following command to create the EIP. aws
vpc-ipam-078
vpc-ipam.pdf
78
[ { "Cidr": "130.137.245.0/24", "StatusMessage": "Cidr successfully provisioned", "State": "provisioned" } ] } Step 3: Create an Elastic IP address from the public IPv4 pool Create an Elastic IP address (EIP) from the public IPv4 pool. When you run the commands in this section, the value for --region must match the --locale option you entered when you created the pool that will be used for the BYOIP CIDR. This step must be done by the member account. To create an EIP from the public IPv4 pool using the AWS CLI 1. Run the following command to create the EIP. aws ec2 allocate-address --region us-west-2 --public-ipv4-pool ipv4pool- ec2-0019eed22a684e0b2 --profile member-account In the output, you'll see the allocation. { "PublicIp": "130.137.245.100", "AllocationId": "eipalloc-0db3405026756dbf6", "PublicIpv4Pool": "ipv4pool-ec2-0019eed22a684e0b2", "NetworkBorderGroup": "us-east-1", "Domain": "vpc" } 2. Run the following command to view the EIP allocation managed in IPAM. BYOIP with AWS CLI only 220 Amazon Virtual Private Cloud IP Address Manager This step must be done by the IPAM account. aws ec2 get-ipam-pool-allocations --region us-west-2 --ipam-pool-id ipam- pool-0d8f3646b61ca5987 --profile ipam-account The output shows the allocation in IPAM. { "IpamPoolAllocations": [ { "Cidr": "130.137.245.0/24", "IpamPoolAllocationId": "ipam-pool- alloc-5dedc8e7937c4261b56dc3e3eb53dc45", "ResourceId": "ipv4pool-ec2-0019eed22a684e0b2", "ResourceType": "ec2-public-ipv4-pool", "ResourceOwner": "123456789012" } ] } Alternative to Step 9 cleanup Complete these steps to clean up public IPv4 pools created with the alternative to Step 9. You should complete these steps after you release the Elastic IP address during the standard cleanup process in Step 10: Cleanup. 1. View your BYOIP CIDRs. This step must be done by the member account. aws ec2 describe-public-ipv4-pools --region us-west-2 --profile member-account In the output, you'll see the IP addresses in your BYOIP CIDR. { "PublicIpv4Pools": [ { "PoolId": "ipv4pool-ec2-0019eed22a684e0b2", "Description": "", BYOIP with AWS CLI only 221 Amazon Virtual Private Cloud IP Address Manager "PoolAddressRanges": [ { "FirstAddress": "130.137.245.0", "LastAddress": "130.137.245.255", "AddressCount": 256, "AvailableAddressCount": 256 } ], "TotalAddressCount": 256, "TotalAvailableAddressCount": 256, "NetworkBorderGroup": "us-east-1", "Tags": [] } ] } 2. Release the last IP address in the CIDR from the public IPv4 pool. Enter the IP address with a netmask of /32. You must rerun this command for each IP address in the CIDR range. If your CIDR is a /24, you will have to run this command to deprovision each of the 256 IP addresses in the /24 CIDR. When you run the command in this section, the value for --region must match the Region of your IPAM. This step must be done by the member account. aws ec2 deprovision-public-ipv4-pool-cidr --region us-east-1 --pool-id ipv4pool- ec2-0019eed22a684e0b2 --cidr 130.137.245.255/32 --profile member-account In the output, you'll see the deprovisioned CIDR. { "PoolId": "ipv4pool-ec2-0019eed22a684e0b2", "DeprovisionedAddresses": [ "130.137.245.255" ] } BYOIP with AWS CLI only 222 Amazon Virtual Private Cloud IP Address Manager 3. View your BYOIP CIDRs again and ensure there are no more provisioned addresses. When you run the command in this section, the value for --region must match the Region of your IPAM. This step must be done by the member account. aws ec2 describe-public-ipv4-pools --region us-east-1 --profile member-account In the output, you'll see the IP addresses count in your public IPv4 pool. { "PublicIpv4Pools": [ { "PoolId": "ipv4pool-ec2-0019eed22a684e0b2", "Description": "", "PoolAddressRanges": [], "TotalAddressCount": 0, "TotalAvailableAddressCount": 0, "NetworkBorderGroup": "us-east-1", "Tags": [] } ] } Bring your own IPv6 CIDR to IPAM using only the AWS CLI Follow these steps to bring an IPv6 CIDR to IPAM and allocate a VPC using only the AWS CLI. If you do not need to advertise your IPv6 addresses over the Internet, you can provision a private GUA IPv6 address to an IPAM. For more information, see Enable provisioning private IPv6 GUA CIDRs. Important • This tutorial assumes you have already completed the steps in the following sections: • Integrate IPAM with accounts in an AWS Organization. • Create an IPAM. • Each step of this tutorial must be done by one of three AWS Organizations accounts: BYOIP with AWS CLI only 223 Amazon Virtual Private Cloud IP Address Manager • The management account. • The member account configured to be your IPAM administrator in Integrate IPAM with accounts in an AWS Organization. In this tutorial, this account will be called the IPAM account. • The member account in your organization which will allocate CIDRs from an IPAM pool. In this tutorial, this account will be called the member account. Contents • Step 1: Create AWS CLI named profiles and IAM roles • Step 2: Create an IPAM • Step 3: Create an IPAM pool • Step 4: Provision a CIDR to the top-level pool • Step 5: Create a Regional pool within the top-level pool • Step 6: Provision a CIDR to the Regional pool • Step 7. Share the Regional pool • Step 8: Create a VPC using the IPv6 CIDR • Step 9: Advertise the CIDR • Step 10: Cleanup Step 1: Create
vpc-ipam-079
vpc-ipam.pdf
79
an IPAM pool. In this tutorial, this account will be called the member account. Contents • Step 1: Create AWS CLI named profiles and IAM roles • Step 2: Create an IPAM • Step 3: Create an IPAM pool • Step 4: Provision a CIDR to the top-level pool • Step 5: Create a Regional pool within the top-level pool • Step 6: Provision a CIDR to the Regional pool • Step 7. Share the Regional pool • Step 8: Create a VPC using the IPv6 CIDR • Step 9: Advertise the CIDR • Step 10: Cleanup Step 1: Create AWS CLI named profiles and IAM roles To complete this tutorial as a single AWS user, you can use AWS CLI named profiles to switch from one IAM role to another. Named profiles are collections of settings and credentials that you refer to when using the --profile option with the AWS CLI. For more information about how to create IAM roles and named profiles for AWS accounts, see Using an IAM role in the AWS CLI. Create one role and one named profile for each of the three AWS accounts you will use in this tutorial: • A profile called management-account for the AWS Organizations management account. • A profile called ipam-account for the AWS Organizations member account that is configured to be your IPAM administrator. BYOIP with AWS CLI only 224 Amazon Virtual Private Cloud IP Address Manager • A profile called member-account for the AWS Organizations member account in your organization which will allocate CIDRs from an IPAM pool. After you have created the IAM roles and named profiles, return to this page and go to the next step. You will notice throughout the rest of this tutorial that the sample AWS CLI commands use the --profile option with one of the named profiles to indicate which account must run the command. Step 2: Create an IPAM This step is optional. If you already have an IPAM created with operating Regions of us-east-1 and us-west-2 created, you can skip this step. Create an IPAM and specify an operating region of us-east-1 and us-west-2 . You must select an operating region so that you can use the locale option when you create your IPAM pool. The IPAM integration with BYOIP requires that the locale is set on whichever pool will be used for the BYOIP CIDR. This step must be done by the IPAM account. Run the following command: aws ec2 create-ipam --description my-ipam --region us-east-1 --operating- regions RegionName=us-west-2 --profile ipam-account In the output, you'll see the IPAM you've created. Note the value for PublicDefaultScopeId. You will need your public scope ID in the next step. { "Ipam": { "OwnerId": "123456789012", "IpamId": "ipam-090e48e75758de279", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "PublicDefaultScopeId": "ipam-scope-0087d83896280b594", "PrivateDefaultScopeId": "ipam-scope-08b70b04fbd524f8d", "ScopeCount": 2, "Description": "my-ipam", "OperatingRegions": [ { "RegionName": "us-east-1" }, { "RegionName": "us-west-2" BYOIP with AWS CLI only 225 Amazon Virtual Private Cloud IP Address Manager } ], "Tags": [] } } Step 3: Create an IPAM pool Since you are going to create a top-level IPAM pool with a Regional pool within it, and we’re going to allocate space to a resource (a VPC) from the Regional pool, you will set the locale on the Regional pool and not the top-level pool. You’ll add the locale to the Regional pool when you create the Regional pool in a later step. The IPAM integration with BYOIP requires that the locale is set on whichever pool will be used for the BYOIP CIDR. This step must be done by the IPAM account. Choose if you want this IPAM pool CIDR to be advertisable by AWS over the public internet (-- publicly-advertisable or --no-publicly-advertisable). Note Note that the scope ID must be the ID for the public scope and the address family must be ipv6. To create an IPv6 address pool for all of your AWS resources using the AWS CLI 1. Run the following command to create an IPAM pool. Use the ID of the public scope of the IPAM that you created in the previous step. aws ec2 create-ipam-pool --region us-east-1 --ipam-scope-id ipam- scope-0087d83896280b594 --description "top-level-IPv6-pool" --address- family ipv6 --publicly-advertisable --profile ipam-account In the output, you'll see create-in-progress, which indicates that pool creation is in progress. { "IpamPool": { BYOIP with AWS CLI only 226 Amazon Virtual Private Cloud IP Address Manager "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-07f2466c7158b50c4", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-07f2466c7158b50c4", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "Locale": "None", "PoolDepth": 1, "State": "create-in-progress", "Description": "top-level-Ipv6-pool", "AutoImport": false, "Advertisable": true, "AddressFamily": "ipv6", "Tags": [] } } 2. Run the following command until you see a state of create-complete in the output. aws ec2 describe-ipam-pools --region us-east-1 --profile ipam-account The following example output shows the state of the pool. { "IpamPool": { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-07f2466c7158b50c4", BYOIP with AWS CLI only 227 Amazon
vpc-ipam-080
vpc-ipam.pdf
80
that pool creation is in progress. { "IpamPool": { BYOIP with AWS CLI only 226 Amazon Virtual Private Cloud IP Address Manager "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-07f2466c7158b50c4", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-07f2466c7158b50c4", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "Locale": "None", "PoolDepth": 1, "State": "create-in-progress", "Description": "top-level-Ipv6-pool", "AutoImport": false, "Advertisable": true, "AddressFamily": "ipv6", "Tags": [] } } 2. Run the following command until you see a state of create-complete in the output. aws ec2 describe-ipam-pools --region us-east-1 --profile ipam-account The following example output shows the state of the pool. { "IpamPool": { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-07f2466c7158b50c4", BYOIP with AWS CLI only 227 Amazon Virtual Private Cloud IP Address Manager "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-07f2466c7158b50c4", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "Locale": "None", "PoolDepth": 1, "State": "create-complete", "Description": "top-level-Ipv6-pool", "AutoImport": false, "Advertisable": true, "AddressFamily": "ipv6", "Tags": [] } } Step 4: Provision a CIDR to the top-level pool Provision a CIDR block to the top-level pool. Note that when provisioning an IPv6 CIDR to a pool within the top-level pool, the most specific IPv6 address range that you can bring is /48 for CIDRs that are publicly advertisable and /60 for CIDRs that are not publicly advertisable. Note • If you verified your domain control with an X.509 certificate, you must include the CIDR and the BYOIP message and certificate signature that you created in that step so we can verify that you control the public space. BYOIP with AWS CLI only 228 Amazon Virtual Private Cloud IP Address Manager • If you verified your domain control with a DNS TXT record, you must include the CIDR and IPAM verification token that you created in that step so we can verify that you control the public space. You only need to verify domain control when you provision the BYOIP CIDR to the top-level pool. For the Regional pool within the top-level pool, you can omit the domain ownership option. This step must be done by the IPAM account. To provision a CIDR block to the pool using the AWS CLI 1. To provision the CIDR with certificate information, use the following command example. In addition to replacing the values as needed in the example, ensure that you replace Message and Signature values with the text_message and signed_message values that you got in Verify your domain with an X.509 certificate. aws ec2 provision-ipam-pool-cidr --region us-east-1 --ipam-pool-id ipam- pool-07f2466c7158b50c4 --cidr 2605:9cc0:409::/48 --verification-method remarks- x509 --cidr-authorization-context Message="1|aws|470889052444|2605:9cc0:409::/48| 20250101|SHA256|RSAPSS",Signature="FU26~vRG~NUGXa~akxd6dvdcCfvL88g8d~YAuai- CR7HqMwzcgdS9RlpBGtfIdsRGyr77LmWyWqU9Xp1g2R1kSkfD00NiLKLcv9F63k6wdEkyFxNp7RAJDvF1mBwxmSgH~Crt- Vp6LON3yOOXMp4JENB9uM7sMlu6oeoutGyyhXFeYPzlGSRdcdfKNKaimvPCqVsxGN5AwSilKQ8byNqoa~G3dvs8ueSaDcT~tW4CnILura70nyK4f2XzgPKKevAD1g8bpKmOFMbHS30CxduYknnDl75lvEJs1J91u3- wispI~r69fq515UR19TA~fmmxBDh1huQ8DkM1rqcwveWow__" --profile ipam-account To provision the CIDR with verification token information, use the following command example. In addition to replacing the values as needed in the example, ensure that you replace ipam-ext-res-ver-token-0309ce7f67a768cf0 with the IpamExternalResourceVerificationTokenId token ID that you got in Verify your domain with a DNS TXT record. aws ec2 provision-ipam-pool-cidr --region us-east-1 --ipam-pool-id ipam- pool-07f2466c7158b50c4 --cidr 2605:9cc0:409::/48 --verification-method dns-token --ipam-external-resource-verification-token-id ipam-ext-res-ver- token-0309ce7f67a768cf0 --profile ipam-account In the output, you'll see the CIDR pending provision. { BYOIP with AWS CLI only 229 Amazon Virtual Private Cloud IP Address Manager "IpamPoolCidr": { "Cidr": "2605:9cc0:409::/48", "State": "pending-provision" } } 2. Ensure that this CIDR has been provisioned before you continue. Important While most provisioning will be completed within two hours, it may take up to one week to complete the provisioning process for publicly advertisable ranges. Run the following command until you see a state of provisioned in the output. aws ec2 get-ipam-pool-cidrs --region us-east-1 --ipam-pool-id ipam- pool-07f2466c7158b50c4 --profile ipam-account The following example output shows the state. { "IpamPoolCidrs": [ { "Cidr": "2605:9cc0:409::/48", "State": "provisioned" } ] } Step 5: Create a Regional pool within the top-level pool Create a Regional pool within the top-level pool. --locale is required on the pool and it must be one of the operating Regions you configured when you created the IPAM. This step must be done by the IPAM account. BYOIP with AWS CLI only 230 Amazon Virtual Private Cloud IP Address Manager Important When you create the pool, you must include --aws-service ec2. The service you select determines the AWS service where the CIDR will be advertisable. Currently, the only option is ec2, which means that the CIDRs allocated from this pool will be advertisable for the Amazon EC2 service and the Amazon VPC service (for CIDRs associated with VPCs). To create a Regional pool using the AWS CLI 1. Run the following command to create the pool. aws ec2 create-ipam-pool --description "Regional-IPv6-pool" --region us-east-1 --ipam-scope-id ipam-scope-0087d83896280b594 --source-ipam-pool-id ipam- pool-07f2466c7158b50c4 --locale us-west-2 --address-family ipv6 --aws-service ec2 --profile ipam-account In the output, you'll see IPAM creating the pool. { "IpamPool": { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0053b7d2b4fc3f730", "SourceIpamPoolId": "ipam-pool-07f2466c7158b50c4", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0053b7d2b4fc3f730", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "Locale": "us-west-2", "PoolDepth": 2, "State": "create-in-progress", "Description": "reg-ipv6-pool", "AutoImport": false, "Advertisable": true, "AddressFamily": "ipv6", "Tags": [], "ServiceType": "ec2" } } BYOIP with AWS CLI only 231 Amazon Virtual Private Cloud IP Address Manager 2. Run the
vpc-ipam-081
vpc-ipam.pdf
81
a Regional pool using the AWS CLI 1. Run the following command to create the pool. aws ec2 create-ipam-pool --description "Regional-IPv6-pool" --region us-east-1 --ipam-scope-id ipam-scope-0087d83896280b594 --source-ipam-pool-id ipam- pool-07f2466c7158b50c4 --locale us-west-2 --address-family ipv6 --aws-service ec2 --profile ipam-account In the output, you'll see IPAM creating the pool. { "IpamPool": { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0053b7d2b4fc3f730", "SourceIpamPoolId": "ipam-pool-07f2466c7158b50c4", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0053b7d2b4fc3f730", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "Locale": "us-west-2", "PoolDepth": 2, "State": "create-in-progress", "Description": "reg-ipv6-pool", "AutoImport": false, "Advertisable": true, "AddressFamily": "ipv6", "Tags": [], "ServiceType": "ec2" } } BYOIP with AWS CLI only 231 Amazon Virtual Private Cloud IP Address Manager 2. Run the following command until you see a state of create-complete in the output. aws ec2 describe-ipam-pools --region us-east-1 --profile ipam-account In the output, you see the pools that you have in your IPAM. In this tutorial, we created a top- level and a Regional pool, so you'll see them both. Step 6: Provision a CIDR to the Regional pool Provision a CIDR block to the Regional pool. Note that when provisioning the CIDR to a pool within the top-level pool, the most specific IPv6 address range that you can bring is /48 for CIDRs that are publicly advertisable and /60 for CIDRs that are not publicly advertisable. This step must be done by the IPAM account. To assign a CIDR block to the Regional pool using the AWS CLI 1. Run the following command to provision the CIDR. aws ec2 provision-ipam-pool-cidr --region us-east-1 --ipam-pool-id ipam- pool-0053b7d2b4fc3f730 --cidr 2605:9cc0:409::/48 --profile ipam-account In the output, you'll see the CIDR pending provision. { "IpamPoolCidr": { "Cidr": "2605:9cc0:409::/48", "State": "pending-provision" } } 2. Run the following command until you see the state of provisioned in the output. aws ec2 get-ipam-pool-cidrs --region us-east-1 --ipam-pool-id ipam- pool-0053b7d2b4fc3f730 --profile ipam-account The following example output shows the correct state. { "IpamPoolCidrs": [ BYOIP with AWS CLI only 232 Amazon Virtual Private Cloud IP Address Manager { "Cidr": "2605:9cc0:409::/48", "State": "provisioned" } ] } Step 7. Share the Regional pool Follow the steps in this section to share the IPAM pool using AWS Resource Access Manager (RAM). Enable resource sharing in AWS RAM After you create your IPAM, you’ll want to share the regional pool with other accounts in your organization. Before you share an IPAM pool, complete the steps in this section to enable resource sharing with AWS RAM. If you are using the AWS CLI to enable resource sharing, use the -- profile management-account option. To enable resource sharing 1. Using the AWS Organizations management account, open the AWS RAM console at https:// console.aws.amazon.com/ram/. 2. In the left navigation pane, choose Settings, choose Enable sharing with AWS Organizations, and then choose Save settings. You can now share an IPAM pool with other members of the organization. Share an IPAM pool using AWS RAM In this section you’ll share the regional pool with another AWS Organizations member account. For complete instructions on sharing IPAM pools, including information on the required IAM permissions, see Share an IPAM pool using AWS RAM. If you are using the AWS CLI to enable resource sharing, use the --profile ipam-account option. To share an IPAM pool using AWS RAM 1. Using the IPAM admin account, open the IPAM console at https://console.aws.amazon.com/ ipam/. 2. In the navigation pane, choose Pools. BYOIP with AWS CLI only 233 Amazon Virtual Private Cloud IP Address Manager 3. Choose the private scope, choose the IPAM pool, and choose Actions > View details. 4. Under Resource sharing, choose Create resource share. The AWS RAM console opens. You share the pool using AWS RAM. 5. Choose Create a resource share. 6. In the AWS RAM console, choose Create a resource share again. 7. Add a Name for the shared pool. 8. Under Select resource type, choose IPAM pools, and then choose the ARN of the pool you want to share. 9. Choose Next. 10. Choose the AWSRAMPermissionIpamPoolByoipCidrImport permission. The details of the permission options are out of scope for this tutorial, but you can find out more about these options in Share an IPAM pool using AWS RAM. 11. Choose Next. 12. Under Principals > Select principal type, choose AWS account and enter the account ID of the account that will be bringing an IP address range to IPAM and choose Add . 13. Choose Next. 14. Review the resource share options and the principals that you’ll be sharing with, and then choose Create. 15. To allow the member-account account to allocate IP address CIDRS from the IPAM pool, create a second resource share with AWSRAMDefaultPermissionsIpamPool. The value for --resource-arns is the ARN of the IPAM pool that you created in the previous section. The value for --principals is the account ID of the member-account. The value for -- permission-arns is the ARN of the AWSRAMDefaultPermissionsIpamPool permission. Step 8: Create a
vpc-ipam-082
vpc-ipam.pdf
82
be bringing an IP address range to IPAM and choose Add . 13. Choose Next. 14. Review the resource share options and the principals that you’ll be sharing with, and then choose Create. 15. To allow the member-account account to allocate IP address CIDRS from the IPAM pool, create a second resource share with AWSRAMDefaultPermissionsIpamPool. The value for --resource-arns is the ARN of the IPAM pool that you created in the previous section. The value for --principals is the account ID of the member-account. The value for -- permission-arns is the ARN of the AWSRAMDefaultPermissionsIpamPool permission. Step 8: Create a VPC using the IPv6 CIDR Create a VPC using the IPAM pool ID. You must associate an IPv4 CIDR block to the VPC as well using the --cidr-block option or the request will fail. When you run the command in this section, the value for --region must match the --locale option you entered when you created the pool that will be used for the BYOIP CIDR. This step must be done by the member account. BYOIP with AWS CLI only 234 Amazon Virtual Private Cloud IP Address Manager To create a VPC with the IPv6 CIDR using the AWS CLI 1. Run the following command to provision the CIDR. aws ec2 create-vpc --region us-west-2 --ipv6-ipam-pool-id ipam- pool-0053b7d2b4fc3f730 --cidr-block 10.0.0.0/16 --ipv6-netmask-length 56 -- profile member-account In the output, you'll see the VPC being created. { "Vpc": { "CidrBlock": "10.0.0.0/16", "DhcpOptionsId": "dopt-2afccf50", "State": "pending", "VpcId": "vpc-00b5573ffc3b31a29", "OwnerId": "123456789012", "InstanceTenancy": "default", "Ipv6CidrBlockAssociationSet": [ { "AssociationId": "vpc-cidr-assoc-01b5703d6cc695b5b", "Ipv6CidrBlock": "2605:9cc0:409::/56", "Ipv6CidrBlockState": { "State": "associating" }, "NetworkBorderGroup": "us-east-1", "Ipv6Pool": "ipam-pool-0053b7d2b4fc3f730" } ], "CidrBlockAssociationSet": [ { "AssociationId": "vpc-cidr-assoc-09cccb07d4e9a0e0e", "CidrBlock": "10.0.0.0/16", "CidrBlockState": { "State": "associated" } } ], "IsDefault": false } } 2. View the VPC allocation in IPAM. BYOIP with AWS CLI only 235 Amazon Virtual Private Cloud IP Address Manager aws ec2 get-ipam-pool-allocations --region us-west-2 --ipam-pool-id ipam- pool-0053b7d2b4fc3f730 --profile ipam-account In the output, you'll see allocation in IPAM. { "IpamPoolAllocations": [ { "Cidr": "2605:9cc0:409::/56", "IpamPoolAllocationId": "ipam-pool- alloc-5f8db726fb9e4ff0a33836e649283a52", "ResourceId": "vpc-00b5573ffc3b31a29", "ResourceType": "vpc", "ResourceOwner": "123456789012" } ] } Step 9: Advertise the CIDR Once you create the VPC with CIDR allocated in IPAM, you can then start advertising the CIDR you brought to AWS that is in pool that has --aws-service ec2 defined. In this tutorial, that's your Regional pool. By default the CIDR is not advertised, which means it's not publicly accessible over the internet. When you run the command in this section, the value for --region must match the --locale option you entered when you created the Regional pool that will be used for the BYOIP CIDR. This step must be done by the IPAM account. Start advertising the CIDR using the AWS CLI • Run the following command to advertise the CIDR. aws ec2 advertise-byoip-cidr --region us-west-2 --cidr 2605:9cc0:409::/48 -- profile ipam-account In the output, you'll see the CIDR is advertised. { BYOIP with AWS CLI only 236 Amazon Virtual Private Cloud IP Address Manager "ByoipCidr": { "Cidr": "2605:9cc0:409::/48", "State": "advertised" } } Step 10: Cleanup Follow the steps in this section to clean up the resources you've provisioned and created in this tutorial. When you run the commands in this section, the value for --region must match the -- locale option you entered when you created the Regional pool that will be used for the BYOIP CIDR. Clean up using the AWS CLI 1. Run the following command to view the VPC allocation managed in IPAM. This step must be done by the IPAM account. aws ec2 get-ipam-pool-allocations --region us-west-2 --ipam-pool-id ipam- pool-0053b7d2b4fc3f730 --profile ipam-account The output shows the allocation in IPAM. { "IpamPoolAllocations": [ { "Cidr": "2605:9cc0:409::/56", "IpamPoolAllocationId": "ipam-pool- alloc-5f8db726fb9e4ff0a33836e649283a52", "ResourceId": "vpc-00b5573ffc3b31a29", "ResourceType": "vpc", "ResourceOwner": "123456789012" } ] } 2. Run the following command to stop advertising the CIDR. When you run the command in this step, the value for --region must match the --locale option you entered when you created the Regional pool that will be used for the BYOIP CIDR. BYOIP with AWS CLI only 237 Amazon Virtual Private Cloud IP Address Manager This step must be done by the IPAM account. aws ec2 withdraw-byoip-cidr --region us-west-2 --cidr 2605:9cc0:409::/48 -- profile ipam-account In the output, you'll see the CIDR State has changed from advertised to provisioned. { "ByoipCidr": { "Cidr": "2605:9cc0:409::/48", "State": "provisioned" } } 3. Run the following command to delete the VPC. When you run the command in this section, the value for --region must match the --locale option you entered when you created the Regional pool that will be used for the BYOIP CIDR. This step must be done by the member account. aws ec2 delete-vpc --region us-west-2 --vpc-id vpc-00b5573ffc3b31a29 -- profile member-account You will not see any output when you run this command. 4. Run the following command to view the VPC allocation in IPAM. It can
vpc-ipam-083
vpc-ipam.pdf
83
changed from advertised to provisioned. { "ByoipCidr": { "Cidr": "2605:9cc0:409::/48", "State": "provisioned" } } 3. Run the following command to delete the VPC. When you run the command in this section, the value for --region must match the --locale option you entered when you created the Regional pool that will be used for the BYOIP CIDR. This step must be done by the member account. aws ec2 delete-vpc --region us-west-2 --vpc-id vpc-00b5573ffc3b31a29 -- profile member-account You will not see any output when you run this command. 4. Run the following command to view the VPC allocation in IPAM. It can take some time for IPAM to discover that the VPC has been deleted and remove this allocation. When you run the commands in this section, the value for --region must match the --locale option you entered when you created the Regional pool that will be used for the BYOIP CIDR. This step must be done by the IPAM account. aws ec2 get-ipam-pool-allocations --region us-west-2 --ipam-pool-id ipam- pool-0053b7d2b4fc3f730 --profile ipam-account The output shows the allocation in IPAM. { "IpamPoolAllocations": [ BYOIP with AWS CLI only 238 Amazon Virtual Private Cloud IP Address Manager { "Cidr": "2605:9cc0:409::/56", "IpamPoolAllocationId": "ipam-pool- alloc-5f8db726fb9e4ff0a33836e649283a52", "ResourceId": "vpc-00b5573ffc3b31a29", "ResourceType": "vpc", "ResourceOwner": "123456789012" } ] } Rerun the command and look for the allocation to be removed. You cannot continue to clean up and deprovision the IPAM pool CIDR until you see that the allocation has been removed from IPAM. aws ec2 get-ipam-pool-allocations --region us-west-2 --ipam-pool-id ipam- pool-0053b7d2b4fc3f730 --profile ipam-account The output shows the allocation removed from IPAM. { "IpamPoolAllocations": [] } 5. Delete the RAM shares and disable RAM integration with AWS Organizations. Complete the steps in Deleting a resource share in AWS RAM and Disabling resource sharing with AWS Organizations in the AWS RAM User Guide, in that order, to delete the RAM shares and disable RAM integration with AWS Organizations. This step must be done by the IPAM account and management account respectively. If you are using the AWS CLI to delete the RAM shares and disable RAM integration, use the -- profile ipam-account and --profile management-account options. 6. Run the following command to deprovision the Regional pool CIDR. BYOIP with AWS CLI only 239 Amazon Virtual Private Cloud IP Address Manager This step must be done by the IPAM account. aws ec2 deprovision-ipam-pool-cidr --region us-east-1 --ipam-pool-id ipam- pool-0053b7d2b4fc3f730 --cidr 2605:9cc0:409::/48 --profile ipam-account In the output, you'll see the CIDR pending deprovision. { "IpamPoolCidr": { "Cidr": "2605:9cc0:409::/48", "State": "pending-deprovision" } } Deprovisioning takes time to complete. Continue to run the command until you see the CIDR state deprovisioned. aws ec2 get-ipam-pool-cidrs --region us-east-1 --ipam-pool-id ipam- pool-0053b7d2b4fc3f730 --cidr 2605:9cc0:409::/48 --profile ipam-account In the output, you'll see the CIDR pending deprovision. { "IpamPoolCidr": { "Cidr": "2605:9cc0:409::/48", "State": "deprovisioned" } } 7. Run the following command to delete the Regional pool. This step must be done by the IPAM account. aws ec2 delete-ipam-pool --region us-east-1 --ipam-pool-id ipam- pool-0053b7d2b4fc3f730 --profile ipam-account In the output, you can see the delete state. { BYOIP with AWS CLI only 240 Amazon Virtual Private Cloud "IpamPool": { IP Address Manager "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0053b7d2b4fc3f730", "SourceIpamPoolId": "ipam-pool-07f2466c7158b50c4", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0053b7d2b4fc3f730", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "Locale": "us-east-1", "PoolDepth": 2, "State": "delete-in-progress", "Description": "reg-ipv6-pool", "AutoImport": false, "Advertisable": true, "AddressFamily": "ipv6" } } 8. Run the following command to deprovision the top-level pool CIDR. This step must be done by the IPAM account. aws ec2 deprovision-ipam-pool-cidr --region us-east-1 --ipam-pool-id ipam- pool-07f2466c7158b50c4 --cidr 2605:9cc0:409::/48 --profile ipam-account In the output, you'll see the CIDR pending deprovision. { "IpamPoolCidr": { "Cidr": "2605:9cc0:409::/48", "State": "pending-deprovision" } } Deprovisioning takes time to complete. Run the following command to check the status of deprovisioning. aws ec2 get-ipam-pool-cidrs --region us-east-1 --ipam-pool-id ipam- pool-07f2466c7158b50c4 --profile ipam-account BYOIP with AWS CLI only 241 Amazon Virtual Private Cloud IP Address Manager Wait until you see deprovisioned before you continue to the next step. { "IpamPoolCidr": { "Cidr": "2605:9cc0:409::/48", "State": "deprovisioned" } } 9. Run the following command to delete the top-level pool. This step must be done by the IPAM account. aws ec2 delete-ipam-pool --region us-east-1 --ipam-pool-id ipam- pool-07f2466c7158b50c4 --profile ipam-account In the output, you can see the delete state. { "IpamPool": { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0053b7d2b4fc3f730", "SourceIpamPoolId": "ipam-pool-07f2466c7158b50c4", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0053b7d2b4fc3f730", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "Locale": "us-east-1", "PoolDepth": 2, "State": "delete-in-progress", "Description": "reg-ipv6-pool", "AutoImport": false, "Advertisable": true, "AddressFamily": "ipv6" } BYOIP with AWS CLI only 242 Amazon Virtual Private Cloud } 10. Run the following command to delete the IPAM. This step must be done by the IPAM account. IP Address Manager aws ec2 delete-ipam --region us-east-1 --ipam-id ipam-090e48e75758de279 -- profile ipam-account In the output, you'll see the IPAM response. This means that the IPAM was deleted. { "Ipam": { "OwnerId": "123456789012", "IpamId": "ipam-090e48e75758de279", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "PublicDefaultScopeId": "ipam-scope-0087d83896280b594", "PrivateDefaultScopeId": "ipam-scope-08b70b04fbd524f8d", "ScopeCount":
vpc-ipam-084
vpc-ipam.pdf
84
"IpamPoolId": "ipam-pool-0053b7d2b4fc3f730", "SourceIpamPoolId": "ipam-pool-07f2466c7158b50c4", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0053b7d2b4fc3f730", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "Locale": "us-east-1", "PoolDepth": 2, "State": "delete-in-progress", "Description": "reg-ipv6-pool", "AutoImport": false, "Advertisable": true, "AddressFamily": "ipv6" } BYOIP with AWS CLI only 242 Amazon Virtual Private Cloud } 10. Run the following command to delete the IPAM. This step must be done by the IPAM account. IP Address Manager aws ec2 delete-ipam --region us-east-1 --ipam-id ipam-090e48e75758de279 -- profile ipam-account In the output, you'll see the IPAM response. This means that the IPAM was deleted. { "Ipam": { "OwnerId": "123456789012", "IpamId": "ipam-090e48e75758de279", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "PublicDefaultScopeId": "ipam-scope-0087d83896280b594", "PrivateDefaultScopeId": "ipam-scope-08b70b04fbd524f8d", "ScopeCount": 2, "OperatingRegions": [ { "RegionName": "us-east-1" }, { "RegionName": "us-west-2" } ] } } Tutorial: Transfer a BYOIP IPv4 CIDR to IPAM Follow these steps to transfer an existing IPv4 CIDR to IPAM. If you already have an IPv4 BYOIP CIDR with AWS, you can move the CIDR to IPAM from a public IPv4 pool. You cannot move an IPv6 CIDR to IPAM. This tutorial assumes you have already successfully brought an IP address range to AWS using the process described in Bring your own IP addresses (BYOIP) in Amazon EC2 and now you want to Transfer a BYOIP IPv4 CIDR to IPAM 243 Amazon Virtual Private Cloud IP Address Manager transfer that IP address range to IPAM. If you are bringing a new IP address to AWS for the first time, complete the steps in Tutorial: Bring your IP addresses to IPAM. If you transfer a public IPv4 pool to IPAM, there is no impact on existing allocations. Once you transfer a public IPv4 pool to IPAM, depending on the resource type, you may be able to monitor the existing allocations. For more information, see Monitor CIDR usage by resource. Note • This tutorial assumes you have already completed the steps in Create an IPAM. • Each step of this tutorial must be done by one of two AWS accounts: • The account for the IPAM administrator. In this tutorial, this account will be called the IPAM account. • The account in your organization which owns the BYOIP CIDR. In this tutorial, this account will be called the BYOIP CIDR owner account. Contents • Step 1: Create AWS CLI named profiles and IAM roles • Step 2: Get your IPAM’s public scope ID • Step 3: Create an IPAM pool • Step 4: Share the IPAM pool using AWS RAM • Step 5: Transfer an existing BYOIP IPV4 CIDR to IPAM • Step 6: View the CIDR in IPAM • Step 7: Cleanup Step 1: Create AWS CLI named profiles and IAM roles To complete this tutorial as a single AWS user, you can use AWS CLI named profiles to switch from one IAM role to another. Named profiles are collections of settings and credentials that you refer to when using the --profile option with the AWS CLI. For more information about how to create IAM roles and named profiles for AWS accounts, see Using an IAM role in the AWS CLI. Create one role and one named profile for each of the three AWS accounts you will use in this tutorial: Step 1: Create AWS CLI named profiles and IAM roles 244 Amazon Virtual Private Cloud IP Address Manager • A profile called ipam-account for the AWS account that is the IPAM administrator. • A profile called byoip-owner-account for the AWS account in your organization which owns the BYOIP CIDR. After you have created the IAM roles and named profiles, return to this page and go to the next step. You will notice throughout the rest of this tutorial that the sample AWS CLI commands use the --profile option with one of the named profiles to indicate which account must run the command. Step 2: Get your IPAM’s public scope ID Follow the steps in this section to get your IPAM’s public scope ID. This step should be performed by the ipam-account account. Run the following command to get your public scope ID. aws ec2 describe-ipams --region us-east-1 --profile ipam-account In the output, you'll see your public scope ID. Note the values for PublicDefaultScopeId. You will need it in the next step. { "Ipams": [ { "OwnerId": "123456789012", "IpamId": "ipam-090e48e75758de279", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "PublicDefaultScopeId": "ipam-scope-0087d83896280b594", "PrivateDefaultScopeId": "ipam-scope-08b70b04fbd524f8d", "ScopeCount": 2, "Description": "my-ipam", "OperatingRegions": [ { "RegionName": "us-east-1" }, { "RegionName": "us-west-2" } ], "Tags": [] Step 2: Get your IPAM’s public scope ID 245 Amazon Virtual Private Cloud IP Address Manager } ] } Step 3: Create an IPAM pool Follow the steps in this section to create an IPAM pool. This step should be performed by the ipam-account account. The IPAM pool you create must be a top-level pool with the --locale option matching the BYOIP CIDR AWS Region. You can only transfer a BYOIP to a top-level IPAM
vpc-ipam-085
vpc-ipam.pdf
85
"IpamId": "ipam-090e48e75758de279", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "PublicDefaultScopeId": "ipam-scope-0087d83896280b594", "PrivateDefaultScopeId": "ipam-scope-08b70b04fbd524f8d", "ScopeCount": 2, "Description": "my-ipam", "OperatingRegions": [ { "RegionName": "us-east-1" }, { "RegionName": "us-west-2" } ], "Tags": [] Step 2: Get your IPAM’s public scope ID 245 Amazon Virtual Private Cloud IP Address Manager } ] } Step 3: Create an IPAM pool Follow the steps in this section to create an IPAM pool. This step should be performed by the ipam-account account. The IPAM pool you create must be a top-level pool with the --locale option matching the BYOIP CIDR AWS Region. You can only transfer a BYOIP to a top-level IPAM pool. Important When you create the pool, you must include --aws-service ec2. The service you select determines the AWS service where the CIDR will be advertisable. Currently, the only option is ec2, which means that the CIDRs allocated from this pool will be advertisable for the Amazon EC2 service (for Elastic IP addresses) and the Amazon VPC service (for CIDRs associated with VPCs). To create an IPv4 address pool for the transferred BYOIP CIDR using the AWS CLI 1. Run the following command to create an IPAM pool. Use the ID of the public scope of the IPAM that you retrieved in the previous step. aws ec2 create-ipam-pool --region us-east-1 --profile ipam-account --ipam-scope- id ipam-scope-0087d83896280b594 --description "top-level-pool" --locale us-west-2 --aws-service ec2 --address-family ipv4 In the output, you'll see create-in-progress, which indicates that pool creation is in progress. { "IpamPool": { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0a03d430ca3f5c035", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0a03d430ca3f5c035", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", Step 3: Create an IPAM pool 246 Amazon Virtual Private Cloud IP Address Manager "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "Locale": "us-west-2", "PoolDepth": 1, "State": "create-in-progress", "Description": "top-level-pool", "AutoImport": false, "AddressFamily": "ipv4", "Tags": [], "AwsService": "ec2" } } 2. Run the following command until you see a state of create-complete in the output. aws ec2 describe-ipam-pools --region us-east-1 --profile ipam-account The following example output shows the state of the pool. You will need the OwnerId in the next step. { "IpamPools": [ { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0a03d430ca3f5c035", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0a03d430ca3f5c035", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "Locale": "us-west-2", "PoolDepth": 1, "State": "create-complete", "Description": "top-level-pool", "AutoImport": false, "AddressFamily": "ipv4", "Tags": [], "AwsService": "ec2" } ] } Step 3: Create an IPAM pool 247 Amazon Virtual Private Cloud IP Address Manager Step 4: Share the IPAM pool using AWS RAM Follow the steps in this section to share an IPAM pool using AWS RAM so that another AWS account can transfer an existing BYOIP IPV4 CIDR to the IPAM pool and use the IPAM pool. This step should be performed by the ipam-account account. To share an IPv4 address pool using the AWS CLI 1. View the AWS RAM permissions available for IPAM pools. You need both ARNs to complete the steps in this section. aws ram list-permissions --region us-east-1 --profile ipam-account --resource-type ec2:IpamPool { "permissions": [ { "arn": "arn:aws:ram::aws:permission/AWSRAMDefaultPermissionsIpamPool", "version": "1", "defaultVersion": true, "name": "AWSRAMDefaultPermissionsIpamPool", "resourceType": "ec2:IpamPool", "status": "ATTACHABLE", "creationTime": "2022-06-30T13:04:29.335000-07:00", "lastUpdatedTime": "2022-06-30T13:04:29.335000-07:00", "isResourceTypeDefault": true }, { "arn": "arn:aws:ram::aws:permission/ AWSRAMPermissionIpamPoolByoipCidrImport", "version": "1", "defaultVersion": true, "name": "AWSRAMPermissionIpamPoolByoipCidrImport", "resourceType": "ec2:IpamPool", "status": "ATTACHABLE", "creationTime": "2022-06-30T13:03:55.032000-07:00", "lastUpdatedTime": "2022-06-30T13:03:55.032000-07:00", "isResourceTypeDefault": false } ] } Step 4: Share the IPAM pool using AWS RAM 248 Amazon Virtual Private Cloud IP Address Manager 2. Create a resource share to enable the byoip-owner-account account to import BYOIP CIDRs to IPAM. The value for --resource-arns is the ARN of the IPAM pool that you created in the previous section. The value for --principals is the account ID of the BYOIP CIDR owner account. The value for --permission-arns is the ARN of the AWSRAMPermissionIpamPoolByoipCidrImport permission. aws ram create-resource-share --region us-east-1 --profile ipam-account --name PoolShare2 --resource-arns arn:aws:ec2::123456789012:ipam-pool/ ipam-pool-0a03d430ca3f5c035 --principals 111122223333 --permission-arns arn:aws:ram::aws:permission/AWSRAMPermissionIpamPoolByoipCidrImport { "resourceShare": { "resourceShareArn": "arn:aws:ram:us-east-1:123456789012:resource- share/7993758c-a4ea-43ad-be12-b3abaffe361a", "name": "PoolShare2", "owningAccountId": "123456789012", "allowExternalPrincipals": true, "status": "ACTIVE", "creationTime": "2023-04-28T07:32:25.536000-07:00", "lastUpdatedTime": "2023-04-28T07:32:25.536000-07:00" } } 3. (Optional) If you want to allow the byoip-owner-account account to allocate IP address CIDRS from the IPAM pool to public IPv4 pools after the transfer is complete, copy the ARN for AWSRAMDefaultPermissionsIpamPool and create a second resource share. The value for --resource-arns is the ARN of the IPAM pool that you created in the previous section. The value for --principals is the account ID of the BYOIP CIDR owner account. The value for -- permission-arns is the ARN of the AWSRAMDefaultPermissionsIpamPool permission. Step 4: Share the IPAM pool using AWS RAM 249 Amazon Virtual Private Cloud IP Address Manager aws ram create-resource-share --region us-east-1 --profile ipam-account --name PoolShare1 --resource-arns arn:aws:ec2::123456789012:ipam-pool/ ipam-pool-0a03d430ca3f5c035 --principals 111122223333 --permission-arns arn:aws:ram::aws:permission/AWSRAMDefaultPermissionsIpamPool { "resourceShare": { "resourceShareArn": "arn:aws:ram:us-east-1:123456789012:resource- share/8d1e229b-2830-4cf4-8b10-19c889235a2f", "name": "PoolShare1", "owningAccountId": "123456789012", "allowExternalPrincipals": true, "status": "ACTIVE", "creationTime": "2023-04-28T07:31:25.536000-07:00", "lastUpdatedTime": "2023-04-28T07:31:25.536000-07:00" } } As a result of creating the resource share in RAM, the byoip-owner-account account can now move CIDRs to IPAM. Step 5: Transfer an existing BYOIP IPV4 CIDR to IPAM Follow the steps in this section
vpc-ipam-086
vpc-ipam.pdf
86
The value for -- permission-arns is the ARN of the AWSRAMDefaultPermissionsIpamPool permission. Step 4: Share the IPAM pool using AWS RAM 249 Amazon Virtual Private Cloud IP Address Manager aws ram create-resource-share --region us-east-1 --profile ipam-account --name PoolShare1 --resource-arns arn:aws:ec2::123456789012:ipam-pool/ ipam-pool-0a03d430ca3f5c035 --principals 111122223333 --permission-arns arn:aws:ram::aws:permission/AWSRAMDefaultPermissionsIpamPool { "resourceShare": { "resourceShareArn": "arn:aws:ram:us-east-1:123456789012:resource- share/8d1e229b-2830-4cf4-8b10-19c889235a2f", "name": "PoolShare1", "owningAccountId": "123456789012", "allowExternalPrincipals": true, "status": "ACTIVE", "creationTime": "2023-04-28T07:31:25.536000-07:00", "lastUpdatedTime": "2023-04-28T07:31:25.536000-07:00" } } As a result of creating the resource share in RAM, the byoip-owner-account account can now move CIDRs to IPAM. Step 5: Transfer an existing BYOIP IPV4 CIDR to IPAM Follow the steps in this section to transfer an existing BYOIP IPV4 CIDR to IPAM. This step should be performed by the byoip-owner-account account. Step 5: Transfer an existing BYOIP IPV4 CIDR to IPAM 250 Amazon Virtual Private Cloud IP Address Manager Important Once you bring an IPv4 address range to AWS, you can use all of the IP addresses in the range, including the first address (the network address) and the last address (the broadcast address). To transfer the BYOIP CIDR to IPAM, the BYOIP CIDR owner must have these permissions in their IAM policy: • ec2:MoveByoipCidrToIpam • ec2:ImportByoipCidrToIpam Note You can use either the AWS Management Console or the AWS CLI for this step. AWS Management Console To transfer a BYOIP CIDR to the IPAM pool: 1. Open the IPAM console at https://console.aws.amazon.com/ipam/ as the byoip-owner- account account. 2. In the navigation pane, choose Pools. 3. Choose the top-level pool created and shared in this tutorial. 4. Choose Actions > Transfer BYOIP CIDR. 5. Choose Transfer BYOIP CIDR. 6. Choose your BYOIP CIDR. 7. Choose Provision. Command line Use the following AWS CLI commands transfer a BYOIP CIDR to the IPAM pool using the AWS CLI: Step 5: Transfer an existing BYOIP IPV4 CIDR to IPAM 251 Amazon Virtual Private Cloud IP Address Manager 1. Run the following command to transfer the CIDR. Ensure that the --region value is the AWS Region of the BYOIP CIDR. aws ec2 move-byoip-cidr-to-ipam --region us-west-2 --profile byoip-owner-account --ipam-pool-id ipam-pool-0a03d430ca3f5c035 --ipam-pool-owner 123456789012 -- cidr 130.137.249.0/24 In the output, you'll see the CIDR pending provision. { "ByoipCidr": { "Cidr": "130.137.249.0/24", "State": "pending-transfer" } } 2. Ensure that the CIDR has been transferred. Run the following command until you see a state of complete-transfer in the output. aws ec2 move-byoip-cidr-to-ipam --region us-west-2 --profile byoip- owner-account --ipam-pool-id ipam-pool-0a03d430ca3f5c035 --ipam-pool- owner 123456789012 --cidr 130.137.249.0/24 The following example output shows the state. { "ByoipCidr": { "Cidr": "130.137.249.0/24", "State": "complete-transfer" } } Step 5: Transfer an existing BYOIP IPV4 CIDR to IPAM 252 Amazon Virtual Private Cloud IP Address Manager Step 6: View the CIDR in IPAM Follow the steps in this section to view the CIDR in IPAM. This step should be performed by the ipam-account account. To view the transferred BYOIP CIDR in IPAM pool using the AWS CLI • Run the following command to view the allocation managed in IPAM. Ensure that the -- region value is the AWS Region of the BYOIP CIDR. aws ec2 get-ipam-pool-allocations --region us-west-2 --profile ipam-account -- ipam-pool-id ipam-pool-0d8f3646b61ca5987 The output shows the allocation in IPAM. { "IpamPoolAllocations": [ { "Cidr": "130.137.249.0/24", "IpamPoolAllocationId": "ipam-pool- alloc-5dedc8e7937c4261b56dc3e3eb53dc46", "ResourceId": "ipv4pool-ec2-0019eed22a684e0b3", "ResourceType": "ec2-public-ipv4-pool", "ResourceOwner": "111122223333" } ] } Step 7: Cleanup Follow the steps in this section to remove the resources you created in this tutorial. This step should be performed by the ipam-account account. To cleanup the resources created in this tutorial using the AWS CLI 1. To delete the IPAM pool shared resource, run the following command to get the first resource share ARN: Step 6: View the CIDR in IPAM 253 Amazon Virtual Private Cloud IP Address Manager aws ram get-resource-shares --region us-east-1 --profile ipam-account -- name PoolShare1 --resource-owner SELF { "resourceShares": [ { "resourceShareArn": "arn:aws:ram:us-east-1:123456789012:resource- share/8d1e229b-2830-4cf4-8b10-19c889235a2f", "name": "PoolShare1", "owningAccountId": "123456789012", "allowExternalPrincipals": true, "status": "ACTIVE", "creationTime": "2023-04-28T07:31:25.536000-07:00", "lastUpdatedTime": "2023-04-28T07:31:25.536000-07:00", "featureSet": "STANDARD" } ] } 2. Copy the resource share ARN and use it to delete the IPAM pool resource share. aws ram delete-resource-share --region us-east-1 --profile ipam-account --resource-share-arn arn:aws:ram:us-east-1:123456789012:resource- share/8d1e229b-2830-4cf4-8b10-19c889235a2f { "returnValue": true } 3. If you created an additional resource share in Step 4: Share the IPAM pool using AWS RAM, repeat the previous two steps to get the second resource share ARN for PoolShare2 and delete the second resource share. 4. Run the following command to get the allocation ID for the BYOIP CIDR. Ensure that the -- region value matches the AWS Region of the BYOIP CIDR. aws ec2 get-ipam-pool-allocations --region us-west-2 --profile ipam-account -- ipam-pool-id ipam-pool-0d8f3646b61ca5987 The output shows the allocation in IPAM. Step 7: Cleanup 254 Amazon Virtual Private Cloud IP Address Manager { "IpamPoolAllocations": [ { "Cidr": "130.137.249.0/24", "IpamPoolAllocationId": "ipam-pool- alloc-5dedc8e7937c4261b56dc3e3eb53dc46", "ResourceId": "ipv4pool-ec2-0019eed22a684e0b3", "ResourceType": "ec2-public-ipv4-pool", "ResourceOwner": "111122223333" } ] } 5. Release the last IP address in the CIDR from the public
vpc-ipam-087
vpc-ipam.pdf
87
get the second resource share ARN for PoolShare2 and delete the second resource share. 4. Run the following command to get the allocation ID for the BYOIP CIDR. Ensure that the -- region value matches the AWS Region of the BYOIP CIDR. aws ec2 get-ipam-pool-allocations --region us-west-2 --profile ipam-account -- ipam-pool-id ipam-pool-0d8f3646b61ca5987 The output shows the allocation in IPAM. Step 7: Cleanup 254 Amazon Virtual Private Cloud IP Address Manager { "IpamPoolAllocations": [ { "Cidr": "130.137.249.0/24", "IpamPoolAllocationId": "ipam-pool- alloc-5dedc8e7937c4261b56dc3e3eb53dc46", "ResourceId": "ipv4pool-ec2-0019eed22a684e0b3", "ResourceType": "ec2-public-ipv4-pool", "ResourceOwner": "111122223333" } ] } 5. Release the last IP address in the CIDR from the public IPv4 pool. Enter the IP address with a netmask of /32. You must rerun this command for each IP address in the CIDR range. If your CIDR is a /24, you will have to run this command to deprovision each of the 256 IP addresses in the /24 CIDR. When you run the command in this section, the value for --region must match the Region of your IPAM. This step must be done by the byoip-owner-account account. aws ec2 deprovision-public-ipv4-pool-cidr --region us-east-1 --profile byoip- owner-account --pool-id ipv4pool-ec2-0019eed22a684e0b3 --cidr 130.137.249.255/32 In the output, you'll see the deprovisioned CIDR. { "PoolId": "ipv4pool-ec2-0019eed22a684e0b3", "DeprovisionedAddresses": [ "130.137.249.255" ] } 6. View your BYOIP CIDRs again and ensure there are no more provisioned addresses. When you run the command in this section, the value for --region must match the Region of your IPAM. Step 7: Cleanup 255 Amazon Virtual Private Cloud IP Address Manager This step must be done by the byoip-owner-account account. aws ec2 describe-public-ipv4-pools --region us-east-1 --profile byoip-owner-account In the output, you'll see the IP addresses count in your public IPv4 pool. { "PublicIpv4Pools": [ { "PoolId": "ipv4pool-ec2-0019eed22a684e0b3", "Description": "", "PoolAddressRanges": [], "TotalAddressCount": 0, "TotalAvailableAddressCount": 0, "NetworkBorderGroup": "us-east-1", "Tags": [] } ] } 7. Run the following command to delete the top-level pool. aws ec2 delete-ipam-pool --region us-east-1 --profile ipam-account --ipam-pool- id ipam-pool-0a03d430ca3f5c035 In the output, you can see the delete state. { "IpamPool": { "OwnerId": "123456789012", "IpamPoolId": "ipam-pool-0a03d430ca3f5c035", "IpamPoolArn": "arn:aws:ec2::123456789012:ipam-pool/ipam- pool-0a03d430ca3f5c035", "IpamScopeArn": "arn:aws:ec2::123456789012:ipam-scope/ipam- scope-0087d83896280b594", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::123456789012:ipam/ipam-090e48e75758de279", "Locale": "us-east-1", "PoolDepth": 2, "State": "delete-in-progress", "Description": "top-level-pool", Step 7: Cleanup 256 Amazon Virtual Private Cloud IP Address Manager "AutoImport": false, "Advertisable": true, "AddressFamily": "ipv4", "AwsService": "ec2" } } Tutorial: Plan VPC IP address space for subnet IP allocations Complete this tutorial to plan the VPC IP address space for allocating IP addresses to VPC subnets and monitor IP address-related metrics at the subnet and VPC level. Note This tutorial covers allocating private IPv4 address space in a private IPAM scope to VPCs and subnets. You can also complete this tutorial using an IPv6 CIDR range by creating the VPC with an Amazon-provided IPv6 CIDR block option on the VPC console. Planning VPC IP address space for subnets enables you to do the following: • Plan and organize your VPC’s IP addresses for allocation to subnets: You can divide VPC IP address space into smaller CIDR blocks and provision those CIDR blocks to subnets with different business needs, such as if you're running workloads in development or production subnets. • Simplify IP address allocations for VPC subnets: Once your VPC’s address space is planned and organized, you can choose a netmask length rather than manually inputting a CIDR. For example, if a developer is creating a subnet for hosting development workloads, they need to choose a pool and a netmask length for the subnet and IPAM will automatically allocate the CIDR block to your subnet. The following example shows the hierarchy of the pool and resource structure that you will create with this tutorial: • Private scope • Resource planning pool (10.0.0.0/20) • Dev subnet pool (10.0.0.0/24) • Dev subnet (10.0.0.0/28) Plan VPC IP address space for subnet IP allocations 257 Amazon Virtual Private Cloud IP Address Manager • Prod subnet pool (10.0.0.1/24) • Prod subnet (10.0.0.16/28) Important • The resource planning pool can be used to allocate CIDRs to subnets or it can be used as a source pool in which you can create other pools. In this tutorial, we use the resource planning pool as a source pool for subnet pools. • You can create multiple resource planning pools using the same VPC if the VPC has more than one CIDR provisioned to it; if a VPC has two CIDRs assigned to it, for example, you can create two resource planning pools, one from each CIDR. Each CIDR can be assigned to one pool at a time. Step 1: Create a VPC Complete the steps in this section to create a VPC to be used for subnet IP address planning. For more information about the IAM permissions that are required to create VPCs, see Amazon VPC policy examples in the Amazon VPC User Guide. Note You can use an existing VPC rather
vpc-ipam-088
vpc-ipam.pdf
88
VPC if the VPC has more than one CIDR provisioned to it; if a VPC has two CIDRs assigned to it, for example, you can create two resource planning pools, one from each CIDR. Each CIDR can be assigned to one pool at a time. Step 1: Create a VPC Complete the steps in this section to create a VPC to be used for subnet IP address planning. For more information about the IAM permissions that are required to create VPCs, see Amazon VPC policy examples in the Amazon VPC User Guide. Note You can use an existing VPC rather than creating a new one, but this tutorial focuses on the scenario where the VPC is configured with a manually-allocated CIDR block, not an IPAM- allocated automatically CIDR block. To create a VPC 1. Using the IPAM admin account, open the VPC console at https://console.aws.amazon.com/ vpc/. 2. Choose Create VPC. 3. Enter a name for the VPC, such as tutorial-vpc. 4. Choose IPv4 CIDR manual input and enter an IPv4 CIDR block. In this tutorial, we use 10.0.0.0/20. Step 1: Create a VPC 258 Amazon Virtual Private Cloud IP Address Manager 5. Skip the option to add an IPv6 CIDR block. 6. Choose Create VPC. 7. Using the IPAM admin account, open the IPAM console at https://console.aws.amazon.com/ ipam/. 8. Choose Resources in the left navigation pane. 9. Wait for the VPC that you created to appear. This takes some time to happen and you may need to refresh the window to see it appear. The VPC must be discovered by IPAM before you continue to the next step. Step 2: Create a resource planning pool Complete the steps in this section to create a resource planning pool. To create a resource planning pool 1. Using the IPAM admin account, open the IPAM console at https://console.aws.amazon.com/ ipam/. 2. In the navigation pane, choose Pools. 3. Choose the private scope. 4. Choose Create pool. 5. Under IPAM scope, leave the private scope selected. 6. (Optional) Add a Name tag for the pool, such as “Resource-planning-pool”. 7. Under Source, choose IPAM scope. 8. Under Resource planning, choose Plan IP space within a VPC and choose the VPC you created in the previous step. The VPC is the resource used to provision CIDRs to the resource planning pool. 9. Under CIDRs to provision, choose the VPC CIDR to provision for the resource pool. The CIDR you provision to the resource planning pool must match the CIDR provisioned to the VPC. In this tutorial, we use 10.0.0.0/20. 10. Choose Create pool. 11. Once the pool is created, choose the CIDR tab to see the state of the provisioned CIDR. Refresh the page and wait for the CIDR state to change from Pending-provision to Provisioned before you go to the next step. Step 2: Create a resource planning pool 259 Amazon Virtual Private Cloud IP Address Manager Step 3: Create subnet pools Complete the steps in this section to create two subnet pools that will be used for allocating IP space to subnets. To create subnet pools 1. Using the IPAM admin account, open the IPAM console at https://console.aws.amazon.com/ ipam/. 2. In the navigation pane, choose Pools. 3. Choose the private scope. 4. Choose Create pool. 5. Under IPAM scope, leave the private scope selected. 6. (Optional) Add a Name tag for the pool, such as “dev-subnet-pool”. 7. Under Source, choose IPAM pool and select the resource planning pool you created in Step 3. The address family, Resource planning configuration, and Locale are automatically inherited from the source pool. 8. Under CIDRs to provision, choose the CIDR to provision for the subnet pool. In this tutorial, we use 10.0.0.0/24. 9. Choose Create pool. 10. Once the pool is created, choose the CIDR tab to see the state of the provisioned CIDR. Refresh the page and wait for the CIDR state to change from Pending-provision to Provisioned before you go to the next step. 11. Repeat this process to create another subnet called “prod-subnet-pool”. At this point, if you want to make this subnet pool available to other AWS accounts, you can share the subnet pool. For instructions on how to do that, see Share an IPAM pool using AWS RAM. Then return here to complete the tutorial. Step 4: Create subnets Complete these steps to create two subnets. Step 3: Create subnet pools 260 Amazon Virtual Private Cloud To create subnets IP Address Manager 1. Using the appropriate account, open the VPC console at https://console.aws.amazon.com/ vpc/. 2. Choose Subnets > Create subnet. 3. Choose the VPC you created at the start of this tutorial. 4. 5. Enter a name for the subnet, such as "tutorial-subnet". (optional) Choose an Availability Zone. 6. Under IPv4 CIDR block, choose IPAM-allocated IPV4 CIDR block and choose the dev subnet pool
vpc-ipam-089
vpc-ipam.pdf
89
pool using AWS RAM. Then return here to complete the tutorial. Step 4: Create subnets Complete these steps to create two subnets. Step 3: Create subnet pools 260 Amazon Virtual Private Cloud To create subnets IP Address Manager 1. Using the appropriate account, open the VPC console at https://console.aws.amazon.com/ vpc/. 2. Choose Subnets > Create subnet. 3. Choose the VPC you created at the start of this tutorial. 4. 5. Enter a name for the subnet, such as "tutorial-subnet". (optional) Choose an Availability Zone. 6. Under IPv4 CIDR block, choose IPAM-allocated IPV4 CIDR block and choose the dev subnet pool and a /28 netmask. 7. Choose Create subnet. 8. Repeat this process to create another subnet. This time choose the prod subnet pool and a /28 netmask. 9. Return to the IPAM console and choose Resources in the left navigation pane. 10. Look for the subnet pools you created and wait for the subnets that you created to appear beneath it. This takes some time to happen and you may need to refresh the window to see it appear. The tutorial is complete. You can create additional subnet pools as needed or you can launch in EC2 instance into one of the subnets. IPAM publishes metrics related to IP address usage in subnets. You can set CloudWatch alarms on the SubnetIPUsage metric, thereby allowing you to take action when IP utilization thresholds are breached. If, for example, you have a /24 CIDR (256 IP addresses) assigned to a subnet and you want to be notified when 80% of the IPs have been utilized, you can set up a CloudWatch alarm to alert you when this threshold is reached. For more information on creating an alarm for subnet IP usage, see Quick tip for creating alarms. Step 5: Cleanup Complete these steps to delete the resources you created with this tutorial. To clean up the resources 1. Using the IPAM admin account, open the IPAM console at https://console.aws.amazon.com/ ipam/. Step 5: Cleanup 261 Amazon Virtual Private Cloud IP Address Manager 2. In the navigation pane, choose Pools. 3. Choose the private scope. 4. Choose the resource planning pool and choose Action > Delete. 5. Select Cascade delete. The resource planning pool and the subnet pools will be deleted. This will not delete the subnets themselves. They will stay with CIDRs provisioned to them, though the CIDRs will no longer be from an IPAM pool. 6. Choose Delete. 7. Delete the subnets. 8. Delete the VPC. Cleanup is complete. Allocate sequential Elastic IP addresses from an IPAM pool IPAM enables you to provision Amazon-owned public IPv4 blocks to IPAM pools and allocate sequential Elastic IP addresses from those pools to AWS resources. Contiguously-allocated Elastic IP addresses are public IPv4 addresses that are allocated sequentially. For example, if Amazon provides you a public IPv4 CIDR block of 192.0.2.0/30 and you allocate the four available public IPv4 addresses from that CIDR block, an example of four sequential Elastic IP addresses is 192.0.2.0, 192.0.2.1, 192.0.2.2, and 192.0.2.3. Contiguously-allocated Elastic IP addresses enable you to simplify your security and networking rules in the following ways: • Security administration: Using sequential IPv4 addresses reduces your firewall management overhead. You can add an entire prefix with a single rule and associate IPs from the same prefix as you scale, saving time and effort. • Enterprise access: You can simplify the address space shared with your clients by using an entire CIDR block instead of a long list of individual public IPv4 addresses. This avoids the need to constantly communicate IP changes as your application scales on AWS. • Simplified IP management: Using sequential IPv4 addresses simplifies public IP management for your central networking team, as it reduces the need to track individual public IPs and instead allows them to focus on a limited number of IP prefixes. Allocate sequential Elastic IP addresses from an IPAM pool 262 Amazon Virtual Private Cloud IP Address Manager In this tutorial, you'll go through the steps required to allocate sequential Elastic IP addresses from an IPAM pool. You'll create an IPAM pool with an Amazon-provided contiguous public IPv4 CIDR block, allocate Elastic IP addresses from the pool, and learn how to monitor IPAM pool allocations. Note • There are charges associated with provisioning Amazon-owned public IPv4 CIDR blocks. For more information, see the Amazon-provided contiguous IPv4 block tab on the Amazon VPC pricing page. • This tutorial assumes you want to create an IPAM using IPAM with a single account. If you want to share Amazon-owned contiguous public IPv4 blocks across accounts, first Integrate IPAM with accounts in an AWS Organization and then Share an IPAM pool using AWS RAM. If you integrate with AWS Organizations, you have the option to create a service control policy to prevent deprovisioning of the contig
vpc-ipam-090
vpc-ipam.pdf
90
IPAM pool allocations. Note • There are charges associated with provisioning Amazon-owned public IPv4 CIDR blocks. For more information, see the Amazon-provided contiguous IPv4 block tab on the Amazon VPC pricing page. • This tutorial assumes you want to create an IPAM using IPAM with a single account. If you want to share Amazon-owned contiguous public IPv4 blocks across accounts, first Integrate IPAM with accounts in an AWS Organization and then Share an IPAM pool using AWS RAM. If you integrate with AWS Organizations, you have the option to create a service control policy to prevent deprovisioning of the contig IPv4 blocks assigned to the pool. • You cannot transfer sequential Elastic IP addresses allocated from an IPAM pool to other AWS accounts. Instead, IPAM allows you to share IPAM pools across AWS accounts by integrating IPAM with AWS Organizations (as mentioned above). • There are limits on the number of Amazon-owned public IPv4 CIDR blocks you can provision and their size. For more information, see Quotas for your IPAM. Contents • Step 1: Create an IPAM • Step 2: Create an IPAM pool and provision a CIDR • Step 3: Allocate an Elastic IP address from the pool • Step 4: Associate the Elastic IP address with an EC2 instance • Step 5: Track and monitor pool usage • Cleanup Step 1: Create an IPAM Complete the steps in this section to create an IPAM. Step 1: Create an IPAM 263 Amazon Virtual Private Cloud AWS Management Console To create an IPAM IP Address Manager 1. Open the IPAM console at https://console.aws.amazon.com/ipam/. 2. In the AWS Management Console, choose the AWS Region in which you want to create the IPAM. Create the IPAM in your main Region of operations. 3. On the service home page, choose Create IPAM. 4. Select Allow Amazon VPC IP Address Manager to replicate data from source account(s) into the IPAM delegate account. If you do not select this option, you cannot create an IPAM. 5. Choose an IPAM tier. For more information about the features available in each tier and the costs associated with the tiers, see the IPAM tab on the Amazon VPC pricing page. 6. Under Operating regions, select the AWS Regions in which this IPAM can manage and discover resources. The AWS Region in which you are creating your IPAM is selected as one of the operating Regions by default. For example, if you’re creating this IPAM in AWS Region us-east-1 but you want to create Regional IPAM pools later that provide CIDRs to VPCs in us-west-2, select us-west-2 here. If you forget an operating Region, you can return at a later time and edit your IPAM settings. Note If you are creating an IPAM in the Free Tier, you can select multiple operating Regions for your IPAM, but the only IPAM feature that will be available across operating Regions is Public IP insights. You cannot use other features in the Free Tier, like BYOIP, across the IPAM's operating Regions. You can only use them in the IPAM's home Region. To use all IPAM features across operating Regions, create an IPAM in the Advanced Tier. 7. Choose Create IPAM. Command line The commands in this section link to the AWS CLI Reference documentation. The documentation provides detailed descriptions of the options that you can use when you run the commands. Step 1: Create an IPAM 264 Amazon Virtual Private Cloud IP Address Manager Create the IPAM with the create-ipam command: aws ec2 create-ipam --region us-east-1 Example response: { "Ipam": { "OwnerId": "320805250157", "IpamId": "ipam-0755477df834ea06b", "IpamArn": "arn:aws:ec2::320805250157:ipam/ipam-0755477df834ea06b", "IpamRegion": "us-east-1", "PublicDefaultScopeId": "ipam-scope-01bc7290e4a9202f9", "PrivateDefaultScopeId": "ipam-scope-0a50983b97a7a583a", "ScopeCount": 2, "OperatingRegions": [ { "RegionName": "us-east-1" } ], "State": "create-in-progress", "Tags": [], "DefaultResourceDiscoveryId": "ipam-res-disco-02cc5b34cc3f04f09", "DefaultResourceDiscoveryAssociationId": "ipam-res-disco- assoc-06b3a4dccfc81f7c1", "ResourceDiscoveryAssociationCount": 1, "Tier": "advanced" } } You'll need the PublicDefaultScopeId in the next step. For more information about scopes, see How IPAM works. Step 2: Create an IPAM pool and provision a CIDR Complete the steps in this section to create an IPAM pool from which you'll allocate the Elastic IP addresses. Step 2: Create an IPAM pool and provision a CIDR 265 Amazon Virtual Private Cloud AWS Management Console To create a pool IP Address Manager 1. Open the IPAM console at https://console.aws.amazon.com/ipam/. 2. In the navigation pane, choose Pools. 3. Choose the public scope. For more information about scopes, see How IPAM works. 4. Choose Create pool. 5. (Optional) Add a Name tag for the pool and a Description for the pool. 6. Under Source, choose IPAM scope. 7. Under Address family, choose IPv4. 8. Under Resource planning, leave Plan IP space within the scope selected. 9. Under Locale, choose the locale for the pool. The locale is the AWS Region where you want this IPAM pool to be available for allocations. The available options come from the operating
vpc-ipam-091
vpc-ipam.pdf
91
console at https://console.aws.amazon.com/ipam/. 2. In the navigation pane, choose Pools. 3. Choose the public scope. For more information about scopes, see How IPAM works. 4. Choose Create pool. 5. (Optional) Add a Name tag for the pool and a Description for the pool. 6. Under Source, choose IPAM scope. 7. Under Address family, choose IPv4. 8. Under Resource planning, leave Plan IP space within the scope selected. 9. Under Locale, choose the locale for the pool. The locale is the AWS Region where you want this IPAM pool to be available for allocations. The available options come from the operating Regions that you chose when you created your IPAM. 10. Under Service, choose EC2 (EIP/VPC). The service you select determines the AWS service where the CIDR will advertised. Currently, the only option is EC2 (EIP/VPC), which means that the CIDRs allocated from this pool will be advertised for the Amazon EC2 service (for Elastic IP addresses). 11. Under Public IP source, choose Amazon-owned. 12. Under CIDR to provision, choose Add Amazon-owned public CIDR. Choose a Netmask length between /29 (8 IP addresses) and /30 (4 IP addresses). You can add up to 2 CIDRs by default. For information about increasing the limits on Amazon-provided contiguous public IPv4 CIDRs, see Quotas for your IPAM. 13. Leave Configure this pool's allocation rule settings unselected. 14. (Optional) Choose Tags for the pool. 15. Choose Create pool. Ensure that this CIDR has been provisioned before you continue. You can see the state of provisioning in the CIDRs tab in the pool details page. Step 2: Create an IPAM pool and provision a CIDR 266 Amazon Virtual Private Cloud Command line To create a pool IP Address Manager 1. Create an IPAM pool with the create-ipam-pool command. The locale is the AWS Region where you want this IPAM pool to be available for allocations. The available options come from the operating Regions that you chose when you created your IPAM. aws ec2 create-ipam-pool --region us-east-1 --ipam-scope-id ipam- scope-01bc7290e4a9202f9 --address-family ipv4 --locale us-east-1 --aws-service ec2 --public-ip-source amazon Example response with state create-in-progress: { "IpamPool": { "OwnerId": "320805250157", "IpamPoolId": "ipam-pool-07ccc86aa41bef7ce", "IpamPoolArn": "arn:aws:ec2::320805250157:ipam-pool/ipam- pool-07ccc86aa41bef7ce", "IpamScopeArn": "arn:aws:ec2::320805250157:ipam-scope/ipam- scope-01bc7290e4a9202f9", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::320805250157:ipam/ipam-0755477df834ea06b", "IpamRegion": "us-east-1", "Locale": "us-east-1", "PoolDepth": 1, "State": "create-in-progress", "AutoImport": false, "AddressFamily": "ipv4", Step 2: Create an IPAM pool and provision a CIDR 267 Amazon Virtual Private Cloud IP Address Manager "Tags": [], "AwsService": "ec2", "PublicIpSource": "amazon" } } 2. Check that the pool was created successfully with the describe-ipam-pools command. aws ec2 describe-ipam-pools --region us-east-1 --ipam-pool-ids ipam- pool-07ccc86aa41bef7ce Example response with state create-complete: { "IpamPools": [ { "OwnerId": "320805250157", "IpamPoolId": "ipam-pool-07ccc86aa41bef7ce", "IpamPoolArn": "arn:aws:ec2::320805250157:ipam-pool/ipam- pool-07ccc86aa41bef7ce", "IpamScopeArn": "arn:aws:ec2::320805250157:ipam-scope/ipam- scope-01bc7290e4a9202f9", "IpamScopeType": "public", "IpamArn": "arn:aws:ec2::320805250157:ipam/ipam-0755477df834ea06b", "IpamRegion": "us-east-1", "Locale": "us-east-1", "PoolDepth": 1, "State": "create-complete", "AutoImport": false, "AddressFamily": "ipv4", "Tags": [], "AwsService": "ec2", "PublicIpSource": "amazon" } ] } Step 2: Create an IPAM pool and provision a CIDR 268 Amazon Virtual Private Cloud IP Address Manager 3. Provision a CIDR to the pool with the provision-ipam-pool-cidr command. Choose a -- netmask-length between /29 (8 IP addresses) and /30 (4 IP addresses). You can add up to 2 CIDRs by default. For information about increasing the limits on Amazon-provided contiguous public IPv4 CIDRs, see Quotas for your IPAM. aws ec2 provision-ipam-pool-cidr --region us-east-1 --ipam-pool-id ipam- pool-07ccc86aa41bef7ce --netmask-length 29 Example response with state pending-provision: { "IpamPoolCidr": { "State": "pending-provision", "IpamPoolCidrId": "ipam-pool-cidr-01856e43994df4913b7bc6aac47adf983", "NetmaskLength": 29 } } 4. Ensure that this CIDR has been provisioned before you continue. You can view the state of provisioning using the get-ipam-pool-cidrs command. aws ec2 get-ipam-pool-cidrs --region us-east-1 --ipam-pool-id ipam- pool-07ccc86aa41bef7ce Example response with state provisioned: { "IpamPoolCidrs": [ { "Cidr": "18.97.0.40/29", "State": "provisioned", "IpamPoolCidrId": "ipam-pool- cidr-01856e43994df4913b7bc6aac47adf983", "NetmaskLength": 29 } ] } Step 2: Create an IPAM pool and provision a CIDR 269 Amazon Virtual Private Cloud IP Address Manager Step 3: Allocate an Elastic IP address from the pool Complete the steps in this section to allocate an Elastic IP address from the pool. AWS Management Console Follow the steps in Allocate an Elastic IP address in the Amazon EC2 User Guide to allocate the address, but note the following: • Ensure that the AWS Region you are in in the EC2 console matches the Locale option you chose when you created the pool in Step 2. • When you choose the address pool, choose the option to Allocate using an IPv4 IPAM pool and choose the pool you created in Step 1. Command line Allocate an address from the pool with the allocate-address command. The --region you use must match the -locale option you chose when you created the pool in Step 2. Include the ID of the IPAM pool you created in Step 2 in --ipam-pool-id. aws ec2 allocate-address --region us-east-1 --ipam-pool-id ipam- pool-07ccc86aa41bef7ce Example response: { "PublicIp": "18.97.0.41", "AllocationId": "eipalloc-056cdd6019c0f4b46", "PublicIpv4Pool": "ipam-pool-07ccc86aa41bef7ce", "NetworkBorderGroup": "us-east-1", "Domain": "vpc" }
vpc-ipam-092
vpc-ipam.pdf
92
you created the pool in Step 2. • When you choose the address pool, choose the option to Allocate using an IPv4 IPAM pool and choose the pool you created in Step 1. Command line Allocate an address from the pool with the allocate-address command. The --region you use must match the -locale option you chose when you created the pool in Step 2. Include the ID of the IPAM pool you created in Step 2 in --ipam-pool-id. aws ec2 allocate-address --region us-east-1 --ipam-pool-id ipam- pool-07ccc86aa41bef7ce Example response: { "PublicIp": "18.97.0.41", "AllocationId": "eipalloc-056cdd6019c0f4b46", "PublicIpv4Pool": "ipam-pool-07ccc86aa41bef7ce", "NetworkBorderGroup": "us-east-1", "Domain": "vpc" } Optionally, you can also choose a specific /32 in your IPAM pool by using the --address option. aws ec2 allocate-address --region us-east-1 --ipam-pool-id ipam- pool-07ccc86aa41bef7ce --address 18.97.0.41 Example response: Step 3: Allocate an Elastic IP address from the pool 270 Amazon Virtual Private Cloud IP Address Manager { "PublicIp": "18.97.0.41", "AllocationId": "eipalloc-056cdd6019c0f4b46", "PublicIpv4Pool": "ipam-pool-07ccc86aa41bef7ce", "NetworkBorderGroup": "us-east-1", "Domain": "vpc" } For more information, see Allocate an Elastic IP address in the Amazon EC2 User Guide. Step 4: Associate the Elastic IP address with an EC2 instance Complete the steps in this section to associate the Elastic IP address with an EC2 instance. AWS Management Console Follow the steps in Associate an Elastic IP address in the Amazon EC2 User Guide to allocate an Elastic IP address from the IPAM pool, but note the following: When you use AWS Management Console option, the AWS Region you associate the Elastic IP address in must match the Locale option you chose when you created the pool in Step 2. Command line Associate the Elastic IP address with an instance with the associate-address command. The -- region you associate the Elastic IP address in must match the --locale option you chose when you created the pool in Step 2. aws ec2 associate-address --region us-east-1 --instance-id i-07459a6fca5b35823 -- public-ip 18.97.0.41 Example response: { "AssociationId": "eipassoc-06aa85073d3936e0e" } For more information, see Associate an Elastic IP address with an instance or network interface in the Amazon EC2 User Guide. Step 4: Associate the Elastic IP address with an EC2 instance 271 Amazon Virtual Private Cloud IP Address Manager Step 5: Track and monitor pool usage Once you've allocated Elastic IP addresses from the IPAM pool, you can track and monitor IPAM pool allocations. AWS Management Console • View the IPAM pool details Allocations tab in the IPAM console. Any Elastic IP addresses allocated from the IPAM pool have a Resource Type of EIP. • Use Public IP insights: • Under Public IP types, filter by Amazon-owned EIPs. This shows the total number of public IPv4 addresses allocated to Amazon-owned Elastic IP addresses. If you filter by this measure and scroll to Public IP addresses at the bottom of the page, you'll see the Elastic IP addresses you've allocated. • Under EIP usage, filter by Associated Amazon-owned EIPs or Unassociated Amazon- owned EIPs. This shows the total number of Elastic IP addresses that you have allocated in your AWS account and that you have or have not associated with an EC2 instance, network interface, or AWS resource. If you filter by this measure and scroll to Public IP addresses at the bottom of the page, you'll see details about the filtered resources. • Under Amazon-owned IPv4 contiguous IPs usage, monitor sequential public IPv4 address usage over time and related Amazon-owned IPv4 IPAM pools. • Use Amazon CloudWatch to track and monitor metrics related to Amazon-provided contiguous public IPv4 blocks that have been provisioned to IPAM pools. For the available metrics specific to contiguous IPv4 blocks, see Public IP Metrics under IPAM metrics. In addition to viewing metrics, you can create alarms in Amazon CloudWatch to notify you when thresholds are reached. Creating alarms and setting up notifications with Amazon CloudWatch is outside the scope of this tutorial. For more information, see Using Amazon CloudWatch alarms in the Amazon CloudWatch User Guide. Command line • View the IPAM pool allocations with the get-ipam-pool-allocations command. Any Elastic IP addresses allocated from the IPAM pool have a Resource Type of eip. aws ec2 get-ipam-pool-allocations --region us-east-1 --ipam-pool-id ipam- pool-07ccc86aa41bef7ce Step 5: Track and monitor pool usage 272 Amazon Virtual Private Cloud Example response: IP Address Manager { "IpamPoolAllocations": [ { "Cidr": "18.97.0.40/32", "IpamPoolAllocationId": "ipam-pool- alloc-0bd07df786e8148aba2763e2b6c1c44bd", "ResourceId": "eipalloc-0c9decaa541d89aa9", "ResourceType": "eip", "ResourceRegion": "us-east-1", "ResourceOwner": "320805250157" } ] } • Use Amazon CloudWatch to track and monitor metrics related to Amazon-provided contiguous public IPv4 blocks that have been provisioned to IPAM pools. For the available metrics specific to contiguous IPv4 blocks, see Public IP Metrics under IPAM metrics. In addition to viewing metrics, you can create alarms in Amazon CloudWatch to notify you when thresholds are reached. Creating alarms and setting up notifications with Amazon CloudWatch is outside the scope of this tutorial. For more
vpc-ipam-093
vpc-ipam.pdf
93
response: IP Address Manager { "IpamPoolAllocations": [ { "Cidr": "18.97.0.40/32", "IpamPoolAllocationId": "ipam-pool- alloc-0bd07df786e8148aba2763e2b6c1c44bd", "ResourceId": "eipalloc-0c9decaa541d89aa9", "ResourceType": "eip", "ResourceRegion": "us-east-1", "ResourceOwner": "320805250157" } ] } • Use Amazon CloudWatch to track and monitor metrics related to Amazon-provided contiguous public IPv4 blocks that have been provisioned to IPAM pools. For the available metrics specific to contiguous IPv4 blocks, see Public IP Metrics under IPAM metrics. In addition to viewing metrics, you can create alarms in Amazon CloudWatch to notify you when thresholds are reached. Creating alarms and setting up notifications with Amazon CloudWatch is outside the scope of this tutorial. For more information, see Using Amazon CloudWatch alarms in the Amazon CloudWatch User Guide. The tutorial is now complete. You've created an IPAM pool with an Amazon-provided contiguous public IPv4 CIDR block, allocated Elastic IP addresses from the pool, and learned how to monitor IPAM pool allocations. Continue to the next section to delete the resources you've created in this tutorial. Cleanup Follow the steps in this section to clean up the resources you've created in this tutorial. Step 1: Disassociate the Elastic IP address Complete the steps in Disassociate an Elastic IP address in the Amazon EC2 User Guide to disassociate the Elastic IP address. Step 2: Release the Elastic IP address Cleanup 273 Amazon Virtual Private Cloud IP Address Manager Complete the steps in Release an Elastic IP address in the Amazon EC2 User Guide to release an Elastic IP address from the public IPv4 pool. Step 3: Deprovision the CIDR from the IPAM pool Complete the steps in Deprovision CIDRs from a pool to deprovision the Amazon-owned public CIDR from the IPAM pool. This step is required for pool deletion. You will be billed for the Amazon- provided contiguous IPv4 block until this step is complete. Step 4: Delete the IPAM pool Complete the steps in Delete a pool to delete the IPAM pool. Step 5: Delete the IPAM Complete the steps in Delete an IPAM to delete the IPAM. The tutorial cleanup is complete. Cleanup 274 Amazon Virtual Private Cloud IP Address Manager Identity and access management in IPAM AWS uses security credentials to identify you and to grant you access to your AWS resources. You can use features of AWS Identity and Access Management (IAM) to allow other users, services, and applications to use your AWS resources fully or in a limited way, without sharing your security credentials. This section describes the AWS service-linked roles that are created specifically for IPAM and the managed policies attached to the IPAM service-linked roles. For more information about AWS IAM roles and policies, see Roles terms and concepts in the IAM User Guide. For more information about identity and access management for VPC, see Identity and access management for Amazon VPC in the Amazon VPC User Guide. Contents • Service-linked roles for IPAM • AWS managed policies for IPAM • Example policy Service-linked roles for IPAM IPAM uses AWS Identity and Access Management (IAM) service-linked roles. A service-linked role is a unique type of IAM role. Service-linked roles are predefined by IPAM and include all the permissions that the service requires to call other AWS services on your behalf. A service-linked role makes setting up IPAM easier because you don’t have to manually add the necessary permissions. IPAM defines the permissions of its service-linked roles, and unless defined otherwise, only IPAM can assume its roles. The defined permissions include the trust policy and the permissions policy, and that permissions policy cannot be attached to any other IAM entity. Service-linked role permissions IPAM uses the AWSServiceRoleForIPAM service-linked role to call the actions in the attached AWSIPAMServiceRolePolicy managed policy. For more information on the allowed actions in that policy, see AWS managed policies for IPAM. Also attached to the service-linked role is an IAM trust policy that allows the ipam.amazonaws.com service to assume the service-linked role. Service-linked roles for IPAM 275 Amazon Virtual Private Cloud IP Address Manager Create the service-linked role IPAM monitors the IP address usage in one or more accounts by assuming the service-linked role in an account, discovering the resources and their CIDRs, and integrating the resources with IPAM. The service-linked role is created in one of two ways: • When you integrate with AWS Organizations If you Integrate IPAM with accounts in an AWS Organization using the IPAM console or using the enable-ipam-organization-admin-account AWS CLI command, the AWSServiceRoleForIPAM service-linked role is automatically created in each of your AWS Organizations member accounts. As a result, the resources within all member accounts are discoverable by IPAM. Important For IPAM to create the service-linked role on your behalf: • The AWS Organizations management account that enables IPAM integration with AWS Organizations must have an IAM policy attached to it that permits the following actions: • ec2:EnableIpamOrganizationAdminAccount • organizations:EnableAwsServiceAccess • organizations:RegisterDelegatedAdministrator
vpc-ipam-094
vpc-ipam.pdf
94
ways: • When you integrate with AWS Organizations If you Integrate IPAM with accounts in an AWS Organization using the IPAM console or using the enable-ipam-organization-admin-account AWS CLI command, the AWSServiceRoleForIPAM service-linked role is automatically created in each of your AWS Organizations member accounts. As a result, the resources within all member accounts are discoverable by IPAM. Important For IPAM to create the service-linked role on your behalf: • The AWS Organizations management account that enables IPAM integration with AWS Organizations must have an IAM policy attached to it that permits the following actions: • ec2:EnableIpamOrganizationAdminAccount • organizations:EnableAwsServiceAccess • organizations:RegisterDelegatedAdministrator • iam:CreateServiceLinkedRole • The IPAM account must have an IAM policy attached to it that permits the iam:CreateServiceLinkedRole action. • When you create an IPAM using a single AWS account If you Use IPAM with a single account, the AWSServiceRoleForIPAM service-linked role is automatically created when you create an IPAM as that account. Important If you use IPAM with a single AWS account, before you create an IPAM, you must ensure that the AWS account you are using has an IAM policy attached to it that permits the iam:CreateServiceLinkedRole action. When you create the IPAM, you automatically Create the service-linked role 276 Amazon Virtual Private Cloud IP Address Manager create the AWSServiceRoleForIPAM service-linked role. For more information on managing IAM policies, see Editing a service-linked role description in the IAM User Guide. Edit the service-linked role You can't edit the AWSServiceRoleForIPAM service-linked role. Delete the service-linked role If you no longer need to use IPAM, we recommend that you delete the AWSServiceRoleForIPAM service-linked role. Note You can delete the service-linked role only after you delete all IPAM resources in your AWS account. This ensures that you can't inadvertently remove the monitoring capability of IPAM. Follow these steps to delete the service-linked role via the AWS CLI: 1. Delete your IPAM resources using deprovision-ipam-pool-cidr and delete-ipam. For more information, see Deprovision CIDRs from a pool and Delete an IPAM. 2. Disable the IPAM account with disable-ipam-organization-admin-account. 3. Disable the IPAM service with disable-aws-service-access using the --service-principal ipam.amazonaws.com option. 4. Delete the service-linked role: delete-service-linked-role. When you delete the service-linked role, the IPAM managed policy is also deleted. For more information, see Deleting a service- linked role in the IAM User Guide. AWS managed policies for IPAM If you are using IPAM with a single AWS account and you create an IPAM, the AWSIPAMServiceRolePolicy managed policy is automatically created in your IAM account and attached to the AWSServiceRoleForIPAM service-linked role. Edit the service-linked role 277 Amazon Virtual Private Cloud IP Address Manager If you enable IPAM integration with AWS Organizations, the AWSIPAMServiceRolePolicy managed policy is automatically created in your IAM account and in each of your AWS Organizations member accounts, and the managed policy is attached to the AWSServiceRoleForIPAM service-linked role. This managed policy enables IPAM to do the following: • Monitor CIDRs associated with networking resources across all members of your AWS Organization. • Store metrics related to IPAM in Amazon CloudWatch, such as the IP address space available in your IPAM pools and the number of resource CIDRs that comply with allocation rules. The following example shows the details of the managed policy that's created. { "Version": "2012-10-17", "Statement": [ { "Sid": "IPAMDiscoveryDescribeActions", "Effect": "Allow", "Action": [ "ec2:DescribeAccountAttributes", "ec2:DescribeAddresses", "ec2:DescribeByoipCidrs", "ec2:DescribeIpv6Pools", "ec2:DescribeNetworkInterfaces", "ec2:DescribePublicIpv4Pools", "ec2:DescribeSecurityGroups", "ec2:DescribeSecurityGroupRules", "ec2:DescribeSubnets", "ec2:DescribeVpcs", "ec2:DescribeVpnConnections", "ec2:GetIpamDiscoveredAccounts", "ec2:GetIpamDiscoveredPublicAddresses", "ec2:GetIpamDiscoveredResourceCidrs", "globalaccelerator:ListAccelerators", "globalaccelerator:ListByoipCidrs", "organizations:DescribeAccount", "organizations:DescribeOrganization", "organizations:ListAccounts", "organizations:ListDelegatedAdministrators", "organizations:ListChildren", "organizations:ListParents", Managed policies for IPAM 278 Amazon Virtual Private Cloud IP Address Manager "organizations:DescribeOrganizationalUnit" ], "Resource": "*" }, { "Sid": "CloudWatchMetricsPublishActions", "Effect": "Allow", "Action": "cloudwatch:PutMetricData", "Resource": "*", "Condition": { "StringEquals": { "cloudwatch:namespace": "AWS/IPAM" } } } ] } The first statement in the preceding example enables IPAM to monitor the CIDRs used by your single AWS account or by the members of your AWS Organization. The second statement in the preceding example uses the cloudwatch:PutMetricData condition key to allow IPAM to store IPAM metrics in your AWS/IPAM Amazon CloudWatch namespace. These metrics are used by the AWS Management Console to display data about the allocations in your IPAM pools and scopes. For more information, see Monitor CIDR usage with the IPAM dashboard. Updates to the AWS managed policy View details about updates to AWS managed policies for IPAM since this service began tracking these changes. Change Description Date AWSIPAMServiceRolePolicy November 21, 2024 Actions added to the AWSIPAMServiceRole Policy managed policy (organizations:List Children ,organizat ions:ListParents , and organizations:Desc Updates to the AWS managed policy 279 Amazon Virtual Private Cloud IP Address Manager Change Description Date AWSIPAMServiceRolePolicy AWSIPAMServiceRolePolicy November 13, 2023 November 1, 2023 ribeOrganizational Unit ) to enable IPAM to get the details of Organizational Units (OUs) in AWS Organizat ions so that customers can use IPAM at the OU level. Action added to the AWSIPAMServiceRolePolicy managed policy (ec2:GetIp amDiscoveredPublic Addresses ) to
vpc-ipam-095
vpc-ipam.pdf
95
to AWS managed policies for IPAM since this service began tracking these changes. Change Description Date AWSIPAMServiceRolePolicy November 21, 2024 Actions added to the AWSIPAMServiceRole Policy managed policy (organizations:List Children ,organizat ions:ListParents , and organizations:Desc Updates to the AWS managed policy 279 Amazon Virtual Private Cloud IP Address Manager Change Description Date AWSIPAMServiceRolePolicy AWSIPAMServiceRolePolicy November 13, 2023 November 1, 2023 ribeOrganizational Unit ) to enable IPAM to get the details of Organizational Units (OUs) in AWS Organizat ions so that customers can use IPAM at the OU level. Action added to the AWSIPAMServiceRolePolicy managed policy (ec2:GetIp amDiscoveredPublic Addresses ) to enable IPAM to get public IP addresses during resource discovery. Actions added to the AWSIPAMServiceRole Policy managed policy (ec2:DescribeAccoun tAttributes , ec2:DescribeNetwor kInterfaces , ec2:DescribeSecuri tyGroups , ec2:Descr ibeSecurityGroupRu les , ec2:Descr ibeVpnConnections , globalaccelerator: ListAccelerators , and globalaccelerator: ListByoipCidrs ) to enable IPAM to get public IP addresses during resource discovery. Updates to the AWS managed policy 280 Amazon Virtual Private Cloud IP Address Manager Change Description Date AWSIPAMServiceRolePolicy January 25, 2023 Two actions added to the AWSIPAMServiceRole Policy managed policy (ec2:GetIpamDiscove redAccounts and ec2:GetIpamDiscove ) redResourceCidrs to enable IPAM to get the AWS accounts and resource CIDRs being monitored during resource discovery. IPAM started tracking changes IPAM started tracking changes for its AWS managed December 2, 2021 policies. Example policy The example policy in this section contains all the relevant AWS Identity and Access Management (IAM) actions for full IPAM usage. Depending on how you are using IPAM, you may not need to include all of the IAM actions. For a full experience using the IPAM console, you may need to include additional IAM actions for services such as AWS Organizations, AWS Resource Access Manager(RAM), and Amazon CloudWatch. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:AssociateIpamByoasn", "ec2:DeprovisionIpamByoasn", "ec2:DescribeIpamByoasn", "ec2:DisassociateIpamByoasn", "ec2:ProvisionIpamByoasn", "ec2:CreateIpam", Example policy 281 Amazon Virtual Private Cloud IP Address Manager "ec2:DescribeIpams", "ec2:ModifyIpam", "ec2:DeleteIpam", "ec2:CreateIpamScope", "ec2:DescribeIpamScopes", "ec2:ModifyIpamScope", "ec2:DeleteIpamScope", "ec2:CreateIpamPool", "ec2:DescribeIpamPools", "ec2:ModifyIpamPool", "ec2:DeleteIpamPool", "ec2:ProvisionIpamPoolCidr", "ec2:GetIpamPoolCidrs", "ec2:DeprovisionIpamPoolCidr", "ec2:AllocateIpamPoolCidr", "ec2:GetIpamPoolAllocations", "ec2:ReleaseIpamPoolAllocation", "ec2:CreateIpamResourceDiscovery", "ec2:DescribeIpamResourceDiscoveries", "ec2:ModifyIpamResourceDiscovery", "ec2:DeleteIpamResourceDiscovery", "ec2:AssociateIpamResourceDiscovery", "ec2:DescribeIpamResourceDiscoveryAssociations", "ec2:DisassociateIpamResourceDiscovery", "ec2:GetIpamResourceCidrs", "ec2:ModifyIpamResourceCidr", "ec2:GetIpamAddressHistory", "ec2:GetIpamDiscoveredResourceCidrs", "ec2:GetIpamDiscoveredAccounts", "ec2:GetIpamDiscoveredPublicAddresses" ], "Resource": "*" }, { "Effect": "Allow", "Action": "iam:CreateServiceLinkedRole", "Resource": "arn:aws:iam::*:role/aws-service-role/ipam.amazonaws.com/ AWSServiceRoleForIPAM", "Condition": { "StringLike": { "iam:AWSServiceName": "ipam.amazonaws.com" } } } Example policy 282 Amazon Virtual Private Cloud IP Address Manager ] } Example policy 283 Amazon Virtual Private Cloud IP Address Manager Quotas for your IPAM This section lists the quotas related to IPAM. The Service Quotas console also provides information about IPAM quotas. You can use the Service Quotas console to view default quotas and request quota increases for adjustable quotas. For more information, see Requesting a quota increase in the Service Quotas User Guide. Name Default Adjustable Amazon-provided contiguous public IPv4 CIDR blocks 2 Amazon-provided contiguous public IPv4 CIDR block netmask length /29 Amazon-provided IPv6 CIDR block netmask length /52 Amazon-provided IPv6 CIDR blocks per Regional pool 1 Yes. Contact the AWS Support Center as described in AWS service quotas in the AWS General Reference. Acceptable size is between /29 and /30. To request an increase, contact the AWS Support Center as described in AWS service quotas in the AWS General Reference. Yes. Contact the AWS Support Center as described in AWS service quotas in the AWS General Reference. Yes. Contact the AWS Support Center as described in AWS service quotas in 284 Amazon Virtual Private Cloud IP Address Manager Name Default Adjustable Autonomous System Numbers (ASNs) that you can bring to IPAM 5 CIDRs per pool IPAM administrators per organization IPAMs per Region Organizational unit exclusions per resource discovery 50 1 1 10 Pool depth (the number of pools within pools) 10 Pools per scope Resource discovery associations per IPAM Resource discoveries per Region Resource utilization metrics 50 5 1 50 the AWS General Reference. Yes. Contact the AWS Support Center as described in AWS service quotas in the AWS General Reference. Yes No No Yes. Contact the AWS Support Center as described in AWS service quotas in the AWS General Reference. Yes Yes Yes No Yes. Contact the AWS Support Center as described in AWS service quotas in the AWS General Reference. 285 Amazon Virtual Private Cloud IP Address Manager Name Default Adjustable Scopes per IPAM 5 Yes. When you create an IPAM, a private and public default scope are created for you. If you want to create additiona l scopes, they will be private scopes. You cannot create additional public scopes. 286 Amazon Virtual Private Cloud IP Address Manager Pricing for IPAM Amazon VPC IP Address Manager (IPAM) is a service that helps you manage your IP address space across your AWS resources and on-premises networks. IPAM provides a centralized way to plan, monitor, and control the IP addresses used by your AWS and on-premises resources. This section describes how to view pricing-related information and your current IPAM
vpc-ipam-096
vpc-ipam.pdf
96
you create an IPAM, a private and public default scope are created for you. If you want to create additiona l scopes, they will be private scopes. You cannot create additional public scopes. 286 Amazon Virtual Private Cloud IP Address Manager Pricing for IPAM Amazon VPC IP Address Manager (IPAM) is a service that helps you manage your IP address space across your AWS resources and on-premises networks. IPAM provides a centralized way to plan, monitor, and control the IP addresses used by your AWS and on-premises resources. This section describes how to view pricing-related information and your current IPAM costs. Contents • View pricing information • View your current costs and usage using AWS Cost Explorer View pricing information IPAM is offered in two tiers: Free and Advanced Tier. For more information about the features available in each tier and the costs associated with the tiers, see the IPAM tab on the Amazon VPC pricing page. View your current costs and usage using AWS Cost Explorer When you use the IPAM Advanced Tier, you pay an hourly price per active IP address managed by IPAM. If you want to view and analyze your IPAM costs and usage, you can use the AWS Cost Explorer. 1. Open the AWS Cost Management console at https://console.aws.amazon.com/cost- management/home. 2. Choose Cost Explorer. 3. 4. Filter for IPAM usage by choosing Usage type and entering IPAddressManager. Select one or more checkboxes. Each of them represents a different AWS Region. 5. Click Apply. If, for example, you select USE1-IPAddressManager-IP-Hours(Hrs) and us-east-1 is your IPAM home Region, you’ll see the number of active IP hours billed by IPAM in all Regions and the cost. If, say, the usage in hours is 18, this means that you could have 1 active IP address for 18 hours, 3 IP View pricing information 287 Amazon Virtual Private Cloud IP Address Manager addresses in 3 different Regions each active for 6 hours, or any combination of these that add up to 18 hours. For more information about AWS Cost Explorer, see Analyzing your costs with AWS Cost Explorer in the AWS Cost Management User Guide. View your current costs and usage using AWS Cost Explorer 288 Amazon Virtual Private Cloud IP Address Manager Related information While the AWS technical documentation site is a comprehensive resource, there are many other places to find information about AWS services. AWS blogs, whitepapers, case studies, and community forums can provide valuable insights, real-world examples, and alternative perspectives beyond the official technical details. Exploring these diverse sources can give you a more well- rounded understanding of AWS offerings. The following related resources can help you as you work with Amazon VPC IP Address Manager: • Amazon VPC IP Address Manager Best Practices: An AWS blog on best practices for planning and creating a scalable address scheme with Amazon VPC IP Address Manager. • Network Address Management and Auditing at Scale with Amazon VPC IP Address Manager: An AWS blog that introduces Amazon VPC IP Address Manager and shows you how to use the service in the AWS console. • Configure fine-grained access to your resources shared using AWS Resource Access Manager: An AWS blog that explains how to share an IPAM pool with the accounts in an AWS Organizations organization unit. • Visualize enterprise IP address management and planning with CIDR map: An AWS blog that explains how to visualize your entire IPv4 and IPv6 landscape using the IPAM CIDR map in the IPAM console. 289 Amazon Virtual Private Cloud IP Address Manager Document history for IPAM The following table describes the releases for IPAM. Feature Description Enable cost distribut ion When you enable cost distribution, you distribute the charges for active IP addresses Release Date May 1, 2025 to the accounts using the IP addresses rather than to the IPAM owner. This is useful for large organizations where the delegated IPAM admin manages the IP addresses centrally using IPAM and each account is responsible for their own usage, eliminating the need for manual billing calculations. Exclude organizat ional units from IPAM If your IPAM is integrated with AWS Organizat ions, you can now exclude organizational November 21, 2024 AWS managed policy updates - Update to an existing policy Allocate sequential Elastic IP addresses from an IPAM pool Private IPv6 GUA and ULAs units from IPAM. IPAM will not manage the IP addresses in accounts in organizational unit exclusions. Existing AWSIPAMServiceRolePolicy updated. November 21, 2024 IPAM now enables you to provision Amazon- owned public IPv4 blocks to IPAM pools and allocate sequential Elastic IP addresses from those pools to AWS resources. Sequential E lastic IP addresses enable you to simplify your networking and security allowlisting needs. You can now provision private IPv6 GUA and ULA ranges to an IPAM pool in a private scope. Private
vpc-ipam-097
vpc-ipam.pdf
97
to an existing policy Allocate sequential Elastic IP addresses from an IPAM pool Private IPv6 GUA and ULAs units from IPAM. IPAM will not manage the IP addresses in accounts in organizational unit exclusions. Existing AWSIPAMServiceRolePolicy updated. November 21, 2024 IPAM now enables you to provision Amazon- owned public IPv4 blocks to IPAM pools and allocate sequential Elastic IP addresses from those pools to AWS resources. Sequential E lastic IP addresses enable you to simplify your networking and security allowlisting needs. You can now provision private IPv6 GUA and ULA ranges to an IPAM pool in a private scope. Private IPv6 addresses are only available in IPAM. For more information about August 28, 2024 August 8, 2024 290 Amazon Virtual Private Cloud IP Address Manager Feature Description Release Date IPAM Free and Advanced Tiers Public IP insights private IPv6 addressing, see Private IPv6 addresses in the Amazon VPC User Guide. You can now choose between Free Tier and Advanced Tier for your IPAM. November 17, 2023 Previously, you could only view public IP insights in a single Region. You can now view public IP insights across Regions. In addition, you can now view public IP address insights in Amazon CloudWatch. November 17, 2023 Plan VPC IP address space for subnet IP You can now use IPAM to plan for subnet IP space within a VPC and monitor IP address-r allocations elated metrics at the subnet and VPC level. November 17, 2023 Bring your own ASN (BYOASN) You can now bring your own autonomous system number (ASN) to AWS. November 17, 2023 AWS managed policy updates - Update to an existing policy AWS managed policy updates - Update to an existing policy Resource utilization metrics Existing AWSIPAMServiceRolePolicy updated. November 17, 2023 Existing AWSIPAMServiceRolePolicy updated. November 1, 2023 IPAM now publishes IP utilization metrics for resources that the IPAM monitors to Amazon CloudWatch. August 2, 2023 291 Amazon Virtual Private Cloud IP Address Manager Feature Description Public IP insights Public IP insights shows you all public IPv4 addresses used by services in this Region in your account. You can use these insights to identify public IPv4 address usage and view recommendations to release unused Elastic IP addresses. Release Date July 28, 2023 AWS managed policy updates - Update to an existing policy Existing AWSIPAMServiceRolePolicy updated. January 25, 2023 Integrate IPAM with accounts outside of You can now manage IP addresses outside of your organization from a single IPAM account January 25, 2023 your organization and share IPAM pools with the accounts of other AWS Organizations. Amazon-provided IPv6 contiguous CIDR When you create an IPAM pool in the public scope, you can now provision an Amazon- block for IPAM pools provided IPv6 contiguous CIDR block to the January 25, 2023 pool. For more information, see Create IPv6 address pools in your IPAM. Initial release This release introduces Amazon VPC IP Address Manager. December 2, 2021 292
vpc-lattice-api-001
vpc-lattice-api.pdf
1
API Reference Amazon VPC Lattice API Version 2022-11-30 Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon VPC Lattice API Reference Amazon VPC Lattice: API Reference Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. Amazon VPC Lattice Table of Contents API Reference Welcome ........................................................................................................................................... 1 Actions .............................................................................................................................................. 2 BatchUpdateRule .......................................................................................................................................... 5 Request Syntax ........................................................................................................................................ 5 URI Request Parameters ........................................................................................................................ 5 Request Body ........................................................................................................................................... 6 Response Syntax ...................................................................................................................................... 6 Response Elements ................................................................................................................................. 7 Errors .......................................................................................................................................................... 7 See Also ..................................................................................................................................................... 8 CreateAccessLogSubscription ..................................................................................................................... 9 Request Syntax ........................................................................................................................................ 9 URI Request Parameters ........................................................................................................................ 9 Request Body ........................................................................................................................................... 9 Response Syntax ................................................................................................................................... 11 Response Elements ............................................................................................................................... 11 Errors ....................................................................................................................................................... 13 See Also .................................................................................................................................................. 13 CreateListener ............................................................................................................................................. 15 Request Syntax ...................................................................................................................................... 15 URI Request Parameters ...................................................................................................................... 15 Request Body ......................................................................................................................................... 15 Response Syntax ................................................................................................................................... 17 Response Elements ............................................................................................................................... 18 Errors ....................................................................................................................................................... 19 See Also .................................................................................................................................................. 20 CreateResourceConfiguration .................................................................................................................. 22 Request Syntax ...................................................................................................................................... 22 URI Request Parameters ...................................................................................................................... 22 Request Body ......................................................................................................................................... 22 Response Syntax ................................................................................................................................... 25 Response Elements ............................................................................................................................... 26 Errors ....................................................................................................................................................... 29 See Also .................................................................................................................................................. 30 API Version 2022-11-30 iii Amazon VPC Lattice API Reference CreateResourceGateway ............................................................................................................................ 31 Request Syntax ...................................................................................................................................... 31 URI Request Parameters ...................................................................................................................... 31 Request Body ......................................................................................................................................... 31 Response Syntax ................................................................................................................................... 34 Response Elements ............................................................................................................................... 34 Errors ....................................................................................................................................................... 36 See Also .................................................................................................................................................. 37 CreateRule .................................................................................................................................................... 38 Request Syntax ...................................................................................................................................... 38 URI Request Parameters ...................................................................................................................... 38 Request Body ......................................................................................................................................... 39 Response Syntax ................................................................................................................................... 40 Response Elements ............................................................................................................................... 41 Errors ....................................................................................................................................................... 42 See Also .................................................................................................................................................. 43 CreateService ............................................................................................................................................... 45 Request Syntax ...................................................................................................................................... 45 URI Request Parameters ...................................................................................................................... 45 Request Body ......................................................................................................................................... 45 Response Syntax ................................................................................................................................... 47 Response Elements ............................................................................................................................... 47 Errors ....................................................................................................................................................... 49 See Also .................................................................................................................................................. 50 CreateServiceNetwork ............................................................................................................................... 52 Request Syntax ...................................................................................................................................... 52 URI Request Parameters ...................................................................................................................... 52 Request Body ......................................................................................................................................... 52 Response Syntax ................................................................................................................................... 54 Response Elements ............................................................................................................................... 54 Errors ....................................................................................................................................................... 55 See Also .................................................................................................................................................. 56 CreateServiceNetworkResourceAssociation .......................................................................................... 58 Request Syntax ...................................................................................................................................... 58 URI Request Parameters ...................................................................................................................... 58 Request Body ......................................................................................................................................... 58 API Version 2022-11-30 iv Amazon VPC Lattice API Reference Response Syntax ................................................................................................................................... 59 Response Elements ............................................................................................................................... 60 Errors ....................................................................................................................................................... 61 See Also .................................................................................................................................................. 62 CreateServiceNetworkServiceAssociation .............................................................................................. 63 Request Syntax ...................................................................................................................................... 63 URI Request Parameters ...................................................................................................................... 63 Request Body ......................................................................................................................................... 63 Response Syntax ................................................................................................................................... 65 Response Elements ............................................................................................................................... 65 Errors ....................................................................................................................................................... 66 See Also .................................................................................................................................................. 67 CreateServiceNetworkVpcAssociation .................................................................................................... 69 Request Syntax ...................................................................................................................................... 69 URI Request Parameters ...................................................................................................................... 69 Request Body ......................................................................................................................................... 69 Response Syntax ................................................................................................................................... 71 Response Elements ............................................................................................................................... 71 Errors ....................................................................................................................................................... 73 See Also .................................................................................................................................................. 74 CreateTargetGroup ..................................................................................................................................... 75 Request Syntax ...................................................................................................................................... 75 URI Request Parameters ...................................................................................................................... 76 Request Body ......................................................................................................................................... 76 Response Syntax ................................................................................................................................... 77 Response Elements ............................................................................................................................... 78 Errors ....................................................................................................................................................... 79 See Also .................................................................................................................................................. 80 DeleteAccessLogSubscription ................................................................................................................... 82 Request Syntax ...................................................................................................................................... 82 URI Request Parameters ...................................................................................................................... 82 Request Body ......................................................................................................................................... 82 Response Syntax ................................................................................................................................... 82 Response Elements ............................................................................................................................... 82 Errors ....................................................................................................................................................... 82 See Also .................................................................................................................................................. 83 API Version 2022-11-30 v Amazon VPC Lattice API Reference DeleteAuthPolicy ........................................................................................................................................ 85 Request Syntax ...................................................................................................................................... 85 URI Request Parameters ...................................................................................................................... 85 Request Body ......................................................................................................................................... 85 Response Syntax ................................................................................................................................... 85 Response Elements ............................................................................................................................... 85 Errors ....................................................................................................................................................... 86 See Also .................................................................................................................................................. 86 DeleteListener ............................................................................................................................................. 88 Request Syntax ...................................................................................................................................... 88 URI Request Parameters ...................................................................................................................... 88 Request Body ......................................................................................................................................... 88 Response Syntax ................................................................................................................................... 88 Response Elements ............................................................................................................................... 89 Errors ....................................................................................................................................................... 89 See Also .................................................................................................................................................. 90 DeleteResourceConfiguration .................................................................................................................. 91 Request Syntax ...................................................................................................................................... 91 URI Request Parameters ...................................................................................................................... 91 Request Body ......................................................................................................................................... 91 Response Syntax ................................................................................................................................... 91 Response Elements ............................................................................................................................... 91 Errors ....................................................................................................................................................... 91 See Also .................................................................................................................................................. 92 DeleteResourceEndpointAssociation ...................................................................................................... 94 Request Syntax ...................................................................................................................................... 94 URI Request Parameters ...................................................................................................................... 94 Request Body ......................................................................................................................................... 94 Response Syntax ................................................................................................................................... 94 Response Elements ............................................................................................................................... 95 Errors ....................................................................................................................................................... 96 See Also .................................................................................................................................................. 97 DeleteResourceGateway ............................................................................................................................ 98 Request Syntax ...................................................................................................................................... 98 URI Request Parameters ...................................................................................................................... 98 Request Body ......................................................................................................................................... 98 API Version 2022-11-30 vi Amazon VPC Lattice API Reference Response Syntax ................................................................................................................................... 98 Response Elements ............................................................................................................................... 99 Errors ..................................................................................................................................................... 100 See Also ................................................................................................................................................ 100 DeleteResourcePolicy .............................................................................................................................. 102 Request Syntax .................................................................................................................................... 102 URI Request Parameters ................................................................................................................... 102 Request Body ....................................................................................................................................... 102 Response Syntax ................................................................................................................................. 102 Response Elements ............................................................................................................................ 102 Errors ..................................................................................................................................................... 102 See Also ................................................................................................................................................ 103 DeleteRule ................................................................................................................................................. 105 Request Syntax .................................................................................................................................... 105 URI Request Parameters ................................................................................................................... 105 Request Body ....................................................................................................................................... 106 Response Syntax ................................................................................................................................. 106 Response Elements ............................................................................................................................ 106 Errors ..................................................................................................................................................... 106 See Also ................................................................................................................................................ 107 DeleteService ............................................................................................................................................ 108 Request Syntax .................................................................................................................................... 108 URI Request Parameters ................................................................................................................... 108 Request Body ....................................................................................................................................... 108 Response Syntax
vpc-lattice-api-002
vpc-lattice-api.pdf
2
Amazon VPC Lattice API Reference Response Syntax ................................................................................................................................... 98 Response Elements ............................................................................................................................... 99 Errors ..................................................................................................................................................... 100 See Also ................................................................................................................................................ 100 DeleteResourcePolicy .............................................................................................................................. 102 Request Syntax .................................................................................................................................... 102 URI Request Parameters ................................................................................................................... 102 Request Body ....................................................................................................................................... 102 Response Syntax ................................................................................................................................. 102 Response Elements ............................................................................................................................ 102 Errors ..................................................................................................................................................... 102 See Also ................................................................................................................................................ 103 DeleteRule ................................................................................................................................................. 105 Request Syntax .................................................................................................................................... 105 URI Request Parameters ................................................................................................................... 105 Request Body ....................................................................................................................................... 106 Response Syntax ................................................................................................................................. 106 Response Elements ............................................................................................................................ 106 Errors ..................................................................................................................................................... 106 See Also ................................................................................................................................................ 107 DeleteService ............................................................................................................................................ 108 Request Syntax .................................................................................................................................... 108 URI Request Parameters ................................................................................................................... 108 Request Body ....................................................................................................................................... 108 Response Syntax ................................................................................................................................. 108 Response Elements ............................................................................................................................ 109 Errors ..................................................................................................................................................... 110 See Also ................................................................................................................................................ 111 DeleteServiceNetwork ............................................................................................................................. 112 Request Syntax .................................................................................................................................... 112 URI Request Parameters ................................................................................................................... 112 Request Body ....................................................................................................................................... 112 Response Syntax ................................................................................................................................. 112 Response Elements ............................................................................................................................ 112 Errors ..................................................................................................................................................... 113 See Also ................................................................................................................................................ 113 API Version 2022-11-30 vii Amazon VPC Lattice API Reference DeleteServiceNetworkResourceAssociation ........................................................................................ 115 Request Syntax .................................................................................................................................... 115 URI Request Parameters ................................................................................................................... 115 Request Body ....................................................................................................................................... 115 Response Syntax ................................................................................................................................. 115 Response Elements ............................................................................................................................ 116 Errors ..................................................................................................................................................... 116 See Also ................................................................................................................................................ 117 DeleteServiceNetworkServiceAssociation ........................................................................................... 119 Request Syntax .................................................................................................................................... 119 URI Request Parameters ................................................................................................................... 119 Request Body ....................................................................................................................................... 119 Response Syntax ................................................................................................................................. 119 Response Elements ............................................................................................................................ 120 Errors ..................................................................................................................................................... 120 See Also ................................................................................................................................................ 121 DeleteServiceNetworkVpcAssociation .................................................................................................. 123 Request Syntax .................................................................................................................................... 123 URI Request Parameters ................................................................................................................... 123 Request Body ....................................................................................................................................... 123 Response Syntax ................................................................................................................................. 123 Response Elements ............................................................................................................................ 124 Errors ..................................................................................................................................................... 124 See Also ................................................................................................................................................ 125 DeleteTargetGroup ................................................................................................................................... 127 Request Syntax .................................................................................................................................... 127 URI Request Parameters ................................................................................................................... 127 Request Body ....................................................................................................................................... 127 Response Syntax ................................................................................................................................. 127 Response Elements ............................................................................................................................ 128 Errors ..................................................................................................................................................... 128 See Also ................................................................................................................................................ 129 DeregisterTargets ..................................................................................................................................... 131 Request Syntax .................................................................................................................................... 131 URI Request Parameters ................................................................................................................... 131 Request Body ....................................................................................................................................... 131 API Version 2022-11-30 viii Amazon VPC Lattice API Reference Response Syntax ................................................................................................................................. 132 Response Elements ............................................................................................................................ 132 Errors ..................................................................................................................................................... 133 See Also ................................................................................................................................................ 133 GetAccessLogSubscription ...................................................................................................................... 135 Request Syntax .................................................................................................................................... 135 URI Request Parameters ................................................................................................................... 135 Request Body ....................................................................................................................................... 135 Response Syntax ................................................................................................................................. 135 Response Elements ............................................................................................................................ 136 Errors ..................................................................................................................................................... 137 See Also ................................................................................................................................................ 138 GetAuthPolicy ........................................................................................................................................... 140 Request Syntax .................................................................................................................................... 140 URI Request Parameters ................................................................................................................... 140 Request Body ....................................................................................................................................... 140 Response Syntax ................................................................................................................................. 140 Response Elements ............................................................................................................................ 141 Errors ..................................................................................................................................................... 141 See Also ................................................................................................................................................ 142 GetListener ................................................................................................................................................ 144 Request Syntax .................................................................................................................................... 144 URI Request Parameters ................................................................................................................... 144 Request Body ....................................................................................................................................... 144 Response Syntax ................................................................................................................................. 144 Response Elements ............................................................................................................................ 145 Errors ..................................................................................................................................................... 147 See Also ................................................................................................................................................ 148 GetResourceConfiguration ..................................................................................................................... 149 Request Syntax .................................................................................................................................... 149 URI Request Parameters ................................................................................................................... 149 Request Body ....................................................................................................................................... 149 Response Syntax ................................................................................................................................. 149 Response Elements ............................................................................................................................ 150 Errors ..................................................................................................................................................... 153 See Also ................................................................................................................................................ 154 API Version 2022-11-30 ix Amazon VPC Lattice API Reference GetResourceGateway ............................................................................................................................... 155 Request Syntax .................................................................................................................................... 155 URI Request Parameters ................................................................................................................... 155 Request Body ....................................................................................................................................... 155 Response Syntax ................................................................................................................................. 155 Response Elements ............................................................................................................................ 156 Errors ..................................................................................................................................................... 158 See Also ................................................................................................................................................ 158 GetResourcePolicy .................................................................................................................................... 160 Request Syntax .................................................................................................................................... 160 URI Request Parameters ................................................................................................................... 160 Request Body ....................................................................................................................................... 160 Response Syntax ................................................................................................................................. 160 Response Elements ............................................................................................................................ 161 Errors ..................................................................................................................................................... 161 See Also ................................................................................................................................................ 162 GetRule ....................................................................................................................................................... 163 Request Syntax .................................................................................................................................... 163 URI Request Parameters ................................................................................................................... 163 Request Body ....................................................................................................................................... 164 Response Syntax ................................................................................................................................. 164 Response Elements ............................................................................................................................ 164 Errors ..................................................................................................................................................... 166 See Also ................................................................................................................................................ 167 GetService .................................................................................................................................................. 168 Request Syntax .................................................................................................................................... 168 URI Request Parameters ................................................................................................................... 168 Request Body ....................................................................................................................................... 168 Response Syntax ................................................................................................................................. 168 Response Elements ............................................................................................................................ 169 Errors ..................................................................................................................................................... 171 See Also ................................................................................................................................................ 172 GetServiceNetwork .................................................................................................................................. 173 Request Syntax .................................................................................................................................... 173 URI Request Parameters ................................................................................................................... 173 Request Body ....................................................................................................................................... 173 API Version 2022-11-30 x Amazon VPC Lattice API Reference Response Syntax ................................................................................................................................. 173 Response Elements ............................................................................................................................ 174 Errors ..................................................................................................................................................... 175 See Also ................................................................................................................................................ 176 GetServiceNetworkResourceAssociation ............................................................................................. 177 Request Syntax .................................................................................................................................... 177 URI Request Parameters ................................................................................................................... 177 Request Body ....................................................................................................................................... 177 Response Syntax ................................................................................................................................. 177 Response Elements ............................................................................................................................ 178 Errors ..................................................................................................................................................... 181 See Also ................................................................................................................................................ 182 GetServiceNetworkServiceAssociation ................................................................................................. 183 Request Syntax .................................................................................................................................... 183 URI Request Parameters ................................................................................................................... 183 Request Body ....................................................................................................................................... 183 Response Syntax ................................................................................................................................. 183 Response Elements ............................................................................................................................ 184 Errors ..................................................................................................................................................... 187 See Also ................................................................................................................................................ 188 GetServiceNetworkVpcAssociation ....................................................................................................... 189 Request Syntax .................................................................................................................................... 189 URI Request Parameters ................................................................................................................... 189 Request Body ....................................................................................................................................... 189 Response Syntax ................................................................................................................................. 189 Response Elements ............................................................................................................................ 190 Errors ..................................................................................................................................................... 192 See Also ................................................................................................................................................ 193 GetTargetGroup ........................................................................................................................................ 194 Request Syntax .................................................................................................................................... 194 URI Request Parameters ................................................................................................................... 194 Request Body ....................................................................................................................................... 194 Response Syntax ................................................................................................................................. 194 Response Elements ............................................................................................................................ 195 Errors ..................................................................................................................................................... 197 See Also ................................................................................................................................................ 198 API Version 2022-11-30 xi Amazon VPC Lattice API Reference ListAccessLogSubscriptions .................................................................................................................... 199 Request Syntax .................................................................................................................................... 199 URI Request Parameters ................................................................................................................... 199 Request Body ....................................................................................................................................... 199 Response Syntax ................................................................................................................................. 200 Response Elements ............................................................................................................................ 200 Errors ..................................................................................................................................................... 201 See Also ................................................................................................................................................ 201 ListListeners ............................................................................................................................................... 203 Request Syntax .................................................................................................................................... 203 URI Request Parameters ................................................................................................................... 203 Request Body ....................................................................................................................................... 203 Response Syntax ................................................................................................................................. 203 Response Elements
vpc-lattice-api-003
vpc-lattice-api.pdf
3
Errors ..................................................................................................................................................... 192 See Also ................................................................................................................................................ 193 GetTargetGroup ........................................................................................................................................ 194 Request Syntax .................................................................................................................................... 194 URI Request Parameters ................................................................................................................... 194 Request Body ....................................................................................................................................... 194 Response Syntax ................................................................................................................................. 194 Response Elements ............................................................................................................................ 195 Errors ..................................................................................................................................................... 197 See Also ................................................................................................................................................ 198 API Version 2022-11-30 xi Amazon VPC Lattice API Reference ListAccessLogSubscriptions .................................................................................................................... 199 Request Syntax .................................................................................................................................... 199 URI Request Parameters ................................................................................................................... 199 Request Body ....................................................................................................................................... 199 Response Syntax ................................................................................................................................. 200 Response Elements ............................................................................................................................ 200 Errors ..................................................................................................................................................... 201 See Also ................................................................................................................................................ 201 ListListeners ............................................................................................................................................... 203 Request Syntax .................................................................................................................................... 203 URI Request Parameters ................................................................................................................... 203 Request Body ....................................................................................................................................... 203 Response Syntax ................................................................................................................................. 203 Response Elements ............................................................................................................................ 204 Errors ..................................................................................................................................................... 204 See Also ................................................................................................................................................ 205 ListResourceConfigurations .................................................................................................................... 207 Request Syntax .................................................................................................................................... 207 URI Request Parameters ................................................................................................................... 207 Request Body ....................................................................................................................................... 208 Response Syntax ................................................................................................................................. 208 Response Elements ............................................................................................................................ 208 Errors ..................................................................................................................................................... 209 See Also ................................................................................................................................................ 209 ListResourceEndpointAssociations ........................................................................................................ 211 Request Syntax .................................................................................................................................... 211 URI Request Parameters ................................................................................................................... 211 Request Body ....................................................................................................................................... 212 Response Syntax ................................................................................................................................. 212 Response Elements ............................................................................................................................ 213 Errors ..................................................................................................................................................... 213 See Also ................................................................................................................................................ 214 ListResourceGateways ............................................................................................................................. 215 Request Syntax .................................................................................................................................... 215 URI Request Parameters ................................................................................................................... 215 Request Body ....................................................................................................................................... 215 API Version 2022-11-30 xii Amazon VPC Lattice API Reference Response Syntax ................................................................................................................................. 215 Response Elements ............................................................................................................................ 216 Errors ..................................................................................................................................................... 216 See Also ................................................................................................................................................ 217 ListRules ..................................................................................................................................................... 218 Request Syntax .................................................................................................................................... 218 URI Request Parameters ................................................................................................................... 218 Request Body ....................................................................................................................................... 219 Response Syntax ................................................................................................................................. 219 Response Elements ............................................................................................................................ 219 Errors ..................................................................................................................................................... 220 See Also ................................................................................................................................................ 220 ListServiceNetworkResourceAssociations ............................................................................................ 222 Request Syntax .................................................................................................................................... 222 URI Request Parameters ................................................................................................................... 222 Request Body ....................................................................................................................................... 223 Response Syntax ................................................................................................................................. 223 Response Elements ............................................................................................................................ 224 Errors ..................................................................................................................................................... 224 See Also ................................................................................................................................................ 225 ListServiceNetworks ................................................................................................................................. 226 Request Syntax .................................................................................................................................... 226 URI Request Parameters ................................................................................................................... 226 Request Body ....................................................................................................................................... 226 Response Syntax ................................................................................................................................. 226 Response Elements ............................................................................................................................ 227 Errors ..................................................................................................................................................... 227 See Also ................................................................................................................................................ 228 ListServiceNetworkServiceAssociations ............................................................................................... 229 Request Syntax .................................................................................................................................... 229 URI Request Parameters ................................................................................................................... 229 Request Body ....................................................................................................................................... 230 Response Syntax ................................................................................................................................. 230 Response Elements ............................................................................................................................ 231 Errors ..................................................................................................................................................... 231 See Also ................................................................................................................................................ 232 API Version 2022-11-30 xiii Amazon VPC Lattice API Reference ListServiceNetworkVpcAssociations ..................................................................................................... 233 Request Syntax .................................................................................................................................... 233 URI Request Parameters ................................................................................................................... 233 Request Body ....................................................................................................................................... 234 Response Syntax ................................................................................................................................. 234 Response Elements ............................................................................................................................ 234 Errors ..................................................................................................................................................... 235 See Also ................................................................................................................................................ 235 ListServiceNetworkVpcEndpointAssociations ..................................................................................... 237 Request Syntax .................................................................................................................................... 237 URI Request Parameters ................................................................................................................... 237 Request Body ....................................................................................................................................... 237 Response Syntax ................................................................................................................................. 238 Response Elements ............................................................................................................................ 238 Errors ..................................................................................................................................................... 238 See Also ................................................................................................................................................ 239 ListServices ................................................................................................................................................ 240 Request Syntax .................................................................................................................................... 240 URI Request Parameters ................................................................................................................... 240 Request Body ....................................................................................................................................... 240 Response Syntax ................................................................................................................................. 240 Response Elements ............................................................................................................................ 241 Errors ..................................................................................................................................................... 241 See Also ................................................................................................................................................ 242 ListTagsForResource ................................................................................................................................ 243 Request Syntax .................................................................................................................................... 243 URI Request Parameters ................................................................................................................... 243 Request Body ....................................................................................................................................... 243 Response Syntax ................................................................................................................................. 243 Response Elements ............................................................................................................................ 243 Errors ..................................................................................................................................................... 244 See Also ................................................................................................................................................ 245 ListTargetGroups ...................................................................................................................................... 246 Request Syntax .................................................................................................................................... 246 URI Request Parameters ................................................................................................................... 246 Request Body ....................................................................................................................................... 246 API Version 2022-11-30 xiv Amazon VPC Lattice API Reference Response Syntax ................................................................................................................................. 247 Response Elements ............................................................................................................................ 247 Errors ..................................................................................................................................................... 248 See Also ................................................................................................................................................ 248 ListTargets ................................................................................................................................................. 250 Request Syntax .................................................................................................................................... 250 URI Request Parameters ................................................................................................................... 250 Request Body ....................................................................................................................................... 251 Response Syntax ................................................................................................................................. 251 Response Elements ............................................................................................................................ 251 Errors ..................................................................................................................................................... 252 See Also ................................................................................................................................................ 253 PutAuthPolicy ........................................................................................................................................... 254 Request Syntax .................................................................................................................................... 254 URI Request Parameters ................................................................................................................... 254 Request Body ....................................................................................................................................... 254 Response Syntax ................................................................................................................................. 255 Response Elements ............................................................................................................................ 255 Errors ..................................................................................................................................................... 256 See Also ................................................................................................................................................ 256 PutResourcePolicy .................................................................................................................................... 258 Request Syntax .................................................................................................................................... 258 URI Request Parameters ................................................................................................................... 258 Request Body ....................................................................................................................................... 258 Response Syntax ................................................................................................................................. 259 Response Elements ............................................................................................................................ 259 Errors ..................................................................................................................................................... 259 See Also ................................................................................................................................................ 260 RegisterTargets ......................................................................................................................................... 261 Request Syntax .................................................................................................................................... 261 URI Request Parameters ................................................................................................................... 261 Request Body ....................................................................................................................................... 261 Response Syntax ................................................................................................................................. 262 Response Elements ............................................................................................................................ 262 Errors ..................................................................................................................................................... 263 See Also ................................................................................................................................................ 264 API Version 2022-11-30 xv Amazon VPC Lattice API Reference TagResource .............................................................................................................................................. 265 Request Syntax .................................................................................................................................... 265 URI Request Parameters ................................................................................................................... 265 Request Body ....................................................................................................................................... 265 Response Syntax ................................................................................................................................. 266 Response Elements ............................................................................................................................ 266 Errors ..................................................................................................................................................... 266 See Also ................................................................................................................................................ 267 UntagResource .......................................................................................................................................... 268 Request Syntax .................................................................................................................................... 268 URI Request Parameters ................................................................................................................... 268 Request Body ....................................................................................................................................... 268 Response Syntax ................................................................................................................................. 268 Response Elements ............................................................................................................................ 269 Errors ..................................................................................................................................................... 269 See Also ................................................................................................................................................ 269 UpdateAccessLogSubscription ............................................................................................................... 271 Request Syntax .................................................................................................................................... 271 URI Request Parameters ................................................................................................................... 271 Request Body ....................................................................................................................................... 271 Response Syntax ................................................................................................................................. 272 Response Elements ............................................................................................................................ 272 Errors ..................................................................................................................................................... 273 See Also ................................................................................................................................................ 274 UpdateListener ......................................................................................................................................... 276 Request Syntax .................................................................................................................................... 276 URI Request Parameters ................................................................................................................... 276 Request Body ....................................................................................................................................... 277 Response Syntax ................................................................................................................................. 277 Response Elements ............................................................................................................................ 277 Errors ..................................................................................................................................................... 279 See Also ................................................................................................................................................ 280 UpdateResourceConfiguration ............................................................................................................... 281 Request Syntax .................................................................................................................................... 281 URI Request Parameters ................................................................................................................... 281 Request Body ....................................................................................................................................... 281 API Version 2022-11-30 xvi Amazon VPC Lattice API Reference Response Syntax ................................................................................................................................. 282 Response Elements ............................................................................................................................ 283 Errors .....................................................................................................................................................
vpc-lattice-api-004
vpc-lattice-api.pdf
4
Also ................................................................................................................................................ 269 UpdateAccessLogSubscription ............................................................................................................... 271 Request Syntax .................................................................................................................................... 271 URI Request Parameters ................................................................................................................... 271 Request Body ....................................................................................................................................... 271 Response Syntax ................................................................................................................................. 272 Response Elements ............................................................................................................................ 272 Errors ..................................................................................................................................................... 273 See Also ................................................................................................................................................ 274 UpdateListener ......................................................................................................................................... 276 Request Syntax .................................................................................................................................... 276 URI Request Parameters ................................................................................................................... 276 Request Body ....................................................................................................................................... 277 Response Syntax ................................................................................................................................. 277 Response Elements ............................................................................................................................ 277 Errors ..................................................................................................................................................... 279 See Also ................................................................................................................................................ 280 UpdateResourceConfiguration ............................................................................................................... 281 Request Syntax .................................................................................................................................... 281 URI Request Parameters ................................................................................................................... 281 Request Body ....................................................................................................................................... 281 API Version 2022-11-30 xvi Amazon VPC Lattice API Reference Response Syntax ................................................................................................................................. 282 Response Elements ............................................................................................................................ 283 Errors ..................................................................................................................................................... 285 See Also ................................................................................................................................................ 286 UpdateResourceGateway ........................................................................................................................ 287 Request Syntax .................................................................................................................................... 287 URI Request Parameters ................................................................................................................... 287 Request Body ....................................................................................................................................... 287 Response Syntax ................................................................................................................................. 288 Response Elements ............................................................................................................................ 288 Errors ..................................................................................................................................................... 290 See Also ................................................................................................................................................ 291 UpdateRule ................................................................................................................................................ 292 Request Syntax .................................................................................................................................... 292 URI Request Parameters ................................................................................................................... 292 Request Body ....................................................................................................................................... 293 Response Syntax ................................................................................................................................. 294 Response Elements ............................................................................................................................ 294 Errors ..................................................................................................................................................... 295 See Also ................................................................................................................................................ 296 UpdateService ........................................................................................................................................... 298 Request Syntax .................................................................................................................................... 298 URI Request Parameters ................................................................................................................... 298 Request Body ....................................................................................................................................... 298 Response Syntax ................................................................................................................................. 299 Response Elements ............................................................................................................................ 299 Errors ..................................................................................................................................................... 301 See Also ................................................................................................................................................ 302 UpdateServiceNetwork ........................................................................................................................... 303 Request Syntax .................................................................................................................................... 303 URI Request Parameters ................................................................................................................... 303 Request Body ....................................................................................................................................... 303 Response Syntax ................................................................................................................................. 304 Response Elements ............................................................................................................................ 304 Errors ..................................................................................................................................................... 305 See Also ................................................................................................................................................ 306 API Version 2022-11-30 xvii Amazon VPC Lattice API Reference UpdateServiceNetworkVpcAssociation ................................................................................................ 307 Request Syntax .................................................................................................................................... 307 URI Request Parameters ................................................................................................................... 307 Request Body ....................................................................................................................................... 307 Response Syntax ................................................................................................................................. 308 Response Elements ............................................................................................................................ 308 Errors ..................................................................................................................................................... 309 See Also ................................................................................................................................................ 310 UpdateTargetGroup ................................................................................................................................. 312 Request Syntax .................................................................................................................................... 312 URI Request Parameters ................................................................................................................... 312 Request Body ....................................................................................................................................... 312 Response Syntax ................................................................................................................................. 313 Response Elements ............................................................................................................................ 314 Errors ..................................................................................................................................................... 315 See Also ................................................................................................................................................ 316 Data Types ................................................................................................................................... 317 AccessLogSubscriptionSummary ........................................................................................................... 319 Contents ............................................................................................................................................... 319 See Also ................................................................................................................................................ 321 ArnResource .............................................................................................................................................. 322 Contents ............................................................................................................................................... 322 See Also ................................................................................................................................................ 322 DnsEntry .................................................................................................................................................... 323 Contents ............................................................................................................................................... 323 See Also ................................................................................................................................................ 323 DnsResource .............................................................................................................................................. 324 Contents ............................................................................................................................................... 324 See Also ................................................................................................................................................ 324 FixedResponseAction ............................................................................................................................... 325 Contents ............................................................................................................................................... 325 See Also ................................................................................................................................................ 325 ForwardAction ........................................................................................................................................... 326 Contents ............................................................................................................................................... 326 See Also ................................................................................................................................................ 326 HeaderMatch ............................................................................................................................................. 327 API Version 2022-11-30 xviii Amazon VPC Lattice API Reference Contents ............................................................................................................................................... 327 See Also ................................................................................................................................................ 327 HeaderMatchType .................................................................................................................................... 329 Contents ............................................................................................................................................... 329 See Also ................................................................................................................................................ 330 HealthCheckConfig .................................................................................................................................. 331 Contents ............................................................................................................................................... 331 See Also ................................................................................................................................................ 333 HttpMatch .................................................................................................................................................. 334 Contents ............................................................................................................................................... 334 See Also ................................................................................................................................................ 334 IpResource ................................................................................................................................................. 336 Contents ............................................................................................................................................... 336 See Also ................................................................................................................................................ 336 ListenerSummary ..................................................................................................................................... 337 Contents ............................................................................................................................................... 337 See Also ................................................................................................................................................ 338 Matcher ...................................................................................................................................................... 339 Contents ............................................................................................................................................... 339 See Also ................................................................................................................................................ 339 PathMatch .................................................................................................................................................. 340 Contents ............................................................................................................................................... 340 See Also ................................................................................................................................................ 340 PathMatchType ......................................................................................................................................... 341 Contents ............................................................................................................................................... 341 See Also ................................................................................................................................................ 341 ResourceConfigurationDefinition .......................................................................................................... 343 Contents ............................................................................................................................................... 343 See Also ................................................................................................................................................ 343 ResourceConfigurationSummary .......................................................................................................... 345 Contents ............................................................................................................................................... 345 See Also ................................................................................................................................................ 347 ResourceEndpointAssociationSummary .............................................................................................. 348 Contents ............................................................................................................................................... 348 See Also ................................................................................................................................................ 350 ResourceGatewaySummary .................................................................................................................... 351 API Version 2022-11-30 xix Amazon VPC Lattice API Reference Contents ............................................................................................................................................... 351 See Also ................................................................................................................................................ 353 RuleAction ................................................................................................................................................. 354 Contents ............................................................................................................................................... 354 See Also ................................................................................................................................................ 354 RuleMatch .................................................................................................................................................. 355 Contents ............................................................................................................................................... 355 See Also ................................................................................................................................................ 355 RuleSummary ............................................................................................................................................ 356 Contents ............................................................................................................................................... 356 See Also ................................................................................................................................................ 357 RuleUpdate ................................................................................................................................................ 358 Contents ............................................................................................................................................... 358 See Also ................................................................................................................................................ 359 RuleUpdateFailure .................................................................................................................................... 360 Contents ............................................................................................................................................... 360 See Also ................................................................................................................................................ 360 RuleUpdateSuccess .................................................................................................................................. 362 Contents ............................................................................................................................................... 362 See Also ................................................................................................................................................ 363 ServiceNetworkEndpointAssociation .................................................................................................... 365 Contents ............................................................................................................................................... 365 See Also ................................................................................................................................................ 366 ServiceNetworkResourceAssociationSummary .................................................................................. 367 Contents ............................................................................................................................................... 367 See Also ................................................................................................................................................ 370 ServiceNetworkServiceAssociationSummary ...................................................................................... 371 Contents ............................................................................................................................................... 371 See Also ................................................................................................................................................ 374 ServiceNetworkSummary ....................................................................................................................... 375 Contents ............................................................................................................................................... 375 See Also ................................................................................................................................................ 376 ServiceNetworkVpcAssociationSummary ............................................................................................ 378 Contents ............................................................................................................................................... 378 See Also ................................................................................................................................................ 380 ServiceSummary ....................................................................................................................................... 381 API Version 2022-11-30 xx Amazon VPC Lattice API Reference Contents ............................................................................................................................................... 381 See Also ................................................................................................................................................ 383 SharingConfig ........................................................................................................................................... 384 Contents ............................................................................................................................................... 384 See Also ................................................................................................................................................ 384 Target .......................................................................................................................................................... 385 Contents ............................................................................................................................................... 385 See Also ................................................................................................................................................ 385 TargetFailure ............................................................................................................................................. 386 Contents ............................................................................................................................................... 386 See Also ................................................................................................................................................ 387 TargetGroupConfig .................................................................................................................................. 388 Contents ............................................................................................................................................... 388 See Also ................................................................................................................................................ 389 TargetGroupSummary ............................................................................................................................. 391 Contents ............................................................................................................................................... 391 See Also ................................................................................................................................................ 394 TargetSummary ........................................................................................................................................ 395 Contents ............................................................................................................................................... 395 See Also ................................................................................................................................................ 396 ValidationExceptionField ........................................................................................................................ 397 Contents ............................................................................................................................................... 397 See Also ................................................................................................................................................ 397 WeightedTargetGroup ............................................................................................................................. 398 Contents ............................................................................................................................................... 398 See Also ................................................................................................................................................ 398 Common Parameters ................................................................................................................... 400 Common Errors ............................................................................................................................ 403 API Version 2022-11-30 xxi Amazon VPC Lattice Welcome API Reference Amazon VPC Lattice is a fully managed application networking service that you use to connect, secure, and monitor all of your services across multiple accounts and virtual private clouds (VPCs). Amazon VPC Lattice interconnects your microservices and legacy services within a logical boundary, so that you can discover and manage them more efficiently. For more information, see the Amazon VPC Lattice
vpc-lattice-api-005
vpc-lattice-api.pdf
5
396 ValidationExceptionField ........................................................................................................................ 397 Contents ............................................................................................................................................... 397 See Also ................................................................................................................................................ 397 WeightedTargetGroup ............................................................................................................................. 398 Contents ............................................................................................................................................... 398 See Also ................................................................................................................................................ 398 Common Parameters ................................................................................................................... 400 Common Errors ............................................................................................................................ 403 API Version 2022-11-30 xxi Amazon VPC Lattice Welcome API Reference Amazon VPC Lattice is a fully managed application networking service that you use to connect, secure, and monitor all of your services across multiple accounts and virtual private clouds (VPCs). Amazon VPC Lattice interconnects your microservices and legacy services within a logical boundary, so that you can discover and manage them more efficiently. For more information, see the Amazon VPC Lattice User Guide This document was last published on May 21, 2025. API Version 2022-11-30 1 Amazon VPC Lattice Actions The following actions are supported: • BatchUpdateRule • CreateAccessLogSubscription • CreateListener • CreateResourceConfiguration • CreateResourceGateway • CreateRule • CreateService • CreateServiceNetwork • CreateServiceNetworkResourceAssociation • CreateServiceNetworkServiceAssociation • CreateServiceNetworkVpcAssociation • CreateTargetGroup • DeleteAccessLogSubscription • DeleteAuthPolicy • DeleteListener • DeleteResourceConfiguration • DeleteResourceEndpointAssociation • DeleteResourceGateway • DeleteResourcePolicy • DeleteRule • DeleteService • DeleteServiceNetwork • DeleteServiceNetworkResourceAssociation • DeleteServiceNetworkServiceAssociation • DeleteServiceNetworkVpcAssociation • DeleteTargetGroup • DeregisterTargets API Reference API Version 2022-11-30 2 Amazon VPC Lattice • GetAccessLogSubscription • GetAuthPolicy • GetListener • GetResourceConfiguration • GetResourceGateway • GetResourcePolicy • GetRule • GetService • GetServiceNetwork • GetServiceNetworkResourceAssociation • GetServiceNetworkServiceAssociation • GetServiceNetworkVpcAssociation • GetTargetGroup • ListAccessLogSubscriptions • ListListeners • ListResourceConfigurations • ListResourceEndpointAssociations • ListResourceGateways • ListRules • ListServiceNetworkResourceAssociations • ListServiceNetworks • ListServiceNetworkServiceAssociations • ListServiceNetworkVpcAssociations • ListServiceNetworkVpcEndpointAssociations • ListServices • ListTagsForResource • ListTargetGroups • ListTargets • PutAuthPolicy • PutResourcePolicy API Reference API Version 2022-11-30 3 Amazon VPC Lattice • RegisterTargets • TagResource • UntagResource • UpdateAccessLogSubscription • UpdateListener • UpdateResourceConfiguration • UpdateResourceGateway • UpdateRule • UpdateService • UpdateServiceNetwork • UpdateServiceNetworkVpcAssociation • UpdateTargetGroup API Reference API Version 2022-11-30 4 Amazon VPC Lattice BatchUpdateRule API Reference Updates the listener rules in a batch. You can use this operation to change the priority of listener rules. This can be useful when bulk updating or swapping rule priority. Required permissions: vpc-lattice:UpdateRule For more information, see How Amazon VPC Lattice works with IAM in the Amazon VPC Lattice User Guide. Request Syntax PATCH /services/serviceIdentifier/listeners/listenerIdentifier/rules HTTP/1.1 Content-type: application/json { "rules": [ { "action": { ... }, "match": { ... }, "priority": number, "ruleIdentifier": "string" } ] } URI Request Parameters The request uses the following URI parameters. listenerIdentifier The ID or ARN of the listener. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((listener-[0-9a-z]{17})|(^arn:[a-z0-9\-]+:vpc-lattice:[a-zA- Z0-9\-]+:\d{12}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z] {17}$))$ Required: Yes BatchUpdateRule API Version 2022-11-30 5 Amazon VPC Lattice serviceIdentifier The ID or ARN of the service. API Reference Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((svc-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:service/svc-[0-9a-z]{17}))$ Required: Yes Request Body The request accepts the following data in JSON format. rules The rules for the specified listener. Type: Array of RuleUpdate objects Array Members: Minimum number of 1 item. Maximum number of 5 items. Required: Yes Response Syntax HTTP/1.1 200 Content-type: application/json { "successful": [ { "action": { ... }, "arn": "string", "id": "string", "isDefault": boolean, "match": { ... }, "name": "string", "priority": number } ], Request Body API Version 2022-11-30 6 Amazon VPC Lattice API Reference "unsuccessful": [ { "failureCode": "string", "failureMessage": "string", "ruleIdentifier": "string" } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. successful The rules that were successfully updated. Type: Array of RuleUpdateSuccess objects unsuccessful The rules that the operation couldn't update. Type: Array of RuleUpdateFailure objects Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 Response Elements API Version 2022-11-30 7 Amazon VPC Lattice InternalServerException API Reference An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 8 Amazon VPC Lattice API Reference CreateAccessLogSubscription Enables access logs to be sent to Amazon CloudWatch, Amazon
vpc-lattice-api-006
vpc-lattice-api.pdf
6
HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 8 Amazon VPC Lattice API Reference CreateAccessLogSubscription Enables access logs to be sent to Amazon CloudWatch, Amazon S3, and Amazon Kinesis Data Firehose. The service network owner can use the access logs to audit the services in the network. The service network owner can only see access logs from clients and services that are associated with their service network. Access log entries represent traffic originated from VPCs associated with that network. For more information, see Access logs in the Amazon VPC Lattice User Guide. Request Syntax POST /accesslogsubscriptions HTTP/1.1 Content-type: application/json { "clientToken": "string", "destinationArn": "string", "resourceIdentifier": "string", "serviceNetworkLogType": "string", "tags": { "string" : "string" } } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. clientToken A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. CreateAccessLogSubscription API Version 2022-11-30 9 Amazon VPC Lattice Pattern: [!-~]+ Required: No destinationArn API Reference The Amazon Resource Name (ARN) of the destination. The supported destination types are CloudWatch Log groups, Kinesis Data Firehose delivery streams, and Amazon S3 buckets. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?) {2}:([^/].*)?$ Required: Yes resourceIdentifier The ID or ARN of the service network or service. Type: String Length Constraints: Minimum length of 17. Maximum length of 200. Pattern: ^((((sn)|(svc)|(rcfg))-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a- z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:((servicenetwork/sn)| (resourceconfiguration/rcfg)|(service/svc))-[0-9a-z]{17}))$ Required: Yes serviceNetworkLogType The type of log that monitors your Amazon VPC Lattice service networks. Type: String Valid Values: SERVICE | RESOURCE Required: No tags The tags for the access log subscription. Type: String to string map Request Body API Version 2022-11-30 10 Amazon VPC Lattice API Reference Map Entries: Minimum number of 0 items. Maximum number of 200 items. Key Length Constraints: Minimum length of 1. Maximum length of 128. Value Length Constraints: Minimum length of 0. Maximum length of 256. Required: No Response Syntax HTTP/1.1 201 Content-type: application/json { "arn": "string", "destinationArn": "string", "id": "string", "resourceArn": "string", "resourceId": "string", "serviceNetworkLogType": "string" } Response Elements If the action is successful, the service sends back an HTTP 201 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the access log subscription. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:accesslogsubscription/als-[0-9a-z]{17}$ destinationArn The Amazon Resource Name (ARN) of the log destination. Response Syntax API Version 2022-11-30 11 Amazon VPC Lattice Type: String API Reference Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?) {2}:([^/].*)?$ id The ID of the access log subscription. Type: String Length Constraints: Fixed length of 21. Pattern: ^als-[0-9a-z]{17}$ resourceArn The Amazon Resource Name (ARN) of the service network or service. Type: String Length Constraints: Minimum length of 20. Maximum length of 200. Pattern: ^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?) {2}:((servicenetwork/sn)|(service/svc)|(resourceconfiguration/rcfg))- [0-9a-z]{17}$ resourceId The ID of the service network or service. Type: String Length Constraints: Minimum length of 20. Maximum length of 50. Pattern: ^((sn)|(svc))-[0-9a-z]{17}$ serviceNetworkLogType The type of log that monitors your Amazon VPC Lattice service networks. Type: String Valid Values: SERVICE | RESOURCE Response Elements API Version 2022-11-30 12 Amazon VPC Lattice Errors API Reference For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: Errors API Version 2022-11-30 13 API Reference Amazon VPC Lattice • AWS Command Line Interface • AWS SDK for .NET
vpc-lattice-api-007
vpc-lattice-api.pdf
7
409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: Errors API Version 2022-11-30 13 API Reference Amazon VPC Lattice • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 14 Amazon VPC Lattice CreateListener API Reference Creates a listener for a service. Before you start using your Amazon VPC Lattice service, you must add one or more listeners. A listener is a process that checks for connection requests to your services. For more information, see Listeners in the Amazon VPC Lattice User Guide. Request Syntax POST /services/serviceIdentifier/listeners HTTP/1.1 Content-type: application/json { "clientToken": "string", "defaultAction": { ... }, "name": "string", "port": number, "protocol": "string", "tags": { "string" : "string" } } URI Request Parameters The request uses the following URI parameters. serviceIdentifier The ID or ARN of the service. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((svc-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:service/svc-[0-9a-z]{17}))$ Required: Yes Request Body The request accepts the following data in JSON format. CreateListener API Version 2022-11-30 15 Amazon VPC Lattice clientToken API Reference A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. Pattern: [!-~]+ Required: No defaultAction The action for the default rule. Each listener has a default rule. The default rule is used if no other rules match. Type: RuleAction object Note: This object is a Union. Only one member of this object can be specified or returned. Required: Yes name The name of the listener. A listener name must be unique within a service. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen. Type: String Length Constraints: Minimum length of 3. Maximum length of 63. Pattern: ^(?!listener-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ Required: Yes port The listener port. You can specify a value from 1 to 65535. For HTTP, the default is 80. For HTTPS, the default is 443. Type: Integer Request Body API Version 2022-11-30 16 Amazon VPC Lattice API Reference Valid Range: Minimum value of 1. Maximum value of 65535. Required: No protocol The listener protocol. Type: String Valid Values: HTTP | HTTPS | TLS_PASSTHROUGH Required: Yes tags The tags for the listener. Type: String to string map Map Entries: Minimum number of 0 items. Maximum number of 200 items. Key Length Constraints: Minimum length of 1. Maximum length of 128. Value Length Constraints: Minimum length of 0. Maximum length of 256. Required: No Response Syntax HTTP/1.1 201 Content-type: application/json { "arn": "string", "defaultAction": { ... }, "id": "string", "name": "string", "port": number, "protocol": "string", "serviceArn": "string", "serviceId": "string" } Response Syntax API Version 2022-11-30 17 Amazon VPC Lattice Response Elements API Reference If the action is successful, the service sends back an HTTP 201 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the listener. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:service/svc- [0-9a-z]{17}/listener/listener-[0-9a-z]{17}$ defaultAction The action for the default rule. Type: RuleAction object Note: This object is a Union. Only one member of this object can be specified or returned. id The ID of the listener. Type: String Length Constraints: Fixed length of 26. Pattern: ^listener-[0-9a-z]{17}$ name The name of the listener. Type: String Length Constraints: Minimum length of 3. Maximum length of 63. Pattern: ^(?!listener-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ Response Elements API Version 2022-11-30 18 API Reference Amazon VPC Lattice port The port number of the listener. Type: Integer Valid Range: Minimum value of 1. Maximum value of 65535. protocol The protocol of the listener. Type: String Valid Values: HTTP | HTTPS | TLS_PASSTHROUGH serviceArn The Amazon Resource Name (ARN) of the service. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:service/svc- [0-9a-z]{17}$ serviceId The ID of the service. Type: String Length Constraints: Fixed length of 21. Pattern: ^svc-[0-9a-z]{17}$ Errors For information about the errors
vpc-lattice-api-008
vpc-lattice-api.pdf
8
length of 3. Maximum length of 63. Pattern: ^(?!listener-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ Response Elements API Version 2022-11-30 18 API Reference Amazon VPC Lattice port The port number of the listener. Type: Integer Valid Range: Minimum value of 1. Maximum value of 65535. protocol The protocol of the listener. Type: String Valid Values: HTTP | HTTPS | TLS_PASSTHROUGH serviceArn The Amazon Resource Name (ARN) of the service. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:service/svc- [0-9a-z]{17}$ serviceId The ID of the service. Type: String Length Constraints: Fixed length of 21. Pattern: ^svc-[0-9a-z]{17}$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. Errors API Version 2022-11-30 19 Amazon VPC Lattice HTTP Status Code: 403 ConflictException API Reference The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET See Also API Version 2022-11-30 20 API Reference Amazon VPC Lattice • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 21 Amazon VPC Lattice API Reference CreateResourceConfiguration Creates a resource configuration. A resource configuration defines a specific resource. You can associate a resource configuration with a service network or a VPC endpoint. Request Syntax POST /resourceconfigurations HTTP/1.1 Content-type: application/json { "allowAssociationToShareableServiceNetwork": boolean, "clientToken": "string", "name": "string", "portRanges": [ "string" ], "protocol": "string", "resourceConfigurationDefinition": { ... }, "resourceConfigurationGroupIdentifier": "string", "resourceGatewayIdentifier": "string", "tags": { "string" : "string" }, "type": "string" } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. allowAssociationToShareableServiceNetwork (SINGLE, GROUP, ARN) Specifies whether the resource configuration can be associated with a sharable service network. The default is false. Type: Boolean Required: No CreateResourceConfiguration API Version 2022-11-30 22 Amazon VPC Lattice clientToken API Reference A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. Pattern: [!-~]+ Required: No name The name of the resource configuration. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen. Type: String Length Constraints: Minimum length of 3. Maximum length of 40. Pattern: ^(?!rcfg-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ Required: Yes portRanges (SINGLE, GROUP, CHILD) The TCP port ranges that a consumer can use to access a resource configuration (for example: 1-65535). You can separate port ranges using commas (for example: 1,2,22-30). Type: Array of strings Length Constraints: Minimum length of 1. Maximum length of 11. Pattern: ^((\d{1,5}\-\d{1,5})|(\d+))$ Required: No protocol (SINGLE, GROUP) The protocol accepted by the resource configuration. Request Body API Version 2022-11-30 23 Amazon VPC Lattice Type: String Valid Values: TCP Required: No resourceConfigurationDefinition API Reference Identifies the resource configuration in one of the following ways: • Amazon Resource Name (ARN) - Supported resource-types that are provisioned by AWS services, such as RDS databases, can be identified by their ARN. • Domain name - Any domain name that is publicly resolvable. • IP address - For IPv4 and IPv6, only IP addresses in the VPC are supported. Type: ResourceConfigurationDefinition object Note: This object is a Union. Only one member of this object can be specified or returned. Required: No resourceConfigurationGroupIdentifier (CHILD) The ID or ARN of the parent resource configuration of type GROUP. This is used to associate a child resource configuration with a group resource configuration. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((rcfg-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}))$ Required: No resourceGatewayIdentifier (SINGLE, GROUP, ARN) The ID or ARN of the resource gateway used to connect to the resource configuration. For a child resource configuration, this value
vpc-lattice-api-009
vpc-lattice-api.pdf
9
IP addresses in the VPC are supported. Type: ResourceConfigurationDefinition object Note: This object is a Union. Only one member of this object can be specified or returned. Required: No resourceConfigurationGroupIdentifier (CHILD) The ID or ARN of the parent resource configuration of type GROUP. This is used to associate a child resource configuration with a group resource configuration. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((rcfg-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}))$ Required: No resourceGatewayIdentifier (SINGLE, GROUP, ARN) The ID or ARN of the resource gateway used to connect to the resource configuration. For a child resource configuration, this value is inherited from the parent resource configuration. Type: String Length Constraints: Minimum length of 17. Maximum length of 2048. Request Body API Version 2022-11-30 24 Amazon VPC Lattice API Reference Pattern: ^((rgw-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourcegateway/rgw-[0-9a-z]{17}))$ Required: No tags The tags for the resource configuration. Type: String to string map Map Entries: Minimum number of 0 items. Maximum number of 200 items. Key Length Constraints: Minimum length of 1. Maximum length of 128. Value Length Constraints: Minimum length of 0. Maximum length of 256. Required: No type The type of resource configuration. A resource configuration can be one of the following types: • SINGLE - A single resource. • GROUP - A group of resources. You must create a group resource configuration before you create a child resource configuration. • CHILD - A single resource that is part of a group resource configuration. • ARN - An AWS resource. Type: String Valid Values: GROUP | CHILD | SINGLE | ARN Required: Yes Response Syntax HTTP/1.1 201 Content-type: application/json { "allowAssociationToShareableServiceNetwork": boolean, "arn": "string", Response Syntax API Version 2022-11-30 25 Amazon VPC Lattice API Reference "createdAt": "string", "failureReason": "string", "id": "string", "name": "string", "portRanges": [ "string" ], "protocol": "string", "resourceConfigurationDefinition": { ... }, "resourceConfigurationGroupId": "string", "resourceGatewayId": "string", "status": "string", "type": "string" } Response Elements If the action is successful, the service sends back an HTTP 201 response. The following data is returned in JSON format by the service. allowAssociationToShareableServiceNetwork Specifies whether the resource configuration can be associated with a sharable service network. Type: Boolean arn The Amazon Resource Name (ARN) of the resource configuration. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9f\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}$ createdAt The date and time that the resource configuration was created, in ISO-8601 format. Type: Timestamp failureReason The reason that the request failed. Response Elements API Version 2022-11-30 26 API Reference Amazon VPC Lattice Type: String id The ID of the resource configuration. Type: String Length Constraints: Fixed length of 22. Pattern: ^rcfg-[0-9a-z]{17}$ name The name of the resource configuration. Type: String Length Constraints: Minimum length of 3. Maximum length of 40. Pattern: ^(?!rcfg-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ portRanges The port range. Type: Array of strings Length Constraints: Minimum length of 1. Maximum length of 11. Pattern: ^((\d{1,5}\-\d{1,5})|(\d+))$ protocol The protocol. Type: String Valid Values: TCP resourceConfigurationDefinition Identifies the resource configuration in one of the following ways: • Amazon Resource Name (ARN) - Supported resource-types that are provisioned by AWS services, such as RDS databases, can be identified by their ARN. • Domain name - Any domain name that is publicly resolvable. Response Elements API Version 2022-11-30 27 Amazon VPC Lattice API Reference • IP address - For IPv4 and IPv6, only IP addresses in the VPC are supported. Type: ResourceConfigurationDefinition object Note: This object is a Union. Only one member of this object can be specified or returned. resourceConfigurationGroupId The ID of the parent resource configuration of type GROUP. Type: String Length Constraints: Fixed length of 22. Pattern: ^rcfg-[0-9a-z]{17}$ resourceGatewayId The ID of the resource gateway associated with the resource configuration. Type: String Length Constraints: Fixed length of 21. Pattern: ^rgw-[0-9a-z]{17}$ status The current status of the resource configuration. Type: String Valid Values: ACTIVE | CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | CREATE_FAILED | UPDATE_FAILED | DELETE_FAILED type The type of resource configuration. A resource configuration can be one of the following types: • SINGLE - A single resource. • GROUP - A group of resources. You must create a group resource configuration before you create a child resource configuration. • CHILD - A single resource that is part of a group resource configuration. • ARN - An AWS resource. Type: String Response Elements API Version 2022-11-30 28 Amazon VPC Lattice API Reference Valid Values: GROUP | CHILD | SINGLE | ARN Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does
vpc-lattice-api-010
vpc-lattice-api.pdf
10
resource. Type: String Response Elements API Version 2022-11-30 28 Amazon VPC Lattice API Reference Valid Values: GROUP | CHILD | SINGLE | ARN Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. Errors API Version 2022-11-30 29 Amazon VPC Lattice HTTP Status Code: 400 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 30 Amazon VPC Lattice API Reference CreateResourceGateway A resource gateway is a point of ingress into the VPC where a resource resides. It spans multiple Availability Zones. For your resource to be accessible from all Availability Zones, you should create your resource gateways to span as many Availability Zones as possible. A VPC can have multiple resource gateways. Request Syntax POST /resourcegateways HTTP/1.1 Content-type: application/json { "clientToken": "string", "ipAddressType": "string", "name": "string", "securityGroupIds": [ "string" ], "subnetIds": [ "string" ], "tags": { "string" : "string" }, "vpcIdentifier": "string" } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. clientToken A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. CreateResourceGateway API Version 2022-11-30 31 Amazon VPC Lattice Pattern: [!-~]+ Required: No ipAddressType API Reference A resource gateway can have IPv4, IPv6 or dualstack addresses. The IP address type of a resource gateway must be compatible with the subnets of the resource gateway and the IP address type of the resource, as described here: • IPv4Assign IPv4 addresses to your resource gateway network interfaces. This option is supported only if all selected subnets have IPv4 address ranges, and the resource also has an IPv4 address. • IPv6Assign IPv6 addresses to your resource gateway network interfaces. This option is supported only if all selected subnets are IPv6 only subnets, and the resource also has an IPv6 address. • DualstackAssign both IPv4 and IPv6 addresses to your resource gateway network interfaces. This option is supported only if all selected subnets have both IPv4 and IPv6 address ranges, and the resource either has an IPv4 or IPv6 address. The IP address type of the resource gateway is independent of the IP address type of the client or the VPC endpoint through which the resource is accessed. Type: String Valid Values: IPV4 | IPV6 | DUALSTACK Required: No name The name of the resource gateway. Type: String Length Constraints: Minimum length of 3. Maximum length of 40. Pattern: ^(?!rgw-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ Required: Yes securityGroupIds The IDs of the security groups to apply to the resource gateway. The security groups must be in the same VPC. Request Body API Version 2022-11-30 32 Amazon VPC Lattice Type: Array of strings API Reference Array Members: Minimum number of 0 items. Maximum number of 5 items. Length Constraints: Minimum length of 5. Maximum length of 200. Pattern: ^sg-(([0-9a-z]{8})|([0-9a-z]{17}))$ Required: No subnetIds The IDs of the VPC subnets in which to create the resource gateway. Type: Array of strings Length Constraints: Minimum length of 5. Maximum length of 200. Required: No tags The tags for the resource gateway. Type: String to string map Map Entries: Minimum number of 0 items. Maximum number of 200 items. Key Length Constraints: Minimum length of 1. Maximum length of 128. Value Length Constraints: Minimum length of 0. Maximum length of 256. Required: No vpcIdentifier The ID of the VPC for the resource gateway. Type: String Length Constraints: Minimum length of 5. Maximum length of 50. Pattern: ^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$ Required: No Request Body API Version 2022-11-30
vpc-lattice-api-011
vpc-lattice-api.pdf
11
to create the resource gateway. Type: Array of strings Length Constraints: Minimum length of 5. Maximum length of 200. Required: No tags The tags for the resource gateway. Type: String to string map Map Entries: Minimum number of 0 items. Maximum number of 200 items. Key Length Constraints: Minimum length of 1. Maximum length of 128. Value Length Constraints: Minimum length of 0. Maximum length of 256. Required: No vpcIdentifier The ID of the VPC for the resource gateway. Type: String Length Constraints: Minimum length of 5. Maximum length of 50. Pattern: ^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$ Required: No Request Body API Version 2022-11-30 33 API Reference Amazon VPC Lattice Response Syntax HTTP/1.1 201 Content-type: application/json { "arn": "string", "id": "string", "ipAddressType": "string", "name": "string", "securityGroupIds": [ "string" ], "status": "string", "subnetIds": [ "string" ], "vpcIdentifier": "string" } Response Elements If the action is successful, the service sends back an HTTP 201 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the resource gateway. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourcegateway/rgw-[0-9a-z]{17}$ id The ID of the resource gateway. Type: String Length Constraints: Fixed length of 21. Pattern: ^rgw-[0-9a-z]{17}$ Response Syntax API Version 2022-11-30 34 API Reference Amazon VPC Lattice ipAddressType The type of IP address for the resource gateway. Type: String Valid Values: IPV4 | IPV6 | DUALSTACK name The name of the resource gateway. Type: String Length Constraints: Minimum length of 3. Maximum length of 40. Pattern: ^(?!rgw-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ securityGroupIds The IDs of the security groups for the resource gateway. Type: Array of strings Length Constraints: Minimum length of 5. Maximum length of 200. Pattern: ^sg-(([0-9a-z]{8})|([0-9a-z]{17}))$ status The status of the resource gateway. Type: String Valid Values: ACTIVE | CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | CREATE_FAILED | UPDATE_FAILED | DELETE_FAILED subnetIds The IDs of the resource gateway subnets. Type: Array of strings Length Constraints: Minimum length of 5. Maximum length of 200. vpcIdentifier The ID of the VPC. Response Elements API Version 2022-11-30 35 Amazon VPC Lattice Type: String API Reference Length Constraints: Minimum length of 5. Maximum length of 50. Pattern: ^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Errors API Version 2022-11-30 36 Amazon VPC Lattice ValidationException API Reference The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 37 Amazon VPC Lattice CreateRule API Reference Creates a listener rule. Each listener has a default rule for checking connection requests, but you can define additional rules. Each rule consists of a priority, one or more actions, and one or more conditions. For more information, see Listener rules in the Amazon VPC Lattice User Guide. Request Syntax POST /services/serviceIdentifier/listeners/listenerIdentifier/rules HTTP/1.1 Content-type: application/json { "action": { ... }, "clientToken": "string", "match": { ... }, "name": "string", "priority": number, "tags": { "string" : "string" } } URI Request Parameters The request uses the following URI parameters. listenerIdentifier The ID or ARN of the listener. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((listener-[0-9a-z]{17})|(^arn:[a-z0-9\-]+:vpc-lattice:[a-zA- Z0-9\-]+:\d{12}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z] {17}$))$ Required: Yes serviceIdentifier The ID or ARN of the service. CreateRule API Version 2022-11-30 38 Amazon VPC Lattice API Reference Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((svc-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:service/svc-[0-9a-z]{17}))$ Required: Yes Request Body The request accepts the following data in JSON format. action The action for the default rule. Type: RuleAction object Note: This object is a Union. Only one member of this object can be specified or returned. Required: Yes clientToken A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry
vpc-lattice-api-012
vpc-lattice-api.pdf
12
of the service. CreateRule API Version 2022-11-30 38 Amazon VPC Lattice API Reference Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((svc-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:service/svc-[0-9a-z]{17}))$ Required: Yes Request Body The request accepts the following data in JSON format. action The action for the default rule. Type: RuleAction object Note: This object is a Union. Only one member of this object can be specified or returned. Required: Yes clientToken A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. Pattern: [!-~]+ Required: No match The rule match. Type: RuleMatch object Note: This object is a Union. Only one member of this object can be specified or returned. Required: Yes Request Body API Version 2022-11-30 39 Amazon VPC Lattice name API Reference The name of the rule. The name must be unique within the listener. The valid characters are a- z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen. Type: String Length Constraints: Minimum length of 3. Maximum length of 63. Pattern: ^(?!rule-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ Required: Yes priority The priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority. Type: Integer Valid Range: Minimum value of 1. Maximum value of 2000. Required: Yes tags The tags for the rule. Type: String to string map Map Entries: Minimum number of 0 items. Maximum number of 200 items. Key Length Constraints: Minimum length of 1. Maximum length of 128. Value Length Constraints: Minimum length of 0. Maximum length of 256. Required: No Response Syntax HTTP/1.1 201 Content-type: application/json Response Syntax API Version 2022-11-30 40 Amazon VPC Lattice API Reference { "action": { ... }, "arn": "string", "id": "string", "match": { ... }, "name": "string", "priority": number } Response Elements If the action is successful, the service sends back an HTTP 201 response. The following data is returned in JSON format by the service. action The rule action. Type: RuleAction object Note: This object is a Union. Only one member of this object can be specified or returned. arn The Amazon Resource Name (ARN) of the rule. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:service/svc- [0-9a-z]{17}/listener/listener-[0-9a-z]{17}/rule/rule-[0-9a-z]{17}$ id The ID of the rule. Type: String Length Constraints: Minimum length of 5. Maximum length of 22. Pattern: ^rule-[0-9a-z]{17}$ Response Elements API Version 2022-11-30 41 Amazon VPC Lattice match API Reference The rule match. The RuleMatch must be an HttpMatch. This means that the rule should be an exact match on HTTP constraints which are made up of the HTTP method, path, and header. Type: RuleMatch object Note: This object is a Union. Only one member of this object can be specified or returned. name The name of the rule. Type: String Length Constraints: Minimum length of 3. Maximum length of 63. Pattern: ^(?!rule-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ priority The priority assigned to the rule. The lower the priority number the higher the priority. Type: Integer Valid Range: Minimum value of 1. Maximum value of 2000. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 Errors API Version 2022-11-30 42 Amazon VPC Lattice InternalServerException API Reference An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin See Also API Version 2022-11-30 43 Amazon VPC Lattice • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 44 Amazon VPC Lattice CreateService API Reference Creates a service. A service is any software application that
vpc-lattice-api-013
vpc-lattice-api.pdf
13
this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin See Also API Version 2022-11-30 43 Amazon VPC Lattice • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 44 Amazon VPC Lattice CreateService API Reference Creates a service. A service is any software application that can run on instances containers, or serverless functions within an account or virtual private cloud (VPC). For more information, see Services in the Amazon VPC Lattice User Guide. Request Syntax POST /services HTTP/1.1 Content-type: application/json { "authType": "string", "certificateArn": "string", "clientToken": "string", "customDomainName": "string", "name": "string", "tags": { "string" : "string" } } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. authType The type of IAM policy. • NONE: The resource does not use an IAM policy. This is the default. • AWS_IAM: The resource uses an IAM policy. When this type is used, auth is enabled and an auth policy is required. Type: String Valid Values: NONE | AWS_IAM CreateService API Version 2022-11-30 45 Amazon VPC Lattice Required: No certificateArn API Reference The Amazon Resource Name (ARN) of the certificate. Type: String Length Constraints: Minimum length of 0. Maximum length of 2048. Pattern: ^(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a- z0-9]+)*)?){2}:certificate/[0-9a-z-]+)?$ Required: No clientToken A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. Pattern: [!-~]+ Required: No customDomainName The custom domain name of the service. Type: String Length Constraints: Minimum length of 3. Maximum length of 255. Required: No name The name of the service. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen. Type: String Request Body API Version 2022-11-30 46 Amazon VPC Lattice API Reference Length Constraints: Minimum length of 3. Maximum length of 40. Pattern: ^(?!svc-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ Required: Yes tags The tags for the service. Type: String to string map Map Entries: Minimum number of 0 items. Maximum number of 200 items. Key Length Constraints: Minimum length of 1. Maximum length of 128. Value Length Constraints: Minimum length of 0. Maximum length of 256. Required: No Response Syntax HTTP/1.1 201 Content-type: application/json { "arn": "string", "authType": "string", "certificateArn": "string", "customDomainName": "string", "dnsEntry": { "domainName": "string", "hostedZoneId": "string" }, "id": "string", "name": "string", "status": "string" } Response Elements If the action is successful, the service sends back an HTTP 201 response. Response Syntax API Version 2022-11-30 47 Amazon VPC Lattice API Reference The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the service. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:service/svc- [0-9a-z]{17}$ authType The type of IAM policy. Type: String Valid Values: NONE | AWS_IAM certificateArn The Amazon Resource Name (ARN) of the certificate. Type: String Length Constraints: Minimum length of 0. Maximum length of 2048. Pattern: ^(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a- z0-9]+)*)?){2}:certificate/[0-9a-z-]+)?$ customDomainName The custom domain name of the service. Type: String Length Constraints: Minimum length of 3. Maximum length of 255. dnsEntry The public DNS name of the service. Type: DnsEntry object Response Elements API Version 2022-11-30 48 API Reference Amazon VPC Lattice id The ID of the service. Type: String Length Constraints: Fixed length of 21. Pattern: ^svc-[0-9a-z]{17}$ name The name of the service. Type: String Length Constraints: Minimum length of 3. Maximum length of 40. Pattern: ^(?!svc-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ status The status. If the status is CREATE_FAILED, you must delete and recreate the service. Type: String Valid Values: ACTIVE | CREATE_IN_PROGRESS | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 Errors API Version 2022-11-30 49 Amazon VPC Lattice InternalServerException API Reference An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException
vpc-lattice-api-014
vpc-lattice-api.pdf
14
to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 Errors API Version 2022-11-30 49 Amazon VPC Lattice InternalServerException API Reference An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin See Also API Version 2022-11-30 50 Amazon VPC Lattice • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 51 Amazon VPC Lattice API Reference CreateServiceNetwork Creates a service network. A service network is a logical boundary for a collection of services. You can associate services and VPCs with a service network. For more information, see Service networks in the Amazon VPC Lattice User Guide. Request Syntax POST /servicenetworks HTTP/1.1 Content-type: application/json { "authType": "string", "clientToken": "string", "name": "string", "sharingConfig": { "enabled": boolean }, "tags": { "string" : "string" } } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. authType The type of IAM policy. • NONE: The resource does not use an IAM policy. This is the default. • AWS_IAM: The resource uses an IAM policy. When this type is used, auth is enabled and an auth policy is required. Type: String CreateServiceNetwork API Version 2022-11-30 52 Amazon VPC Lattice API Reference Valid Values: NONE | AWS_IAM Required: No clientToken A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. Pattern: [!-~]+ Required: No name The name of the service network. The name must be unique to the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen. Type: String Length Constraints: Minimum length of 3. Maximum length of 63. Pattern: ^(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ Required: Yes sharingConfig Specify if the service network should be enabled for sharing. Type: SharingConfig object Required: No tags The tags for the service network. Type: String to string map Request Body API Version 2022-11-30 53 Amazon VPC Lattice API Reference Map Entries: Minimum number of 0 items. Maximum number of 200 items. Key Length Constraints: Minimum length of 1. Maximum length of 128. Value Length Constraints: Minimum length of 0. Maximum length of 256. Required: No Response Syntax HTTP/1.1 201 Content-type: application/json { "arn": "string", "authType": "string", "id": "string", "name": "string", "sharingConfig": { "enabled": boolean } } Response Elements If the action is successful, the service sends back an HTTP 201 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the service network. Type: String Length Constraints: Minimum length of 32. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:servicenetwork/ sn-[0-9a-z]{17}$ authType The type of IAM policy. Response Syntax API Version 2022-11-30 54 API Reference Amazon VPC Lattice Type: String Valid Values: NONE | AWS_IAM id The ID of the service network. Type: String Length Constraints: Fixed length of 20. Pattern: ^sn-[0-9a-z]{17}$ name The name of the service network. Type: String Length Constraints: Minimum length of 3. Maximum length of 63. Pattern: ^(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ sharingConfig Specifies if the service network is enabled for sharing. Type: SharingConfig object Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. Errors API Version 2022-11-30 55 API Reference Amazon VPC Lattice HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a
vpc-lattice-api-015
vpc-lattice-api.pdf
15
63. Pattern: ^(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ sharingConfig Specifies if the service network is enabled for sharing. Type: SharingConfig object Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. Errors API Version 2022-11-30 55 API Reference Amazon VPC Lattice HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 See Also API Version 2022-11-30 56 Amazon VPC Lattice • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 57 Amazon VPC Lattice API Reference CreateServiceNetworkResourceAssociation Associates the specified service network with the specified resource configuration. This allows the resource configuration to receive connections through the service network, including through a service network VPC endpoint. Request Syntax POST /servicenetworkresourceassociations HTTP/1.1 Content-type: application/json { "clientToken": "string", "resourceConfigurationIdentifier": "string", "serviceNetworkIdentifier": "string", "tags": { "string" : "string" } } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. clientToken A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. Pattern: [!-~]+ Required: No CreateServiceNetworkResourceAssociation API Version 2022-11-30 58 Amazon VPC Lattice resourceConfigurationIdentifier API Reference The ID of the resource configuration to associate with the service network. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((rcfg-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}))$ Required: Yes serviceNetworkIdentifier The ID of the service network to associate with the resource configuration. Type: String Length Constraints: Minimum length of 3. Maximum length of 2048. Required: Yes tags A key-value pair to associate with a resource. Type: String to string map Map Entries: Minimum number of 0 items. Maximum number of 200 items. Key Length Constraints: Minimum length of 1. Maximum length of 128. Value Length Constraints: Minimum length of 0. Maximum length of 256. Required: No Response Syntax HTTP/1.1 201 Content-type: application/json { "arn": "string", Response Syntax API Version 2022-11-30 59 API Reference Amazon VPC Lattice "createdBy": "string", "id": "string", "status": "string" } Response Elements If the action is successful, the service sends back an HTTP 201 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the association. Type: String Length Constraints: Minimum length of 22. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkresourceassociation/snra-[0-9a-f]{17}$ createdBy The ID of the account that created the association. Type: String Length Constraints: Minimum length of 1. Maximum length of 12. Pattern: ^[0-9]{12}$ id The ID of the association. Type: String Length Constraints: Fixed length of 22. Pattern: ^snra-[0-9a-f]{17}$ status The status of the association. Response Elements API Version 2022-11-30 60 Amazon VPC Lattice Type: String API Reference Valid Values: CREATE_IN_PROGRESS | ACTIVE | PARTIAL | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Errors API Version 2022-11-30 61 Amazon VPC Lattice ValidationException API Reference The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about
vpc-lattice-api-016
vpc-lattice-api.pdf
16
can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Errors API Version 2022-11-30 61 Amazon VPC Lattice ValidationException API Reference The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 62 Amazon VPC Lattice API Reference CreateServiceNetworkServiceAssociation Associates the specified service with the specified service network. For more information, see Manage service associations in the Amazon VPC Lattice User Guide. You can't use this operation if the service and service network are already associated or if there is a disassociation or deletion in progress. If the association fails, you can retry the operation by deleting the association and recreating it. You cannot associate a service and service network that are shared with a caller. The caller must own either the service or the service network. As a result of this operation, the association is created in the service network account and the association owner account. Request Syntax POST /servicenetworkserviceassociations HTTP/1.1 Content-type: application/json { "clientToken": "string", "serviceIdentifier": "string", "serviceNetworkIdentifier": "string", "tags": { "string" : "string" } } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. CreateServiceNetworkServiceAssociation API Version 2022-11-30 63 Amazon VPC Lattice clientToken API Reference A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. Pattern: [!-~]+ Required: No serviceIdentifier The ID or ARN of the service. Type: String Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((svc-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:service/svc-[0-9a-z]{17}))$ Required: Yes serviceNetworkIdentifier The ID or ARN of the service network. You must use an ARN if the resources are in different accounts. Type: String Length Constraints: Minimum length of 3. Maximum length of 2048. Pattern: ^((sn-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetwork/sn-[0-9a-z]{17}))$ Required: Yes tags The tags for the association. Type: String to string map Request Body API Version 2022-11-30 64 Amazon VPC Lattice API Reference Map Entries: Minimum number of 0 items. Maximum number of 200 items. Key Length Constraints: Minimum length of 1. Maximum length of 128. Value Length Constraints: Minimum length of 0. Maximum length of 256. Required: No Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "createdBy": "string", "customDomainName": "string", "dnsEntry": { "domainName": "string", "hostedZoneId": "string" }, "id": "string", "status": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the association. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkserviceassociation/snsa-[0-9a-z]{17}$ Response Syntax API Version 2022-11-30 65 API Reference Amazon VPC Lattice createdBy The account that created the association. Type: String Length Constraints: Minimum length of 1. Maximum length of 12. Pattern: ^[0-9]{12}$ customDomainName The custom domain name of the service. Type: String Length Constraints: Minimum length of 3. Maximum length of 255. dnsEntry The DNS name of the service. Type: DnsEntry object id The ID of the association. Type: String Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((snsa-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkserviceassociation/snsa-[0-9a-z]{17}))$ status The association status. Type: String Valid Values: CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED Errors For information about the errors that are common to all actions, see Common Errors. Errors API Version 2022-11-30 66 Amazon VPC Lattice AccessDeniedException API Reference The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to
vpc-lattice-api-017
vpc-lattice-api.pdf
17
information about the errors that are common to all actions, see Common Errors. Errors API Version 2022-11-30 66 Amazon VPC Lattice AccessDeniedException API Reference The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: See Also API Version 2022-11-30 67 API Reference Amazon VPC Lattice • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 68 Amazon VPC Lattice API Reference CreateServiceNetworkVpcAssociation Associates a VPC with a service network. When you associate a VPC with the service network, it enables all the resources within that VPC to be clients and communicate with other services in the service network. For more information, see Manage VPC associations in the Amazon VPC Lattice User Guide. You can't use this operation if there is a disassociation in progress. If the association fails, retry by deleting the association and recreating it. As a result of this operation, the association gets created in the service network account and the VPC owner account. If you add a security group to the service network and VPC association, the association must continue to always have at least one security group. You can add or edit security groups at any time. However, to remove all security groups, you must first delete the association and recreate it without security groups. Request Syntax POST /servicenetworkvpcassociations HTTP/1.1 Content-type: application/json { "clientToken": "string", "securityGroupIds": [ "string" ], "serviceNetworkIdentifier": "string", "tags": { "string" : "string" }, "vpcIdentifier": "string" } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. CreateServiceNetworkVpcAssociation API Version 2022-11-30 69 Amazon VPC Lattice clientToken API Reference A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. Pattern: [!-~]+ Required: No securityGroupIds The IDs of the security groups. Security groups aren't added by default. You can add a security group to apply network level controls to control which resources in a VPC are allowed to access the service network and its services. For more information, see Control traffic to resources using security groups in the Amazon VPC User Guide. Type: Array of strings Array Members: Minimum number of 0 items. Maximum number of 5 items. Length Constraints: Minimum length of 5. Maximum length of 200. Pattern: ^sg-(([0-9a-z]{8})|([0-9a-z]{17}))$ Required: No serviceNetworkIdentifier The ID or ARN of the service network. You must use an ARN if the resources are in different accounts. Type: String Length Constraints: Minimum length of 3. Maximum length of 2048. Pattern: ^((sn-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetwork/sn-[0-9a-z]{17}))$ Required: Yes Request Body API Version 2022-11-30 70 API Reference Amazon VPC Lattice tags The tags for the association. Type: String to string map Map Entries: Minimum number of 0 items. Maximum number of 200 items. Key Length Constraints: Minimum length of 1. Maximum length of 128. Value Length Constraints: Minimum length of 0. Maximum length of 256. Required: No vpcIdentifier The ID of the VPC. Type: String Length Constraints: Minimum length of 5. Maximum length of 50. Pattern: ^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$ Required: Yes Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "createdBy": "string", "id": "string", "securityGroupIds": [ "string" ], "status": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. Response Syntax API Version 2022-11-30 71 Amazon VPC Lattice API Reference The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the association. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkvpcassociation/snva-[0-9a-z]{17}$ createdBy The account that created the association. Type: String Length Constraints: Minimum
vpc-lattice-api-018
vpc-lattice-api.pdf
18
length of 50. Pattern: ^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$ Required: Yes Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "createdBy": "string", "id": "string", "securityGroupIds": [ "string" ], "status": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. Response Syntax API Version 2022-11-30 71 Amazon VPC Lattice API Reference The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the association. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkvpcassociation/snva-[0-9a-z]{17}$ createdBy The account that created the association. Type: String Length Constraints: Minimum length of 1. Maximum length of 12. Pattern: ^[0-9]{12}$ id The ID of the association. Type: String Length Constraints: Fixed length of 22. Pattern: ^snva-[0-9a-z]{17}$ securityGroupIds The IDs of the security groups. Type: Array of strings Length Constraints: Minimum length of 5. Maximum length of 200. Pattern: ^sg-(([0-9a-z]{8})|([0-9a-z]{17}))$ status The association status. Response Elements API Version 2022-11-30 72 Amazon VPC Lattice Type: String API Reference Valid Values: CREATE_IN_PROGRESS | ACTIVE | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED | UPDATE_FAILED Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Errors API Version 2022-11-30 73 Amazon VPC Lattice ValidationException API Reference The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 74 Amazon VPC Lattice CreateTargetGroup API Reference Creates a target group. A target group is a collection of targets, or compute resources, that run your application or service. A target group can only be used by a single service. For more information, see Target groups in the Amazon VPC Lattice User Guide. Request Syntax POST /targetgroups HTTP/1.1 Content-type: application/json { "clientToken": "string", "config": { "healthCheck": { "enabled": boolean, "healthCheckIntervalSeconds": number, "healthCheckTimeoutSeconds": number, "healthyThresholdCount": number, "matcher": { ... }, "path": "string", "port": number, "protocol": "string", "protocolVersion": "string", "unhealthyThresholdCount": number }, "ipAddressType": "string", "lambdaEventStructureVersion": "string", "port": number, "protocol": "string", "protocolVersion": "string", "vpcIdentifier": "string" }, "name": "string", "tags": { "string" : "string" }, "type": "string" } CreateTargetGroup API Version 2022-11-30 75 Amazon VPC Lattice API Reference URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. clientToken A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. Pattern: [!-~]+ Required: No config The target group configuration. Type: TargetGroupConfig object Required: No name The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen. Type: String Length Constraints: Minimum length of 3. Maximum length of 128. Pattern: ^(?!tg-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ Required: Yes URI Request Parameters API Version 2022-11-30 76 API Reference Amazon VPC Lattice tags The tags for the target group. Type: String to string map Map Entries: Minimum number of 0 items. Maximum number of 200 items. Key Length Constraints: Minimum length of 1. Maximum length of 128. Value Length Constraints: Minimum length of 0. Maximum length of 256. Required: No type The type of target group. Type: String Valid Values: IP | LAMBDA | INSTANCE | ALB Required: Yes Response Syntax HTTP/1.1 201 Content-type: application/json { "arn": "string", "config": { "healthCheck": { "enabled": boolean, "healthCheckIntervalSeconds": number, "healthCheckTimeoutSeconds": number, "healthyThresholdCount": number, "matcher": { ... }, "path": "string", "port": number, "protocol": "string", "protocolVersion": "string", "unhealthyThresholdCount": number Response Syntax API Version 2022-11-30 77 Amazon VPC Lattice API Reference }, "ipAddressType": "string",
vpc-lattice-api-019
vpc-lattice-api.pdf
19
of 0 items. Maximum number of 200 items. Key Length Constraints: Minimum length of 1. Maximum length of 128. Value Length Constraints: Minimum length of 0. Maximum length of 256. Required: No type The type of target group. Type: String Valid Values: IP | LAMBDA | INSTANCE | ALB Required: Yes Response Syntax HTTP/1.1 201 Content-type: application/json { "arn": "string", "config": { "healthCheck": { "enabled": boolean, "healthCheckIntervalSeconds": number, "healthCheckTimeoutSeconds": number, "healthyThresholdCount": number, "matcher": { ... }, "path": "string", "port": number, "protocol": "string", "protocolVersion": "string", "unhealthyThresholdCount": number Response Syntax API Version 2022-11-30 77 Amazon VPC Lattice API Reference }, "ipAddressType": "string", "lambdaEventStructureVersion": "string", "port": number, "protocol": "string", "protocolVersion": "string", "vpcIdentifier": "string" }, "id": "string", "name": "string", "status": "string", "type": "string" } Response Elements If the action is successful, the service sends back an HTTP 201 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the target group. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:targetgroup/tg- [0-9a-z]{17}$ config The target group configuration. Type: TargetGroupConfig object id The ID of the target group. Type: String Length Constraints: Fixed length of 20. Response Elements API Version 2022-11-30 78 Amazon VPC Lattice API Reference Pattern: ^tg-[0-9a-z]{17}$ name The name of the target group. Type: String Length Constraints: Minimum length of 3. Maximum length of 128. Pattern: ^(?!tg-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ status The status. You can retry the operation if the status is CREATE_FAILED. However, if you retry it while the status is CREATE_IN_PROGRESS, there is no change in the status. Type: String Valid Values: CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED type The type of target group. Type: String Valid Values: IP | LAMBDA | INSTANCE | ALB Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. Errors API Version 2022-11-30 79 API Reference Amazon VPC Lattice HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 See Also API Version 2022-11-30 80 Amazon VPC Lattice • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 81 Amazon VPC Lattice API Reference DeleteAccessLogSubscription Deletes the specified access log subscription. Request Syntax DELETE /accesslogsubscriptions/accessLogSubscriptionIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. accessLogSubscriptionIdentifier The ID or ARN of the access log subscription. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((als-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:accesslogsubscription/als-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 204 Response Elements If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. DeleteAccessLogSubscription API Version 2022-11-30 82 Amazon VPC Lattice AccessDeniedException API Reference The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin See Also API Version 2022-11-30 83 Amazon VPC Lattice • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 84 Amazon VPC
vpc-lattice-api-020
vpc-lattice-api.pdf
20
an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin See Also API Version 2022-11-30 83 Amazon VPC Lattice • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 84 Amazon VPC Lattice DeleteAuthPolicy API Reference Deletes the specified auth policy. If an auth is set to AWS_IAM and the auth policy is deleted, all requests are denied. If you are trying to remove the auth policy completely, you must set the auth type to NONE. If auth is enabled on the resource, but no auth policy is set, all requests are denied. Request Syntax DELETE /authpolicy/resourceIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceIdentifier The ID or ARN of the resource. Length Constraints: Minimum length of 17. Maximum length of 200. Pattern: ^((((sn)|(svc)|(rcfg))-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a- z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:((servicenetwork/sn)| (resourceconfiguration/rcfg)|(service/svc))-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 204 Response Elements If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body. DeleteAuthPolicy API Version 2022-11-30 85 Amazon VPC Lattice Errors API Reference For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 Errors API Version 2022-11-30 86 Amazon VPC Lattice • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 87 Amazon VPC Lattice DeleteListener Deletes the specified listener. Request Syntax API Reference DELETE /services/serviceIdentifier/listeners/listenerIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. listenerIdentifier The ID or ARN of the listener. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((listener-[0-9a-z]{17})|(^arn:[a-z0-9\-]+:vpc-lattice:[a-zA- Z0-9\-]+:\d{12}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z] {17}$))$ Required: Yes serviceIdentifier The ID or ARN of the service. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((svc-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:service/svc-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 204 DeleteListener API Version 2022-11-30 88 Amazon VPC Lattice Response Elements API Reference If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 Response Elements API Version 2022-11-30 89 Amazon VPC Lattice See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 90 Amazon VPC Lattice API Reference DeleteResourceConfiguration Deletes the specified resource configuration. Request Syntax DELETE /resourceconfigurations/resourceConfigurationIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceConfigurationIdentifier The ID or ARN of the resource configuration. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((rcfg-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}))$ Required: Yes Request Body
vpc-lattice-api-021
vpc-lattice-api.pdf
21
for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 90 Amazon VPC Lattice API Reference DeleteResourceConfiguration Deletes the specified resource configuration. Request Syntax DELETE /resourceconfigurations/resourceConfigurationIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceConfigurationIdentifier The ID or ARN of the resource configuration. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((rcfg-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 204 Response Elements If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. DeleteResourceConfiguration API Version 2022-11-30 91 Amazon VPC Lattice AccessDeniedException API Reference The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ See Also API Version 2022-11-30 92 Amazon VPC Lattice • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 93 Amazon VPC Lattice API Reference DeleteResourceEndpointAssociation Disassociates the resource configuration from the resource VPC endpoint. Request Syntax DELETE /resourceendpointassociations/resourceEndpointAssociationIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceEndpointAssociationIdentifier The ID or ARN of the association. Length Constraints: Minimum length of 21. Maximum length of 2048. Pattern: ^((rea-[0-9a-f]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceendpointassociation/rea-[0-9a-f]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "id": "string", "resourceConfigurationArn": "string", "resourceConfigurationId": "string", "vpcEndpointId": "string" } DeleteResourceEndpointAssociation API Version 2022-11-30 94 Amazon VPC Lattice Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the association. Type: String Length Constraints: Minimum length of 21. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceendpointassociation/rea-[0-9a-f]{17}$ id The ID of the association. Type: String Length Constraints: Fixed length of 21. Pattern: ^rea-[0-9a-f]{17}$ resourceConfigurationArn The Amazon Resource Name (ARN) of the resource configuration associated with the VPC endpoint of type resource. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9f\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}$ resourceConfigurationId The ID of the resource configuration. Type: String Response Elements API Version 2022-11-30 95 Amazon VPC Lattice API Reference Length Constraints: Fixed length of 22. Pattern: ^rcfg-[0-9a-z]{17}$ vpcEndpointId The ID of the resource VPC endpoint that is associated with the resource configuration. Type: String Length Constraints: Fixed length of 22. Pattern: ^vpce-[0-9a-f]{17}$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. Errors API Version 2022-11-30 96 Amazon VPC Lattice HTTP Status Code: 400 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 97 Amazon VPC Lattice API Reference DeleteResourceGateway Deletes the specified resource gateway. Request Syntax DELETE /resourcegateways/resourceGatewayIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceGatewayIdentifier
vpc-lattice-api-022
vpc-lattice-api.pdf
22
this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 97 Amazon VPC Lattice API Reference DeleteResourceGateway Deletes the specified resource gateway. Request Syntax DELETE /resourcegateways/resourceGatewayIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceGatewayIdentifier The ID or ARN of the resource gateway. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((rgw-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourcegateway/rgw-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "id": "string", "name": "string", "status": "string" } DeleteResourceGateway API Version 2022-11-30 98 Amazon VPC Lattice Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the resource gateway. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourcegateway/rgw-[0-9a-z]{17}$ id The ID of the resource gateway. Type: String Length Constraints: Fixed length of 21. Pattern: ^rgw-[0-9a-z]{17}$ name The name of the resource gateway. Type: String Length Constraints: Minimum length of 3. Maximum length of 40. Pattern: ^(?!rgw-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ status The status of the resource gateway. Type: String Valid Values: ACTIVE | CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | CREATE_FAILED | UPDATE_FAILED | DELETE_FAILED Response Elements API Version 2022-11-30 99 Amazon VPC Lattice Errors API Reference For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: Errors API Version 2022-11-30 100 API Reference Amazon VPC Lattice • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 101 Amazon VPC Lattice API Reference DeleteResourcePolicy Deletes the specified resource policy. Request Syntax DELETE /resourcepolicy/resourceArn HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceArn The Amazon Resource Name (ARN) of the resource. Length Constraints: Minimum length of 20. Maximum length of 200. Pattern: ^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?) {2}:((servicenetwork/sn)|(service/svc)|(resourceconfiguration/rcfg))- [0-9a-z]{17}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 204 Response Elements If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. DeleteResourcePolicy API Version 2022-11-30 102 Amazon VPC Lattice AccessDeniedException API Reference The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin See Also API Version 2022-11-30 103 Amazon VPC Lattice • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 104 Amazon VPC Lattice DeleteRule API Reference Deletes a listener rule. Each listener has a default rule for checking connection requests, but you can define additional rules. Each rule consists of a priority, one or
vpc-lattice-api-023
vpc-lattice-api.pdf
23
AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin See Also API Version 2022-11-30 103 Amazon VPC Lattice • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 104 Amazon VPC Lattice DeleteRule API Reference Deletes a listener rule. Each listener has a default rule for checking connection requests, but you can define additional rules. Each rule consists of a priority, one or more actions, and one or more conditions. You can delete additional listener rules, but you cannot delete the default rule. For more information, see Listener rules in the Amazon VPC Lattice User Guide. Request Syntax DELETE /services/serviceIdentifier/listeners/listenerIdentifier/rules/ruleIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. listenerIdentifier The ID or ARN of the listener. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((listener-[0-9a-z]{17})|(^arn:[a-z0-9\-]+:vpc-lattice:[a-zA- Z0-9\-]+:\d{12}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z] {17}$))$ Required: Yes ruleIdentifier The ID or ARN of the rule. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((rule-[0-9a-z]{17})|(^arn:[a-z0-9\-]+:vpc-lattice:[a-zA- Z0-9\-]+:\d{12}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z]{17}/ rule/rule-[0-9a-z]{17}$))$ Required: Yes DeleteRule API Version 2022-11-30 105 Amazon VPC Lattice serviceIdentifier The ID or ARN of the service. API Reference Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((svc-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:service/svc-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 204 Response Elements If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. Request Body API Version 2022-11-30 106 API Reference Amazon VPC Lattice HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 107 Amazon VPC Lattice DeleteService API Reference Deletes a service. A service can't be deleted if it's associated with a service network. If you delete a service, all resources related to the service, such as the resource policy, auth policy, listeners, listener rules, and access log subscriptions, are also deleted. For more information, see Delete a service in the Amazon VPC Lattice User Guide. Request Syntax DELETE /services/serviceIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. serviceIdentifier The ID or ARN of the service. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((svc-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:service/svc-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "id": "string", "name": "string", DeleteService API Version 2022-11-30 108 Amazon VPC Lattice "status": "string" } Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the service. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:service/svc- [0-9a-z]{17}$ id The ID of the service. Type: String Length Constraints: Fixed length of 21. Pattern: ^svc-[0-9a-z]{17}$ name The name of the service. Type: String Length Constraints: Minimum length of 3. Maximum length of 40. Pattern: ^(?!svc-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ status The status. You can retry the operation if the status is DELETE_FAILED. However, if you retry it while the status is DELETE_IN_PROGRESS, the status doesn't change. Response Elements API Version 2022-11-30 109 Amazon VPC Lattice Type: String API Reference Valid Values: ACTIVE | CREATE_IN_PROGRESS | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409
vpc-lattice-api-024
vpc-lattice-api.pdf
24
operation if the status is DELETE_FAILED. However, if you retry it while the status is DELETE_IN_PROGRESS, the status doesn't change. Response Elements API Version 2022-11-30 109 Amazon VPC Lattice Type: String API Reference Valid Values: ACTIVE | CREATE_IN_PROGRESS | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 Errors API Version 2022-11-30 110 Amazon VPC Lattice See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 111 Amazon VPC Lattice API Reference DeleteServiceNetwork Deletes a service network. You can only delete the service network if there is no service or VPC associated with it. If you delete a service network, all resources related to the service network, such as the resource policy, auth policy, and access log subscriptions, are also deleted. For more information, see Delete a service network in the Amazon VPC Lattice User Guide. Request Syntax DELETE /servicenetworks/serviceNetworkIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. serviceNetworkIdentifier The ID or ARN of the service network. Length Constraints: Minimum length of 3. Maximum length of 2048. Pattern: ^((sn-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetwork/sn-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 204 Response Elements If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body. DeleteServiceNetwork API Version 2022-11-30 112 Amazon VPC Lattice Errors API Reference For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: Errors API Version 2022-11-30 113 API Reference Amazon VPC Lattice • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 114 Amazon VPC Lattice API Reference DeleteServiceNetworkResourceAssociation Deletes the association between a service network and a resource configuration. Request Syntax DELETE /servicenetworkresourceassociations/serviceNetworkResourceAssociationIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. serviceNetworkResourceAssociationIdentifier The ID of the association. Length Constraints: Minimum length of 22. Maximum length of 2048. Pattern: ^((snra-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkresourceassociation/snra-[0-9a-f]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "id": "string", "status": "string" } DeleteServiceNetworkResourceAssociation API Version 2022-11-30 115 Amazon VPC Lattice Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the association. Type: String Length Constraints: Minimum length of 22. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkresourceassociation/snra-[0-9a-f]{17}$ id The ID of the association. Type: String Length Constraints: Fixed length of 22. Pattern: ^snra-[0-9a-f]{17}$ status The status of the association. Type: String Valid Values: CREATE_IN_PROGRESS | ACTIVE | PARTIAL | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user
vpc-lattice-api-025
vpc-lattice-api.pdf
25
is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the association. Type: String Length Constraints: Minimum length of 22. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkresourceassociation/snra-[0-9a-f]{17}$ id The ID of the association. Type: String Length Constraints: Fixed length of 22. Pattern: ^snra-[0-9a-f]{17}$ status The status of the association. Type: String Valid Values: CREATE_IN_PROGRESS | ACTIVE | PARTIAL | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. Response Elements API Version 2022-11-30 116 Amazon VPC Lattice HTTP Status Code: 403 ConflictException API Reference The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 See Also API Version 2022-11-30 117 Amazon VPC Lattice • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 118 Amazon VPC Lattice API Reference DeleteServiceNetworkServiceAssociation Deletes the association between a service and a service network. This operation fails if an association is still in progress. Request Syntax DELETE /servicenetworkserviceassociations/serviceNetworkServiceAssociationIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. serviceNetworkServiceAssociationIdentifier The ID or ARN of the association. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((snsa-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkserviceassociation/snsa-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "id": "string", "status": "string" } DeleteServiceNetworkServiceAssociation API Version 2022-11-30 119 Amazon VPC Lattice Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the association. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkserviceassociation/snsa-[0-9a-z]{17}$ id The ID of the association. Type: String Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((snsa-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkserviceassociation/snsa-[0-9a-z]{17}))$ status The status. You can retry the operation if the status is DELETE_FAILED. However, if you retry it when the status is DELETE_IN_PROGRESS, there is no change in the status. Type: String Valid Values: CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED Errors For information about the errors that are common to all actions, see Common Errors. Response Elements API Version 2022-11-30 120 Amazon VPC Lattice AccessDeniedException API Reference The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ See Also API Version 2022-11-30 121 Amazon VPC Lattice • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 122 Amazon VPC Lattice API Reference DeleteServiceNetworkVpcAssociation Disassociates the VPC from the service network. You can't disassociate the VPC if there is a create or update association in progress. Request Syntax DELETE /servicenetworkvpcassociations/serviceNetworkVpcAssociationIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. serviceNetworkVpcAssociationIdentifier The ID or ARN of the association. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((snva-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkvpcassociation/snva-[0-9a-z]{17}))$ Required: Yes Request Body The request
vpc-lattice-api-026
vpc-lattice-api.pdf
26
• AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 122 Amazon VPC Lattice API Reference DeleteServiceNetworkVpcAssociation Disassociates the VPC from the service network. You can't disassociate the VPC if there is a create or update association in progress. Request Syntax DELETE /servicenetworkvpcassociations/serviceNetworkVpcAssociationIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. serviceNetworkVpcAssociationIdentifier The ID or ARN of the association. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((snva-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkvpcassociation/snva-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "id": "string", "status": "string" } DeleteServiceNetworkVpcAssociation API Version 2022-11-30 123 Amazon VPC Lattice Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the association. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkvpcassociation/snva-[0-9a-z]{17}$ id The ID of the association. Type: String Length Constraints: Fixed length of 22. Pattern: ^snva-[0-9a-z]{17}$ status The status. You can retry the operation if the status is DELETE_FAILED. However, if you retry it while the status is DELETE_IN_PROGRESS, there is no change in the status. Type: String Valid Values: CREATE_IN_PROGRESS | ACTIVE | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED | UPDATE_FAILED Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. Response Elements API Version 2022-11-30 124 Amazon VPC Lattice HTTP Status Code: 403 ConflictException API Reference The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 See Also API Version 2022-11-30 125 Amazon VPC Lattice • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 126 Amazon VPC Lattice DeleteTargetGroup API Reference Deletes a target group. You can't delete a target group if it is used in a listener rule or if the target group creation is in progress. Request Syntax DELETE /targetgroups/targetGroupIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. targetGroupIdentifier The ID or ARN of the target group. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((tg-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:targetgroup/tg-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "id": "string", "status": "string" } DeleteTargetGroup API Version 2022-11-30 127 Amazon VPC Lattice Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the target group. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:targetgroup/tg- [0-9a-z]{17}$ id The ID of the target group. Type: String Length Constraints: Fixed length of 20. Pattern: ^tg-[0-9a-z]{17}$ status The status. You can retry the operation if the status is DELETE_FAILED. However, if you retry it while the status is DELETE_IN_PROGRESS, the status doesn't change. Type: String Valid Values: CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED Errors For information about the errors that are common to all actions, see Common Errors. ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. Response Elements API Version 2022-11-30 128 API Reference Amazon VPC Lattice HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific
vpc-lattice-api-027
vpc-lattice-api.pdf
27
resource. Updating or deleting a resource can cause an inconsistent state. Response Elements API Version 2022-11-30 128 API Reference Amazon VPC Lattice HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 129 Amazon VPC Lattice API Reference See Also API Version 2022-11-30 130 Amazon VPC Lattice DeregisterTargets API Reference Deregisters the specified targets from the specified target group. Request Syntax POST /targetgroups/targetGroupIdentifier/deregistertargets HTTP/1.1 Content-type: application/json { "targets": [ { "id": "string", "port": number } ] } URI Request Parameters The request uses the following URI parameters. targetGroupIdentifier The ID or ARN of the target group. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((tg-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:targetgroup/tg-[0-9a-z]{17}))$ Required: Yes Request Body The request accepts the following data in JSON format. targets The targets to deregister. Type: Array of Target objects DeregisterTargets API Version 2022-11-30 131 Amazon VPC Lattice API Reference Array Members: Minimum number of 1 item. Maximum number of 100 items. Required: Yes Response Syntax HTTP/1.1 200 Content-type: application/json { "successful": [ { "id": "string", "port": number } ], "unsuccessful": [ { "failureCode": "string", "failureMessage": "string", "id": "string", "port": number } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. successful The targets that were successfully deregistered. Type: Array of Target objects unsuccessful The targets that the operation couldn't deregister. Type: Array of TargetFailure objects Response Syntax API Version 2022-11-30 132 Amazon VPC Lattice Errors API Reference For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 ConflictException The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state. HTTP Status Code: 409 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: Errors API Version 2022-11-30 133 API Reference Amazon VPC Lattice • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 134 Amazon VPC Lattice API Reference GetAccessLogSubscription Retrieves information about the specified access log subscription. Request Syntax GET /accesslogsubscriptions/accessLogSubscriptionIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. accessLogSubscriptionIdentifier The ID or ARN of the access log subscription. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((als-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:accesslogsubscription/als-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "createdAt": "string", "destinationArn": "string", "id": "string", "lastUpdatedAt": "string", "resourceArn": "string", "resourceId": "string", GetAccessLogSubscription API Version 2022-11-30 135 Amazon VPC Lattice API Reference "serviceNetworkLogType": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the access log subscription. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:accesslogsubscription/als-[0-9a-z]{17}$ createdAt The date and time that the access log subscription was created, in ISO-8601 format. Type: Timestamp destinationArn The Amazon Resource Name (ARN) of the access log destination. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?) {2}:([^/].*)?$ id The ID of the access log subscription. Type: String Length Constraints: Fixed length of 21. Response Elements API Version
vpc-lattice-api-028
vpc-lattice-api.pdf
28
The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the access log subscription. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:accesslogsubscription/als-[0-9a-z]{17}$ createdAt The date and time that the access log subscription was created, in ISO-8601 format. Type: Timestamp destinationArn The Amazon Resource Name (ARN) of the access log destination. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?) {2}:([^/].*)?$ id The ID of the access log subscription. Type: String Length Constraints: Fixed length of 21. Response Elements API Version 2022-11-30 136 Amazon VPC Lattice API Reference Pattern: ^als-[0-9a-z]{17}$ lastUpdatedAt The date and time that the access log subscription was last updated, in ISO-8601 format. Type: Timestamp resourceArn The Amazon Resource Name (ARN) of the service network or service. Type: String Length Constraints: Minimum length of 20. Maximum length of 200. Pattern: ^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?) {2}:((servicenetwork/sn)|(service/svc)|(resourceconfiguration/rcfg))- [0-9a-z]{17}$ resourceId The ID of the service network or service. Type: String Length Constraints: Minimum length of 20. Maximum length of 50. Pattern: ^((sn)|(svc))-[0-9a-z]{17}$ serviceNetworkLogType The log type for the service network. Type: String Valid Values: SERVICE | RESOURCE Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. Errors API Version 2022-11-30 137 API Reference Amazon VPC Lattice HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 138 Amazon VPC Lattice API Reference See Also API Version 2022-11-30 139 Amazon VPC Lattice GetAuthPolicy API Reference Retrieves information about the auth policy for the specified service or service network. Request Syntax GET /authpolicy/resourceIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceIdentifier The ID or ARN of the service network or service. Length Constraints: Minimum length of 17. Maximum length of 200. Pattern: ^((((sn)|(svc)|(rcfg))-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a- z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:((servicenetwork/sn)| (resourceconfiguration/rcfg)|(service/svc))-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "createdAt": "string", "lastUpdatedAt": "string", "policy": "string", "state": "string" } GetAuthPolicy API Version 2022-11-30 140 Amazon VPC Lattice Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. createdAt The date and time that the auth policy was created, in ISO-8601 format. Type: Timestamp lastUpdatedAt The date and time that the auth policy was last updated, in ISO-8601 format. Type: Timestamp policy The auth policy. Type: String Length Constraints: Minimum length of 0. Maximum length of 10000. state The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the auth type is NONE, then any auth policy that you provide remains inactive. For more information, see Create a service network in the Amazon VPC Lattice User Guide. Type: String Valid Values: Active | Inactive Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. Response Elements API Version 2022-11-30 141 API Reference Amazon VPC Lattice HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP
vpc-lattice-api-029
vpc-lattice-api.pdf
29
exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 142 Amazon VPC Lattice API Reference See Also API Version 2022-11-30 143 Amazon VPC Lattice GetListener API Reference Retrieves information about the specified listener for the specified service. Request Syntax GET /services/serviceIdentifier/listeners/listenerIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. listenerIdentifier The ID or ARN of the listener. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((listener-[0-9a-z]{17})|(^arn:[a-z0-9\-]+:vpc-lattice:[a-zA- Z0-9\-]+:\d{12}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z] {17}$))$ Required: Yes serviceIdentifier The ID or ARN of the service. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((svc-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:service/svc-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 GetListener API Version 2022-11-30 144 Amazon VPC Lattice API Reference Content-type: application/json { "arn": "string", "createdAt": "string", "defaultAction": { ... }, "id": "string", "lastUpdatedAt": "string", "name": "string", "port": number, "protocol": "string", "serviceArn": "string", "serviceId": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the listener. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:service/svc- [0-9a-z]{17}/listener/listener-[0-9a-z]{17}$ createdAt The date and time that the listener was created, in ISO-8601 format. Type: Timestamp defaultAction The actions for the default listener rule. Type: RuleAction object Note: This object is a Union. Only one member of this object can be specified or returned. Response Elements API Version 2022-11-30 145 API Reference Amazon VPC Lattice id The ID of the listener. Type: String Length Constraints: Fixed length of 26. Pattern: ^listener-[0-9a-z]{17}$ lastUpdatedAt The date and time that the listener was last updated, in ISO-8601 format. Type: Timestamp name The name of the listener. Type: String Length Constraints: Minimum length of 3. Maximum length of 63. Pattern: ^(?!listener-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ port The listener port. Type: Integer Valid Range: Minimum value of 1. Maximum value of 65535. protocol The listener protocol. Type: String Valid Values: HTTP | HTTPS | TLS_PASSTHROUGH serviceArn The Amazon Resource Name (ARN) of the service. Type: String Response Elements API Version 2022-11-30 146 Amazon VPC Lattice API Reference Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:service/svc- [0-9a-z]{17}$ serviceId The ID of the service. Type: String Length Constraints: Fixed length of 21. Pattern: ^svc-[0-9a-z]{17}$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. Errors API Version 2022-11-30 147 Amazon VPC Lattice HTTP Status Code: 400 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 148 Amazon VPC Lattice API Reference GetResourceConfiguration Retrieves information about the specified resource configuration. Request Syntax GET /resourceconfigurations/resourceConfigurationIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceConfigurationIdentifier The ID of the resource configuration. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((rcfg-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "allowAssociationToShareableServiceNetwork": boolean, "amazonManaged": boolean, "arn": "string", "createdAt": "string", "customDomainName": "string", "failureReason": "string", "id": "string", GetResourceConfiguration API Version 2022-11-30 149 Amazon VPC Lattice API Reference "lastUpdatedAt": "string", "name": "string", "portRanges": [ "string" ], "protocol": "string", "resourceConfigurationDefinition": { ... }, "resourceConfigurationGroupId": "string", "resourceGatewayId": "string", "status": "string", "type": "string" } Response Elements If the action is successful, the service sends back an
vpc-lattice-api-030
vpc-lattice-api.pdf
30
URI parameters. resourceConfigurationIdentifier The ID of the resource configuration. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((rcfg-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "allowAssociationToShareableServiceNetwork": boolean, "amazonManaged": boolean, "arn": "string", "createdAt": "string", "customDomainName": "string", "failureReason": "string", "id": "string", GetResourceConfiguration API Version 2022-11-30 149 Amazon VPC Lattice API Reference "lastUpdatedAt": "string", "name": "string", "portRanges": [ "string" ], "protocol": "string", "resourceConfigurationDefinition": { ... }, "resourceConfigurationGroupId": "string", "resourceGatewayId": "string", "status": "string", "type": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. allowAssociationToShareableServiceNetwork Specifies whether the resource configuration is associated with a sharable service network. Type: Boolean amazonManaged Indicates whether the resource configuration was created and is managed by Amazon. Type: Boolean arn The Amazon Resource Name (ARN) of the resource configuration. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9f\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}$ createdAt The date and time that the resource configuration was created, in ISO-8601 format. Type: Timestamp Response Elements API Version 2022-11-30 150 Amazon VPC Lattice customDomainName API Reference The custom domain name of the resource configuration. Type: String Length Constraints: Minimum length of 3. Maximum length of 255. failureReason The reason the create-resource-configuration request failed. Type: String id The ID of the resource configuration. Type: String Length Constraints: Fixed length of 22. Pattern: ^rcfg-[0-9a-z]{17}$ lastUpdatedAt The most recent date and time that the resource configuration was updated, in ISO-8601 format. Type: Timestamp name The name of the resource configuration. Type: String Length Constraints: Minimum length of 3. Maximum length of 40. Pattern: ^(?!rcfg-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ portRanges The TCP port ranges that a consumer can use to access a resource configuration. You can separate port ranges with a comma. Example: 1-65535 or 1,2,22-30 Type: Array of strings Response Elements API Version 2022-11-30 151 Amazon VPC Lattice API Reference Length Constraints: Minimum length of 1. Maximum length of 11. Pattern: ^((\d{1,5}\-\d{1,5})|(\d+))$ protocol The TCP protocol accepted by the specified resource configuration. Type: String Valid Values: TCP resourceConfigurationDefinition The resource configuration. Type: ResourceConfigurationDefinition object Note: This object is a Union. Only one member of this object can be specified or returned. resourceConfigurationGroupId The ID of the group resource configuration. Type: String Length Constraints: Fixed length of 22. Pattern: ^rcfg-[0-9a-z]{17}$ resourceGatewayId The ID of the resource gateway used to connect to the resource configuration in a given VPC. You can specify the resource gateway identifier only for resource configurations with type SINGLE, GROUP, or ARN. Type: String Length Constraints: Fixed length of 21. Pattern: ^rgw-[0-9a-z]{17}$ status The status of the resource configuration. Type: String Response Elements API Version 2022-11-30 152 Amazon VPC Lattice API Reference Valid Values: ACTIVE | CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | CREATE_FAILED | UPDATE_FAILED | DELETE_FAILED type The type of resource configuration. • SINGLE - A single resource. • GROUP - A group of resources. • CHILD - A single resource that is part of a group resource configuration. • ARN - An AWS resource. Type: String Valid Values: GROUP | CHILD | SINGLE | ARN Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Errors API Version 2022-11-30 153 Amazon VPC Lattice ValidationException API Reference The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 154 Amazon VPC Lattice API Reference GetResourceGateway Retrieves information about the specified resource gateway. Request Syntax GET /resourcegateways/resourceGatewayIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceGatewayIdentifier The ID of the resource gateway. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((rgw-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourcegateway/rgw-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "createdAt": "string", "id": "string", "ipAddressType": "string", "lastUpdatedAt": "string", "name": "string", "securityGroupIds": [ "string" ], GetResourceGateway API Version 2022-11-30 155 Amazon VPC Lattice API Reference "status": "string", "subnetIds":
vpc-lattice-api-031
vpc-lattice-api.pdf
31
API Version 2022-11-30 154 Amazon VPC Lattice API Reference GetResourceGateway Retrieves information about the specified resource gateway. Request Syntax GET /resourcegateways/resourceGatewayIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceGatewayIdentifier The ID of the resource gateway. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((rgw-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourcegateway/rgw-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "createdAt": "string", "id": "string", "ipAddressType": "string", "lastUpdatedAt": "string", "name": "string", "securityGroupIds": [ "string" ], GetResourceGateway API Version 2022-11-30 155 Amazon VPC Lattice API Reference "status": "string", "subnetIds": [ "string" ], "vpcId": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the resource gateway. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourcegateway/rgw-[0-9a-z]{17}$ createdAt The date and time that the resource gateway was created, in ISO-8601 format. Type: Timestamp id The ID of the resource gateway. Type: String Length Constraints: Fixed length of 21. Pattern: ^rgw-[0-9a-z]{17}$ ipAddressType The type of IP address for the resource gateway. Type: String Valid Values: IPV4 | IPV6 | DUALSTACK Response Elements API Version 2022-11-30 156 Amazon VPC Lattice lastUpdatedAt API Reference The date and time that the resource gateway was last updated, in ISO-8601 format. Type: Timestamp name The name of the resource gateway. Type: String Length Constraints: Minimum length of 3. Maximum length of 40. Pattern: ^(?!rgw-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ securityGroupIds The security group IDs associated with the resource gateway. Type: Array of strings Length Constraints: Minimum length of 5. Maximum length of 200. Pattern: ^sg-(([0-9a-z]{8})|([0-9a-z]{17}))$ status The status for the resource gateway. Type: String Valid Values: ACTIVE | CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | CREATE_FAILED | UPDATE_FAILED | DELETE_FAILED subnetIds The IDs of the VPC subnets for resource gateway. Type: Array of strings Length Constraints: Minimum length of 5. Maximum length of 200. vpcId The ID of the VPC for the resource gateway. Response Elements API Version 2022-11-30 157 Amazon VPC Lattice Type: String API Reference Length Constraints: Minimum length of 5. Maximum length of 50. Pattern: ^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: Errors API Version 2022-11-30 158 API Reference Amazon VPC Lattice • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 159 Amazon VPC Lattice GetResourcePolicy API Reference Retrieves information about the specified resource policy. The resource policy is an IAM policy created on behalf of the resource owner when they share a resource. Request Syntax GET /resourcepolicy/resourceArn HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceArn The Amazon Resource Name (ARN) of the service network or service. Length Constraints: Minimum length of 20. Maximum length of 200. Pattern: ^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?) {2}:((servicenetwork/sn)|(service/svc)|(resourceconfiguration/rcfg))- [0-9a-z]{17}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "policy": "string" } GetResourcePolicy API Version 2022-11-30 160 Amazon VPC Lattice Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. policy An IAM policy. Type: String Length Constraints: Minimum length of 1. Maximum length of 10000. Pattern: ^.*\S.*$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Response Elements API Version 2022-11-30 161 Amazon VPC Lattice ValidationException API Reference The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See
vpc-lattice-api-032
vpc-lattice-api.pdf
32
about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Response Elements API Version 2022-11-30 161 Amazon VPC Lattice ValidationException API Reference The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 162 Amazon VPC Lattice GetRule API Reference Retrieves information about the specified listener rules. You can also retrieve information about the default listener rule. For more information, see Listener rules in the Amazon VPC Lattice User Guide. Request Syntax GET /services/serviceIdentifier/listeners/listenerIdentifier/rules/ruleIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. listenerIdentifier The ID or ARN of the listener. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((listener-[0-9a-z]{17})|(^arn:[a-z0-9\-]+:vpc-lattice:[a-zA- Z0-9\-]+:\d{12}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z] {17}$))$ Required: Yes ruleIdentifier The ID or ARN of the listener rule. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((rule-[0-9a-z]{17})|(^arn:[a-z0-9\-]+:vpc-lattice:[a-zA- Z0-9\-]+:\d{12}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z]{17}/ rule/rule-[0-9a-z]{17}$))$ Required: Yes serviceIdentifier The ID or ARN of the service. GetRule API Version 2022-11-30 163 Amazon VPC Lattice API Reference Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((svc-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:service/svc-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "action": { ... }, "arn": "string", "createdAt": "string", "id": "string", "isDefault": boolean, "lastUpdatedAt": "string", "match": { ... }, "name": "string", "priority": number } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. action The action for the default rule. Type: RuleAction object Note: This object is a Union. Only one member of this object can be specified or returned. Request Body API Version 2022-11-30 164 Amazon VPC Lattice arn The Amazon Resource Name (ARN) of the listener. Type: String API Reference Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:service/svc- [0-9a-z]{17}/listener/listener-[0-9a-z]{17}/rule/rule-[0-9a-z]{17}$ createdAt The date and time that the listener rule was created, in ISO-8601 format. Type: Timestamp id The ID of the listener. Type: String Length Constraints: Minimum length of 5. Maximum length of 22. Pattern: ^rule-[0-9a-z]{17}$ isDefault Indicates whether this is the default rule. Type: Boolean lastUpdatedAt The date and time that the listener rule was last updated, in ISO-8601 format. Type: Timestamp match The rule match. Type: RuleMatch object Note: This object is a Union. Only one member of this object can be specified or returned. Response Elements API Version 2022-11-30 165 Amazon VPC Lattice name The name of the listener. Type: String API Reference Length Constraints: Minimum length of 3. Maximum length of 63. Pattern: ^(?!rule-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ priority The priority level for the specified rule. Type: Integer Valid Range: Minimum value of 1. Maximum value of 2000. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Errors API Version 2022-11-30 166 Amazon VPC Lattice ValidationException API Reference The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 167 API Reference Amazon VPC Lattice GetService Retrieves information about the specified service. Request Syntax GET /services/serviceIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. serviceIdentifier The ID or ARN of the service. Length Constraints: Minimum length of 17.
vpc-lattice-api-033
vpc-lattice-api.pdf
33
Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 167 API Reference Amazon VPC Lattice GetService Retrieves information about the specified service. Request Syntax GET /services/serviceIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. serviceIdentifier The ID or ARN of the service. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((svc-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:service/svc-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "authType": "string", "certificateArn": "string", "createdAt": "string", "customDomainName": "string", "dnsEntry": { "domainName": "string", GetService API Version 2022-11-30 168 Amazon VPC Lattice API Reference "hostedZoneId": "string" }, "failureCode": "string", "failureMessage": "string", "id": "string", "lastUpdatedAt": "string", "name": "string", "status": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the service. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:service/svc- [0-9a-z]{17}$ authType The type of IAM policy. Type: String Valid Values: NONE | AWS_IAM certificateArn The Amazon Resource Name (ARN) of the certificate. Type: String Length Constraints: Minimum length of 0. Maximum length of 2048. Pattern: ^(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a- z0-9]+)*)?){2}:certificate/[0-9a-z-]+)?$ Response Elements API Version 2022-11-30 169 Amazon VPC Lattice createdAt API Reference The date and time that the service was created, in ISO-8601 format. Type: Timestamp customDomainName The custom domain name of the service. Type: String Length Constraints: Minimum length of 3. Maximum length of 255. dnsEntry The DNS name of the service. Type: DnsEntry object failureCode The failure code. Type: String failureMessage The failure message. Type: String id The ID of the service. Type: String Length Constraints: Fixed length of 21. Pattern: ^svc-[0-9a-z]{17}$ lastUpdatedAt The date and time that the service was last updated, in ISO-8601 format. Type: Timestamp Response Elements API Version 2022-11-30 170 Amazon VPC Lattice name The name of the service. Type: String API Reference Length Constraints: Minimum length of 3. Maximum length of 40. Pattern: ^(?!svc-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ status The status of the service. Type: String Valid Values: ACTIVE | CREATE_IN_PROGRESS | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. Errors API Version 2022-11-30 171 Amazon VPC Lattice HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. API Reference HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 172 API Reference Amazon VPC Lattice GetServiceNetwork Retrieves information about the specified service network. Request Syntax GET /servicenetworks/serviceNetworkIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. serviceNetworkIdentifier The ID or ARN of the service network. Length Constraints: Minimum length of 3. Maximum length of 2048. Pattern: ^((sn-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetwork/sn-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "authType": "string", "createdAt": "string", "id": "string", "lastUpdatedAt": "string", "name": "string", "numberOfAssociatedServices": number, GetServiceNetwork API Version 2022-11-30 173 Amazon VPC Lattice API Reference "numberOfAssociatedVPCs": number, "sharingConfig": { "enabled": boolean } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the service network. Type: String Length Constraints: Minimum length of 32. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:servicenetwork/ sn-[0-9a-z]{17}$ authType The type of IAM policy. Type: String Valid Values: NONE | AWS_IAM createdAt The date and time that the service network was created, in ISO-8601 format. Type: Timestamp id The ID of the service network. Type: String Length Constraints: Fixed length of 20. Response Elements API Version 2022-11-30 174 Amazon VPC Lattice API Reference Pattern: ^sn-[0-9a-z]{17}$ lastUpdatedAt The date and time of the
vpc-lattice-api-034
vpc-lattice-api.pdf
34
The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the service network. Type: String Length Constraints: Minimum length of 32. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:servicenetwork/ sn-[0-9a-z]{17}$ authType The type of IAM policy. Type: String Valid Values: NONE | AWS_IAM createdAt The date and time that the service network was created, in ISO-8601 format. Type: Timestamp id The ID of the service network. Type: String Length Constraints: Fixed length of 20. Response Elements API Version 2022-11-30 174 Amazon VPC Lattice API Reference Pattern: ^sn-[0-9a-z]{17}$ lastUpdatedAt The date and time of the last update, in ISO-8601 format. Type: Timestamp name The name of the service network. Type: String Length Constraints: Minimum length of 3. Maximum length of 63. Pattern: ^(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ numberOfAssociatedServices The number of services associated with the service network. Type: Long numberOfAssociatedVPCs The number of VPCs associated with the service network. Type: Long sharingConfig Specifies if the service network is enabled for sharing. Type: SharingConfig object Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 Errors API Version 2022-11-30 175 Amazon VPC Lattice InternalServerException API Reference An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 176 Amazon VPC Lattice API Reference GetServiceNetworkResourceAssociation Retrieves information about the specified association between a service network and a resource configuration. Request Syntax GET /servicenetworkresourceassociations/serviceNetworkResourceAssociationIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. serviceNetworkResourceAssociationIdentifier The ID of the association. Length Constraints: Minimum length of 22. Maximum length of 2048. Pattern: ^((snra-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkresourceassociation/snra-[0-9a-f]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "createdAt": "string", "createdBy": "string", "dnsEntry": { GetServiceNetworkResourceAssociation API Version 2022-11-30 177 Amazon VPC Lattice API Reference "domainName": "string", "hostedZoneId": "string" }, "failureCode": "string", "failureReason": "string", "id": "string", "isManagedAssociation": boolean, "lastUpdatedAt": "string", "privateDnsEntry": { "domainName": "string", "hostedZoneId": "string" }, "resourceConfigurationArn": "string", "resourceConfigurationId": "string", "resourceConfigurationName": "string", "serviceNetworkArn": "string", "serviceNetworkId": "string", "serviceNetworkName": "string", "status": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the association. Type: String Length Constraints: Minimum length of 22. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkresourceassociation/snra-[0-9a-f]{17}$ createdAt The date and time that the association was created, in ISO-8601 format. Type: Timestamp Response Elements API Version 2022-11-30 178 Amazon VPC Lattice createdBy The account that created the association. Type: String Length Constraints: Minimum length of 1. Maximum length of 12. API Reference Pattern: ^[0-9]{12}$ dnsEntry The DNS entry for the service. Type: DnsEntry object failureCode The failure code. Type: String failureReason The reason the association request failed. Type: String id The ID of the association. Type: String Length Constraints: Fixed length of 22. Pattern: ^snra-[0-9a-f]{17}$ isManagedAssociation Indicates whether the association is managed by Amazon. Type: Boolean lastUpdatedAt The most recent date and time that the association was updated, in ISO-8601 format. Response Elements API Version 2022-11-30 179 Amazon VPC Lattice Type: Timestamp privateDnsEntry The private DNS entry for the service. Type: DnsEntry object resourceConfigurationArn API Reference The Amazon Resource Name (ARN) of the association. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9f\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}$ resourceConfigurationId The ID of the resource configuration that is associated with the service network. Type: String Length Constraints: Fixed length of 22. Pattern: ^rcfg-[0-9a-z]{17}$ resourceConfigurationName The name of the resource configuration that is associated with the service network. Type: String Length Constraints: Minimum length of 3. Maximum length of 40. Pattern: ^(?!rcfg-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ serviceNetworkArn The Amazon Resource Name (ARN) of the service network that is associated with the resource configuration. Type: String Length Constraints: Minimum length of 3. Maximum length of 2048. Response Elements API Version 2022-11-30 180 Amazon VPC Lattice serviceNetworkId API Reference The ID of the service network that is associated with the resource configuration. Type: String Length Constraints: Minimum length of 3.
vpc-lattice-api-035
vpc-lattice-api.pdf
35
Type: String Length Constraints: Fixed length of 22. Pattern: ^rcfg-[0-9a-z]{17}$ resourceConfigurationName The name of the resource configuration that is associated with the service network. Type: String Length Constraints: Minimum length of 3. Maximum length of 40. Pattern: ^(?!rcfg-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ serviceNetworkArn The Amazon Resource Name (ARN) of the service network that is associated with the resource configuration. Type: String Length Constraints: Minimum length of 3. Maximum length of 2048. Response Elements API Version 2022-11-30 180 Amazon VPC Lattice serviceNetworkId API Reference The ID of the service network that is associated with the resource configuration. Type: String Length Constraints: Minimum length of 3. Maximum length of 2048. serviceNetworkName The name of the service network that is associated with the resource configuration. Type: String Length Constraints: Minimum length of 3. Maximum length of 100. status The status of the association. Type: String Valid Values: CREATE_IN_PROGRESS | ACTIVE | PARTIAL | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. Errors API Version 2022-11-30 181 API Reference Amazon VPC Lattice HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 182 Amazon VPC Lattice API Reference GetServiceNetworkServiceAssociation Retrieves information about the specified association between a service network and a service. Request Syntax GET /servicenetworkserviceassociations/serviceNetworkServiceAssociationIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. serviceNetworkServiceAssociationIdentifier The ID or ARN of the association. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((snsa-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkserviceassociation/snsa-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "createdAt": "string", "createdBy": "string", "customDomainName": "string", "dnsEntry": { "domainName": "string", GetServiceNetworkServiceAssociation API Version 2022-11-30 183 Amazon VPC Lattice API Reference "hostedZoneId": "string" }, "failureCode": "string", "failureMessage": "string", "id": "string", "serviceArn": "string", "serviceId": "string", "serviceName": "string", "serviceNetworkArn": "string", "serviceNetworkId": "string", "serviceNetworkName": "string", "status": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the association. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkserviceassociation/snsa-[0-9a-z]{17}$ createdAt The date and time that the association was created, in ISO-8601 format. Type: Timestamp createdBy The account that created the association. Type: String Length Constraints: Minimum length of 1. Maximum length of 12. Response Elements API Version 2022-11-30 184 Amazon VPC Lattice Pattern: ^[0-9]{12}$ customDomainName The custom domain name of the service. Type: String Length Constraints: Minimum length of 3. Maximum length of 255. API Reference dnsEntry The DNS name of the service. Type: DnsEntry object failureCode The failure code. Type: String failureMessage The failure message. Type: String id The ID of the service network and service association. Type: String Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((snsa-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkserviceassociation/snsa-[0-9a-z]{17}))$ serviceArn The Amazon Resource Name (ARN) of the service. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Response Elements API Version 2022-11-30 185 Amazon VPC Lattice API Reference Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:service/svc- [0-9a-z]{17}$ serviceId The ID of the service. Type: String Length Constraints: Fixed length of 21. Pattern: ^svc-[0-9a-z]{17}$ serviceName The name of the service. Type: String Length Constraints: Minimum length of 3. Maximum length of 40. Pattern: ^(?!svc-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ serviceNetworkArn The Amazon Resource Name (ARN) of the service network. Type: String Length Constraints: Minimum length of 32. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:servicenetwork/ sn-[0-9a-z]{17}$ serviceNetworkId The ID of the service network. Type: String Length Constraints: Fixed length of 20. Pattern: ^sn-[0-9a-z]{17}$ serviceNetworkName The name of the service network. Response Elements API Version 2022-11-30 186 Amazon VPC Lattice Type: String API Reference Length Constraints: Minimum length of 3. Maximum length of 63. Pattern: ^(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ status The status of the association. Type: String Valid Values: CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not
vpc-lattice-api-036
vpc-lattice-api.pdf
36
Constraints: Minimum length of 32. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:servicenetwork/ sn-[0-9a-z]{17}$ serviceNetworkId The ID of the service network. Type: String Length Constraints: Fixed length of 20. Pattern: ^sn-[0-9a-z]{17}$ serviceNetworkName The name of the service network. Response Elements API Version 2022-11-30 186 Amazon VPC Lattice Type: String API Reference Length Constraints: Minimum length of 3. Maximum length of 63. Pattern: ^(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ status The status of the association. Type: String Valid Values: CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. Errors API Version 2022-11-30 187 Amazon VPC Lattice HTTP Status Code: 400 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 188 Amazon VPC Lattice API Reference GetServiceNetworkVpcAssociation Retrieves information about the specified association between a service network and a VPC. Request Syntax GET /servicenetworkvpcassociations/serviceNetworkVpcAssociationIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. serviceNetworkVpcAssociationIdentifier The ID or ARN of the association. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((snva-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkvpcassociation/snva-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "createdAt": "string", "createdBy": "string", "failureCode": "string", "failureMessage": "string", "id": "string", "lastUpdatedAt": "string", GetServiceNetworkVpcAssociation API Version 2022-11-30 189 Amazon VPC Lattice API Reference "securityGroupIds": [ "string" ], "serviceNetworkArn": "string", "serviceNetworkId": "string", "serviceNetworkName": "string", "status": "string", "vpcId": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the association. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:servicenetworkvpcassociation/snva-[0-9a-z]{17}$ createdAt The date and time that the association was created, in ISO-8601 format. Type: Timestamp createdBy The account that created the association. Type: String Length Constraints: Minimum length of 1. Maximum length of 12. Pattern: ^[0-9]{12}$ failureCode The failure code. Response Elements API Version 2022-11-30 190 API Reference Amazon VPC Lattice Type: String failureMessage The failure message. Type: String id The ID of the association. Type: String Length Constraints: Fixed length of 22. Pattern: ^snva-[0-9a-z]{17}$ lastUpdatedAt The date and time that the association was last updated, in ISO-8601 format. Type: Timestamp securityGroupIds The IDs of the security groups. Type: Array of strings Length Constraints: Minimum length of 5. Maximum length of 200. Pattern: ^sg-(([0-9a-z]{8})|([0-9a-z]{17}))$ serviceNetworkArn The Amazon Resource Name (ARN) of the service network. Type: String Length Constraints: Minimum length of 32. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:servicenetwork/ sn-[0-9a-z]{17}$ serviceNetworkId The ID of the service network. Response Elements API Version 2022-11-30 191 API Reference Amazon VPC Lattice Type: String Length Constraints: Fixed length of 20. Pattern: ^sn-[0-9a-z]{17}$ serviceNetworkName The name of the service network. Type: String Length Constraints: Minimum length of 3. Maximum length of 63. Pattern: ^(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ status The status of the association. Type: String Valid Values: CREATE_IN_PROGRESS | ACTIVE | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED | UPDATE_FAILED vpcId The ID of the VPC. Type: String Length Constraints: Minimum length of 5. Maximum length of 50. Pattern: ^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 Errors API Version 2022-11-30 192 Amazon VPC Lattice InternalServerException API Reference An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for
vpc-lattice-api-037
vpc-lattice-api.pdf
37
occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 193 API Reference Amazon VPC Lattice GetTargetGroup Retrieves information about the specified target group. Request Syntax GET /targetgroups/targetGroupIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. targetGroupIdentifier The ID or ARN of the target group. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((tg-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:targetgroup/tg-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "arn": "string", "config": { "healthCheck": { "enabled": boolean, "healthCheckIntervalSeconds": number, "healthCheckTimeoutSeconds": number, "healthyThresholdCount": number, "matcher": { ... }, GetTargetGroup API Version 2022-11-30 194 Amazon VPC Lattice API Reference "path": "string", "port": number, "protocol": "string", "protocolVersion": "string", "unhealthyThresholdCount": number }, "ipAddressType": "string", "lambdaEventStructureVersion": "string", "port": number, "protocol": "string", "protocolVersion": "string", "vpcIdentifier": "string" }, "createdAt": "string", "failureCode": "string", "failureMessage": "string", "id": "string", "lastUpdatedAt": "string", "name": "string", "serviceArns": [ "string" ], "status": "string", "type": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. arn The Amazon Resource Name (ARN) of the target group. Type: String Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:targetgroup/tg- [0-9a-z]{17}$ config The target group configuration. Response Elements API Version 2022-11-30 195 Amazon VPC Lattice API Reference Type: TargetGroupConfig object createdAt The date and time that the target group was created, in ISO-8601 format. Type: Timestamp failureCode The failure code. Type: String failureMessage The failure message. Type: String id The ID of the target group. Type: String Length Constraints: Fixed length of 20. Pattern: ^tg-[0-9a-z]{17}$ lastUpdatedAt The date and time that the target group was last updated, in ISO-8601 format. Type: Timestamp name The name of the target group. Type: String Length Constraints: Minimum length of 3. Maximum length of 128. Pattern: ^(?!tg-)(?![-])(?!.*[-]$)(?!.*[-]{2})[a-z0-9-]+$ serviceArns The Amazon Resource Names (ARNs) of the service. Response Elements API Version 2022-11-30 196 Amazon VPC Lattice Type: Array of strings API Reference Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+:\d{12}:service/svc- [0-9a-z]{17}$ status The status. Type: String Valid Values: CREATE_IN_PROGRESS | ACTIVE | DELETE_IN_PROGRESS | CREATE_FAILED | DELETE_FAILED type The target group type. Type: String Valid Values: IP | LAMBDA | INSTANCE | ALB Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 Errors API Version 2022-11-30 197 Amazon VPC Lattice ThrottlingException API Reference The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 198 Amazon VPC Lattice API Reference ListAccessLogSubscriptions Lists the access log subscriptions for the specified service network or service. Request Syntax GET /accesslogsubscriptions? maxResults=maxResults&nextToken=nextToken&resourceIdentifier=resourceIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. maxResults The maximum number of results to return. Valid Range: Minimum value of 1. Maximum value of 100. nextToken A pagination token for the next page of results. Length Constraints: Minimum length of 1. Maximum length of 2048. resourceIdentifier The ID or ARN of the service network or service. Length Constraints: Minimum length of 17. Maximum length of 200. Pattern: ^((((sn)|(svc)|(rcfg))-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a- z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:((servicenetwork/sn)| (resourceconfiguration/rcfg)|(service/svc))-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. ListAccessLogSubscriptions API Version 2022-11-30 199 API Reference Amazon VPC Lattice
vpc-lattice-api-038
vpc-lattice-api.pdf
38
Syntax GET /accesslogsubscriptions? maxResults=maxResults&nextToken=nextToken&resourceIdentifier=resourceIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. maxResults The maximum number of results to return. Valid Range: Minimum value of 1. Maximum value of 100. nextToken A pagination token for the next page of results. Length Constraints: Minimum length of 1. Maximum length of 2048. resourceIdentifier The ID or ARN of the service network or service. Length Constraints: Minimum length of 17. Maximum length of 200. Pattern: ^((((sn)|(svc)|(rcfg))-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a- z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:((servicenetwork/sn)| (resourceconfiguration/rcfg)|(service/svc))-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. ListAccessLogSubscriptions API Version 2022-11-30 199 API Reference Amazon VPC Lattice Response Syntax HTTP/1.1 200 Content-type: application/json { "items": [ { "arn": "string", "createdAt": "string", "destinationArn": "string", "id": "string", "lastUpdatedAt": "string", "resourceArn": "string", "resourceId": "string", "serviceNetworkLogType": "string" } ], "nextToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. items Information about the access log subscriptions. Type: Array of AccessLogSubscriptionSummary objects nextToken A pagination token for the next page of results. Type: String Length Constraints: Minimum length of 1. Maximum length of 2048. Response Syntax API Version 2022-11-30 200 Amazon VPC Lattice Errors API Reference For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 Errors API Version 2022-11-30 201 Amazon VPC Lattice • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 202 Amazon VPC Lattice ListListeners Lists the listeners for the specified service. Request Syntax API Reference GET /services/serviceIdentifier/listeners?maxResults=maxResults&nextToken=nextToken HTTP/1.1 URI Request Parameters The request uses the following URI parameters. maxResults The maximum number of results to return. Valid Range: Minimum value of 1. Maximum value of 100. nextToken A pagination token for the next page of results. Length Constraints: Minimum length of 1. Maximum length of 2048. serviceIdentifier The ID or ARN of the service. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((svc-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:service/svc-[0-9a-z]{17}))$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 ListListeners API Version 2022-11-30 203 Amazon VPC Lattice API Reference Content-type: application/json { "items": [ { "arn": "string", "createdAt": "string", "id": "string", "lastUpdatedAt": "string", "name": "string", "port": number, "protocol": "string" } ], "nextToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. items Information about the listeners. Type: Array of ListenerSummary objects nextToken If there are additional results, a pagination token for the next page of results. Type: String Length Constraints: Minimum length of 1. Maximum length of 2048. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. Response Elements API Version 2022-11-30 204 API Reference Amazon VPC Lattice HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 205 Amazon VPC Lattice API Reference See Also API Version 2022-11-30 206 Amazon VPC Lattice API Reference ListResourceConfigurations Lists the resource configurations owned by or shared with this account. Request Syntax GET /resourceconfigurations? maxResults=maxResults&nextToken=nextToken&resourceConfigurationGroupIdentifier=resourceConfigurationGroupIdentifier&resourceGatewayIdentifier=resourceGatewayIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. maxResults The maximum page
vpc-lattice-api-039
vpc-lattice-api.pdf
39
.NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 205 Amazon VPC Lattice API Reference See Also API Version 2022-11-30 206 Amazon VPC Lattice API Reference ListResourceConfigurations Lists the resource configurations owned by or shared with this account. Request Syntax GET /resourceconfigurations? maxResults=maxResults&nextToken=nextToken&resourceConfigurationGroupIdentifier=resourceConfigurationGroupIdentifier&resourceGatewayIdentifier=resourceGatewayIdentifier HTTP/1.1 URI Request Parameters The request uses the following URI parameters. maxResults The maximum page size. Valid Range: Minimum value of 1. Maximum value of 100. nextToken A pagination token for the next page of results. Length Constraints: Minimum length of 1. Maximum length of 2048. resourceConfigurationGroupIdentifier The ID of the resource configuration of type Group. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((rcfg-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}))$ resourceGatewayIdentifier The ID of the resource gateway for the resource configuration. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((rgw-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourcegateway/rgw-[0-9a-z]{17}))$ ListResourceConfigurations API Version 2022-11-30 207 API Reference Amazon VPC Lattice Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "items": [ { "amazonManaged": boolean, "arn": "string", "createdAt": "string", "id": "string", "lastUpdatedAt": "string", "name": "string", "resourceConfigurationGroupId": "string", "resourceGatewayId": "string", "status": "string", "type": "string" } ], "nextToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. items Information about the resource configurations. Type: Array of ResourceConfigurationSummary objects nextToken If there are additional results, a pagination token for the next page of results. Request Body API Version 2022-11-30 208 Amazon VPC Lattice Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 2048. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 Errors API Version 2022-11-30 209 Amazon VPC Lattice • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2022-11-30 210 Amazon VPC Lattice API Reference ListResourceEndpointAssociations Lists the associations for the specified VPC endpoint. Request Syntax GET /resourceendpointassociations? maxResults=maxResults&nextToken=nextToken&resourceConfigurationIdentifier=resourceConfigurationIdentifier&resourceEndpointAssociationIdentifier=resourceEndpointAssociationIdentifier&vpcEndpointId=vpcEndpointId&vpcEndpointOwner=vpcEndpointOwner HTTP/1.1 URI Request Parameters The request uses the following URI parameters. maxResults The maximum page size. Valid Range: Minimum value of 1. Maximum value of 100. nextToken A pagination token for the next page of results. Length Constraints: Minimum length of 1. Maximum length of 2048. resourceConfigurationIdentifier The ID for the resource configuration associated with the VPC endpoint. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((rcfg-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceconfiguration/rcfg-[0-9a-z]{17}))$ Required: Yes resourceEndpointAssociationIdentifier The ID of the association. Length Constraints: Minimum length of 21. Maximum length of 2048. ListResourceEndpointAssociations API Version 2022-11-30 211 Amazon VPC Lattice API Reference Pattern: ^((rea-[0-9a-f]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:resourceendpointassociation/rea-[0-9a-f]{17}))$ vpcEndpointId The ID of the VPC endpoint in the association. Length Constraints: Fixed length of 22. Pattern: ^vpce-[0-9a-f]{17}$ vpcEndpointOwner The owner of the VPC endpoint in the association. Length Constraints: Fixed length of 12. Pattern: ^\d{12}$ Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "items": [ { "arn": "string", "createdAt": "string", "createdBy": "string", "id": "string", "resourceConfigurationArn": "string", "resourceConfigurationId": "string", "resourceConfigurationName": "string", "vpcEndpointId": "string", "vpcEndpointOwner": "string" } ], "nextToken": "string" Request Body API Version 2022-11-30 212 Amazon VPC Lattice } Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. items Information about the VPC endpoint associations. Type: Array of ResourceEndpointAssociationSummary objects nextToken If there are additional results, a pagination token for the next page of results. Type: String Length Constraints: Minimum length of 1. Maximum length of 2048. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ThrottlingException The limit on the
vpc-lattice-api-040
vpc-lattice-api.pdf
40
response. The following data is returned in JSON format by the service. items Information about the VPC endpoint associations. Type: Array of ResourceEndpointAssociationSummary objects nextToken If there are additional results, a pagination token for the next page of results. Type: String Length Constraints: Minimum length of 1. Maximum length of 2048. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. HTTP Status Code: 500 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Response Elements API Version 2022-11-30 213 Amazon VPC Lattice ValidationException API Reference The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 214 Amazon VPC Lattice API Reference ListResourceGateways Lists the resource gateways that you own or that were shared with you. Request Syntax GET /resourcegateways?maxResults=maxResults&nextToken=nextToken HTTP/1.1 URI Request Parameters The request uses the following URI parameters. maxResults The maximum page size. Valid Range: Minimum value of 1. Maximum value of 100. nextToken If there are additional results, a pagination token for the next page of results. Length Constraints: Minimum length of 1. Maximum length of 2048. Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "items": [ { "arn": "string", "createdAt": "string", "id": "string", "ipAddressType": "string", "lastUpdatedAt": "string", ListResourceGateways API Version 2022-11-30 215 Amazon VPC Lattice API Reference "name": "string", "securityGroupIds": [ "string" ], "status": "string", "subnetIds": [ "string" ], "vpcIdentifier": "string" } ], "nextToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. items Information about the resource gateways. Type: Array of ResourceGatewaySummary objects nextToken If there are additional results, a pagination token for the next page of results. Type: String Length Constraints: Minimum length of 1. Maximum length of 2048. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException The user does not have sufficient access to perform this action. HTTP Status Code: 403 InternalServerException An unexpected error occurred while processing the request. Response Elements API Version 2022-11-30 216 API Reference Amazon VPC Lattice HTTP Status Code: 500 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 ValidationException The input does not satisfy the constraints specified by an AWS service. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2022-11-30 217 Amazon VPC Lattice ListRules Lists the rules for the specified listener. Request Syntax API Reference GET /services/serviceIdentifier/listeners/listenerIdentifier/rules? maxResults=maxResults&nextToken=nextToken HTTP/1.1 URI Request Parameters The request uses the following URI parameters. listenerIdentifier The ID or ARN of the listener. Length Constraints: Minimum length of 20. Maximum length of 2048. Pattern: ^((listener-[0-9a-z]{17})|(^arn:[a-z0-9\-]+:vpc-lattice:[a-zA- Z0-9\-]+:\d{12}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z] {17}$))$ Required: Yes maxResults The maximum number of results to return. Valid Range: Minimum value of 1. Maximum value of 100. nextToken A pagination token for the next page of results. Length Constraints: Minimum length of 1. Maximum length of 2048. serviceIdentifier The ID or ARN of the service. Length Constraints: Minimum length of 17. Maximum length of 2048. Pattern: ^((svc-[0-9a-z]{17})|(arn:[a-z0-9\-]+:vpc-lattice:[a-zA-Z0-9\-]+: \d{12}:service/svc-[0-9a-z]{17}))$ ListRules API Version 2022-11-30 218 API Reference Amazon VPC Lattice Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "items": [ { "arn": "string", "createdAt": "string", "id": "string", "isDefault": boolean, "lastUpdatedAt": "string", "name": "string", "priority": number } ], "nextToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. items Information about the rules. Type: Array of RuleSummary objects nextToken If there are additional results, a pagination token for the next page of results. Request Body