Unable to create subscription filter to KinesisStream using AWS CDK

0 votes

I want to stream some logs from cloudwatch to S3. For this I have created the resources via CDK. The code relevant to Kinesis is -

const rootStream = new Stream(this, 'Root', {
      streamName: `stream-name`
    });

    const firehoseRole = new Role(this, `some-id`, {
      assumedBy: new ServicePrincipal('firehose.amazonaws.com'),
      roleName: `some-role-name`
    });

  rootStream.grantRead(firehoseRole);
  rootStream.grant(firehoseRole, 'kinesis:DescribeStream');

const firehoseStreamToS3 = new CfnDeliveryStream(...);// omitted the large config  

    const subFilterDestination = new KinesisDestination(rootStream);

    const subFilter = new SubscriptionFilter(this, 'xyz', {
      destination: subFilterDestination,
      filterPattern: FilterPattern.literal('some=pattern'),
      logGroup: myLogGroup
    });
    subFilter.node.addDependency(myLogGroup);

During deployment I get the error

X:XX:XX PM | CREATE_FAILED        | AWS::Logs::SubscriptionFilter        | LogProcessingFilterXYZABC
Resource handler returned message: "Could not deliver test message to specified Kinesis stream. Check if the given kinesis strea
m is in ACTIVE state. (Service: CloudWatchLogs, Status Code: 400, Request ID: abcdef-bbbb-cccc-dddd-xxxxxxxxx)" (RequestTok
en: xxxxxxxxxxxxxxxx, HandlerErrorCode: InternalFailure)

What is the cause of this error and how to fix it?

Dec 27, 2022 in AWS by Tejashwini
• 3,820 points

edited 5 days ago 9 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP