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 年前

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

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

回答問題指南