How to use VPC Peering cross-accounts in AWS CDK in Python between two different VPC Networks between AWS Accounts

VPC Peering is a quick way to connect to different VPC networks, you can use it with two different VPC Networks on a single account read how to use VPC Peering with two different VPC networks on a single AWS account from my other article if you need the basic understanding for how VPC Peering is working, in this article, you will learn how to use VPC Peering between two different AWS Accounts and how you connect the VPC Networks together.

Basic settings file

We need to define different settings for cross-using our VPC Peering between two AWS accounts, fill this setting file out and be sure you did not replace the data you can’t before the stacks are deployed success.

We are using 10.21.x.x for our VPC Network one and we are using 10.22.x.x for our VPC Network two, this will make sure we can use VPC Peering correctly.

VPC Network One — Primary

--

--

Paris Nakita Kejser
DevOps Engineer, Software Architect and Software Developering

DevOps Engineer, Software Architect, Software Developer, Data Scientist and identify me as a non-binary person.