Creating CfnDestination with specific region using CDK

0

I created a Kinesis stream and CfnDestination in my account through CDK in <region-1>. And created CloudWatch logs subscription filters in cross-accounts to stream data to my kinesis. Now for subscription filters in <region-2> accounts I will need to create CfnDestinations in <region-2>.

I followed this AWS Article to achieve it through CLI. Now I want to integrate this step in my CDK code.

I checked through various AWS resources/articles & went through the CfnDestination code base, but couldn't find any place in code where I can specify the region where the CfnDestination should be created.

1回答
0

I was able to achieve it by creating a separate deployment group for the required region and then created CfnDestination stacks inside those with the same region as deployment group. Also, added the CfnDestination Stack's dependency on Kinesis Stream stack. As I'm using CDK v1, as a work-around due to know issue described in this Github issue, I had to create a dedicated role with each CfnDestination. Problem Solved. For future, We can check if there is a way to achieve it without creating multiple roles for each region. (Or maybe this can be solved by upgrading to CDK v2).

回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ