def get_s3_keys()

in python_sample.py [0:0]


def get_s3_keys(bucket, prefix, start_time):
    client = get_s3_client()
    keys = []
    kwargs = {'Bucket': bucket, 'Prefix': prefix}
    while True:
        resp = client.list_objects_v2(**kwargs)
        for obj in resp['Contents']:
            key = obj['Key']
            # not necessary, but speeds up execution
            if get_last_timestamp(key) < start_time:
                continue # we make use of the key format to avoid downloading too many objects https://ember.deltixlab.com/docs/dw/s3/#batches--objects
            keys.append(key)
        try:
            kwargs['ContinuationToken'] = resp['NextContinuationToken']
        except KeyError:
            break
    return keys