def list_bucket_with_prefix(s3_client, bucket, prefix):
    """ Paginated listing of contents within an S3 bucket prefix. """
    token = None
    more_keys = True
    keys = []
    while more_keys:
        kwargs = {
            'Bucket': bucket,
            'Prefix': prefix,
        }
        if token is not None:
            kwargs['ContinuationToken'] = token
        response = s3_client.list_objects_v2(
            **kwargs
        )
        token = response.get('NextContinuationToken', None)
        more_keys = (token is not None)
        keys.extend([content['Key'] for content in response['Contents']])
    return keys