From 7d0334b029f1d739b012c44dfce024e9d94da8cf Mon Sep 17 00:00:00 2001 From: Sid Patel Date: Mon, 8 Jun 2020 17:45:22 -0400 Subject: [PATCH] fix: ansible kinesis stream paginated shards bug --- plugins/modules/kinesis_stream.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/modules/kinesis_stream.py b/plugins/modules/kinesis_stream.py index 51ca85ddc94..e41a5fa6460 100644 --- a/plugins/modules/kinesis_stream.py +++ b/plugins/modules/kinesis_stream.py @@ -362,6 +362,7 @@ def find_stream(client, stream_name, check_mode=False): ) shards.extend(results.pop('Shards')) has_more_shards = results['HasMoreShards'] + params['ExclusiveStartShardId'] = shards[-1]['ShardId'] results['Shards'] = shards num_closed_shards = len([s for s in shards if 'EndingSequenceNumber' in s['SequenceNumberRange']]) results['OpenShardsCount'] = len(shards) - num_closed_shards