1 Answer
- Newest
- Most votes
- Most comments
1
Things fail all the time and nothing is perfect.
If the vast majority of your Kinesis calls succeed in less than a second, why not set the network/TCP timeout on the Kinesis calls to (say) five seconds? You already know the retry will work so why not make it work faster?
You might also consider performing some sort of random exponential backoff. There's a great article about this in the Amazon Builder's Library - you haven't said that the trigger is for the Lambda function but you might find that using a queue (such as SQS) is helpful here too.

would something like this work? and create the Kinesis using this session.
I don't know - sorry. I'm not a JS expert.