I have the following folder structure in S3.
myBucket/20190313/20190313_100000/_SUCCESS
I need to check whether there is _SUCCESS File present
Query I am currently using:
date = 20190313
bucket = s3Resource.Bucket(myBucket)
objs = list(bucket.objects.filter(Prefix=date+'/'))
I do not know what will be inside of the date folder. But is in yyyymmdd_hhmmss format.
Is there a way to query for that specific "_SUCCESS" file, if only "myBucket/20190313/" is known?
The API docs says that you cant use a regex
Limits the response to keys that begin with the specified prefix. You can use prefixes to separate a bucket into different groupings of keys. (You can think of using prefix to make groups in the same way you would use a folder in a file system.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With