Vpc Peering Cloudformation
The vpc peering connection request expires after 7 days after which it cannot be accepted or rejected.
Vpc peering cloudformation. Create a vpc and a cross account role step 2. Adding vpc peering routes in cloudformation across different aws accounts. Viewed 2k times 1.
Include vpc peering to connect the vpc of each application instance to a central vpc. Aws creates a default vpc for you in every region but we will be creating a new vpc from the ground up to give ourselves complete control. In this post we ll create a vpc via cloudformation templates.
The connection is accepted automagically because of the iam role setup. Create a template that includes aws ec2 vpcpeeringconnection creating a template with a highly restrictive policy. Aws documentation aws cloudformation user guide prerequisites step 1.
In order to accept a vpc peering connection in the other account. Your account requests a peering connection with the other account. The vpc will have 10 0 0 0 12 cidr which means we ll have 10 0 x x ips.
The first one within 1 az and 2nd one across 2 azs. You also want to use cloudformation for creating the peer between the target vpcs and the services vpc because it s easier for you to manage and keep track of the peering connections if they are tied to a cloudformation stack. Cloudformation vpc peering accept.
Using this aws walkthrough i can successfully add a vpc peering connection between different aws accounts. Every time a new target vpc is created you want to have an easy way to connect that vpc to the services vpc. You have the ability to allow as much or as little external traffic into your vpc as you d like.