DEV Community

Discussion on: Ping Me! (Part 3: Transit Gateway Using CDK)

Collapse
include profile image
Francisco

Congrats!! Great post! (great section about TGW)!

What if we have two distinct accounts - I know that the peer transit gateway can be in a different AWS account. What would be the CDK code for this scenario?

kthxbye,
include

Collapse
rafalkrolxyz profile image
Rafal Krol Author

Hi, Francisco! Happy you liked the post!

As far as your question is concerned, with two or more accounts, it is a common scenario (especially if those accounts are members of an AWS Organizations' organization, though it's not a prerequisite) to share a TGW using AWS RAM. You could achieve that using the CfnResourceShare class.

Collapse
include profile image
Francisco

Hi Rafa - thank you for your reply :)
I'm gona play with your nice tip!