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

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions