By using AWS re:Post, you agree to the Terms of Use

Cross-account VPC connection using CDK


I was trying to come up with the best approach for creating cross-account VPC connection using CDK. What is the best recommendation to achieve this?

2 Answers

Hello Suman, I understand that you are trying to create cross-account VPC connection using CDK, but you want to know the best way to connect VPCs across accounts. Please let me know if I misunderstood your question. There is no "best" approach for creating cross-account VPC connection, you are free to use any method for VPC peering that you are comfortable with (for example using console, CDK, etc). To to create the VPC peering across account using CDK:

  • Create a stack with the number of VPC's that you want
  • Synthesize the Cloud Formation for your code
  • Create EC2’s and peering connections between the VPC's
  • Please note that the CDK is in place such that it does not have dependency on the resource creation.
  • For more information on CDK and VPC Peering please Refer to documentation below Please contact if you have any further questions, and feel free to reach out to us via a support case to facilitate a discussion on the specifics of your resources. I have attached some resources to help guide with the AWS CDK and Cloud Formation process, Thank you and Good Luck!
  3. 4.
answered 3 months ago

You can use the following to get started using cdk.

profile picture
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions