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).

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠