- 18 Dec 2023
- 1 Minute to read
- Print
- PDF
How does the NextMarker is handled with Wasabi?
- Updated on 18 Dec 2023
- 1 Minute to read
- Print
- PDF
In this document, the behavior of NextMarker is shown using a python script which is attached at the bottom. In order to replicate this behavior
Make sure you have installed AWS SDK boto3 for python on your CLI before running the script
Note that this code example discusses the use of Wasabi's us-east-1 storage region. To use other Wasabi storage regions, please use the appropriate Wasabi service URL as described here.
Below is the flow of this script:
Using the boto3 client, create a bucket with a folder named(src). Under the folder src, create three more folders named (a,b,c) and under each folder, upload three files named(1,3,5). Below is the behavior of Wasabi when we list objects by setting the marker(start point) to different objects.
When we set the marker to point(src/b/2/) and try to list objects inside the bucket using boto3. The NextMarker is set to ‘src/b/’ in response
When we set a marker to point(src/b/) and try to list objects inside the bucket using boto3. The NextMarker is set to ‘src/c/’ in the response
When we set a marker to point (src/b/5/) and try to list objects inside the bucket using boto3. The NextMarker is set as ‘src/c/’ in response
Conclusion :
In Wasabi
If there are any objects under the pointed marker(e.g src/b/3), Then NextMarker is still set as the same marker path(src/b/) in the response
If there are no objects under the pointed marker(src/b/5). Then NextMarker is set as the next folder(src/c/) in the response
In Amazon:
If there are any objects or not under the pointed marker(src/b/3/), The NextMarker is set as the next folder (src/c/) in the response.