简体   繁体   中英

S3 prefix for listing objects with paritial uuids

I was curious if it was possible to create an S3 prefix which can scope the object listening to a particular folder depending on having just partial data.

basically the structure is like below, where I can only provide the uuid for uuid1 and uuid2. I can't retrieve the ignoreUuid in order to build up the prefix.

Is it possible for me to filter by only providing uuid1 and uuid2?

I can only do by uuid1 at the moment but the listening can be in the thousands and is quite time intensive.

prefer:  S3_SCAN_RESULT_PREFIX = "{uuid1}/files/{ignoreUuid}/{uuid2}";

currently: S3_SCAN_RESULT_PREFIX = "{uuid1}/files/"; (not optional as this can be quite a huge and expensive object listing) 

   objectListing objects = amazonS3Client().listObjects(bucket, format(S3_RESULT_PREFIX, uuid1, uuid2));

No, it's not possible to natively list objects that match known1/known2/unknown/known3 .

You would need to rearrange the prefix to bring all known parts to the front, or maintain an index elsewhere (in DynamoDB or an RDBMS, for example).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM