Cross-account VPC connection using CDK

0

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?

Suman
已提問 2 年前檢視次數 2230 次
2 個答案
0

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!
  1. https://aws.amazon.com/blogs/devops/cdk-credential-plugin/
  2. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/peer-with-vpc-in-another-account.html
  3. https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnVPCPeeringConnection.html 4.https://docs.aws.amazon.com/vpc/latest/userguide/vpc-peering.html
Arish_T
已回答 2 年前
0

You can use the following to get started using cdk.

profile pictureAWS
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南