

def load_digest_keys_in_range(self, bucket, prefix, start_date, end_date):
    'Returns a list of digest keys in the date range.\n\n        This method uses a list_objects API call and provides a Marker\n        parameter that is calculated based on the start_date provided.\n        Amazon S3 then returns all keys in the bucket that start after\n        the given key (non-inclusive). We then iterate over the keys\n        until the date extracted from the yielded keys is greater than\n        the given end_date.\n        '
    digests = []
    marker = self._create_digest_key(start_date, prefix)
    client = self._client_provider.get_client(bucket)
    paginator = client.get_paginator('list_objects')
    page_iterator = paginator.paginate(Bucket=bucket, Marker=marker)
    key_filter = page_iterator.search('Contents[*].Key')
    target_start_date = format_date(normalize_date(start_date))
    target_end_date = format_date(normalize_date((end_date + timedelta(hours=1))))
    digest_key_regex = re.compile(self._create_digest_key_regex(prefix))
    for key in key_filter:
        if digest_key_regex.match(key):
            extracted_date = extract_digest_key_date(key)
            if (extracted_date > target_end_date):
                break
            if (extracted_date >= target_start_date):
                digests.append(key)
    return digests

dataset/ETHPy150Open aws/aws-cli/awscli/customizations/cloudtrail/validation.py DigestProvider.load_digest_keys_in_range/original