aws-sdk-js-v3: Kinesis `SubscribeToShardCommand` call does not resolve

Describe the bug

Calling SubscribeToShardCommand on kinesis client never resolves.

Your environment

SDK version number

"@aws-sdk/client-kinesis": "^3.8.1",

Is the issue in the browser/Node.js/ReactNative?

Node.js

Details of the browser/Node.js/ReactNative version

▶ node -v
v12.16.1

Steps to reproduce

import { KinesisClient, SubscribeToShardCommand  } from '@aws-sdk/client-kinesis';

const client = new KinesisClient({ region: 'us-west-2' });
const params = {
  ConsumerARN: 'my-consumer-arn',
  ShardId: 'my-shard-id',
  StartingPosition: { Type: 'TRIM_HORIZON' },
};
const command = new SubscribeToShardCommand(params);
const data = await client.send(command); // <-- never resolves

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 7
  • Comments: 18 (1 by maintainers)

Most upvoted comments

This is probably one of the most common features to be used by any kinesis fan-out consumer. Very disappointed that it doesn’t work. What’s the point of having it in the sdk. 👎🏻

Hi all, we are aware of this issue, the reason is because Kinesis does not support HTTP/2 at the moment. Similar behavior with v2 SDK (related to #2799). Will update more when it is fixed.

It’s definitely not a kinesis issue. Aws node sdk doesn’t support http/2 sessions which is the tech used by kinesis fanout feature.

I had to switch our consumer app to golang and it works perfectly fine with go aws sdk v2.

Same thing is happening to me except the promise resolves after 5 minutes with the following error:

SyntaxError:` Unexpected token in JSON at position 0
at JSON.parse (<anonymous>)
    at Aws_json1_1.ts:4020

@vudh1 Any updates?

I am a bit confused, I was under the impression kinesis had HTTP/2 support back in 2018?

And nodejs also has http/2 support.

Why would the SDK take years to add http/2 support but release functions that don’t work - that as far as i can see fail in the most basic of tests - what am i missing?

@alexstar2008 @stepanrx @BKurzawa is this still and issue with latest version of the SDK?

same behavior with SDK version 3.24.0