AWS::EC2::VPCPeeringConnectionRequests 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 a different AWS account and can be in a different Region than the requester VPC. The requester VPC and accepter VPC cannot have overlapping CIDR blocks. If you create a VPC peering connection request between VPCs with overlapping CIDR blocks, the VPC peering connection has a status of `failed` . If the VPCs belong to different accounts, the acceptor account must have a role that allows the requester account to accept the VPC peering connection. For an example, see [Walkthrough: Peer with a VPC in another AWS account](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/peer-with-vpc-in-another-account.html) . If the requester and acceptor VPCs are in the same account, the peering request is accepted without a peering role.
import { CfnVPCPeeringConnection } from 'aws-cdk-lib/aws-ec2';Or use the module namespace:
import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.CfnVPCPeeringConnectionConfiguration passed to the constructor as CfnVPCPeeringConnectionProps.
peerVpcIdRequiredstring | IVPCRefThe ID of the VPC with which you are creating the VPC peering connection. You must specify this parameter in the request.
vpcIdRequiredstring | IVPCRefThe ID of the VPC.
assumeRoleRegionOptionalstringThe Region code to use when calling Security Token Service (STS) to assume the PeerRoleArn, if provided.
peerOwnerIdOptionalstringThe AWS account ID of the owner of the accepter VPC. Default: Your AWS account ID
peerRegionOptionalstringThe Region code for the accepter VPC, if the accepter VPC is located in a Region other than the Region in which you make the request. Default: The Region in which you make the request.
peerRoleArnOptionalstringThe Amazon Resource Name (ARN) of the VPC peer role for the peering connection in another AWS account. This is required when you are peering a VPC in a different AWS account.
tagsOptionalCfnTag[]Any tags assigned to the resource.
This L1 construct maps directly to the following CloudFormation resource type.
Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.
Download Free Infographicaws-ec2AWS::EC2::VPCPeeringConnection