def _get_next_open_shard(stream_details, shard_id):
 found = False
 for shard in stream_details['OpenShards']:
  current_shard_id = shard['ShardId']
  if (current_shard_id == shard_id):
   found = True
   continue
  if found:
   return current_shard_id

def _get_next_open_shard ( stream_details , shard_id ) : found = False for shard in stream_details [ 'OpenShards' ] : current_shard_id = shard [ 'ShardId' ] if ( current_shard_id == shard_id ) : found = True continue if found : return current_shard_id
return the next open shard after shard_id cli example:: salt myminion boto_kinesis .