Can i somehow search objects in S3 by extension, not only by prefix?
Here is what i have now:
ListObjectsResponse r = s3Client.ListObjects(new Amazon
You can easily list all the elements by extension, getting all the elements (including folders) and then filtering by key.endswith('...')
import boto3
s3 = boto3.resource('s3')
bucket = s3.Bucket('your-route')
# Data from S3 is also filtered by endswith from key property
for _ in bucket.objects.filter(Prefix=test_dir):
if _.key.endswith('.zicu'):
print('Value of object: ', _.key)
In this case I'm filtering each element with a Prefix (test_dir) and then showing just the elements with .zicu extension