Requests a VPC peering connection between two VPCs: a requester VPC that you own and
an accepter VPC with which to create the connection. The accepter VPC can belong to
another Amazon Web Services account and can be in a different Region to the requester VPC.
The requester VPC and accepter VPC cannot have overlapping CIDR blocks.
Limitations and rules apply to a VPC peering connection. For more information, see
the limitations section in the VPC Peering Guide.
The owner of the accepter VPC must accept the peering request to activate the peering
connection. The VPC peering connection request expires after 7 days, after which it
cannot be accepted or rejected.
If you create a VPC peering connection request between VPCs with overlapping CIDR
blocks, the VPC peering connection has a status of failed.
Example
Use a bare-bones client and the command you need to make an API call.
Requests a VPC peering connection between two VPCs: a requester VPC that you own and an accepter VPC with which to create the connection. The accepter VPC can belong to another Amazon Web Services account and can be in a different Region to the requester VPC. The requester VPC and accepter VPC cannot have overlapping CIDR blocks.
Limitations and rules apply to a VPC peering connection. For more information, see the limitations section in the VPC Peering Guide.
The owner of the accepter VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.
If you create a VPC peering connection request between VPCs with overlapping CIDR blocks, the VPC peering connection has a status of
failed
.Example
Use a bare-bones client and the command you need to make an API call.
Param
CreateVpcPeeringConnectionCommandInput
Returns
CreateVpcPeeringConnectionCommandOutput
See
input
shape.response
shape.config
shape.Throws
EC2ServiceException
Base exception class for all service exceptions from EC2 service.