I have a long list of keys I want to check for existence in s3. They have different prefixes, and I want this to be fast, thus checking one by one won't do the trick.
This checks one by one
This assumes similar prefixes.
I need a call similar to the following
def keys_that_exist(keys: Sequence[str]) -> Sequence[bool]:
return [True if i % 2 == 0 else False for i, key in enumerate(keys)] # just some example output.
How to do this without an API call to s3 for each and every key, using boto3 or another Python library?