def get_stream_when_active(stream_name, region=None, key=None, keyid=None, profile=None):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 stream_status = None
 attempt = 0
 max_retry_delay = 10
 while (stream_status != 'ACTIVE'):
  time.sleep(_jittered_backoff(attempt, max_retry_delay))
  attempt += 1
  stream_response = _get_basic_stream(stream_name, conn)
  if ('error' in stream_response):
   return stream_response
  stream_status = stream_response['result']['StreamDescription']['StreamStatus']
 if stream_response['result']['StreamDescription']['HasMoreShards']:
  stream_response = _get_full_stream(stream_name, region, key, keyid, profile)
 return stream_response

def get_stream_when_active ( stream_name , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) stream_status = None attempt = 0 max_retry_delay = 10 while ( stream_status != 'ACTIVE' ) : time . sleep ( _jittered_backoff ( attempt , max_retry_delay ) ) attempt += 1 stream_response = _get_basic_stream ( stream_name , conn ) if ( 'error' in stream_response ) : return stream_response stream_status = stream_response [ 'result' ] [ 'StreamDescription' ] [ 'StreamStatus' ] if stream_response [ 'result' ] [ 'StreamDescription' ] [ 'HasMoreShards' ] : stream_response = _get_full_stream ( stream_name , region , key , keyid , profile ) return stream_response
get complete stream info from aws .