download free 30 days trial version buy bucket explorer
Documentation  Download  Purchase  Support  FAQs   Forum   ScreenShots & Demos

Amazon S3 - Folder and Full Path View Object Listing (using GET Bucket)


Object Listing using GET Bucket

If you want to list your Amazon S3 Objects (Files), you can send an HTTP GET Request to Amazon S3 Server. You can list all files in an Amazon S3 Bucket , in two formats:  "Full Path View Object Listing" or as "Folder View Object Listing" . To authenticate the request, you must have READ access to the Bucket.

You can send HTTP GET Request to Amazon's server for Object Listing, in two ways:

  1. List Amazon S3 Objects using Amazon S3 REST API- GET Bucket- If you can write a software program, you can use Amazon S3 REST API GET Bucket in your code to list S3 Objects. This website only refers to REST APIs. You can read more on AWS Documentation site for SOAP APIs.
  2. List Amazon S3 Objects using Bucket Explorer UI- If you are not a programmer, you can list S3 Objects simply with mouse clicks using Bucket Explorer, similar to how you list your files on your local Windows machine using Windows Explorer.

Object Listing using Amazon REST API

To list the objects in Folder view or Full Path, you can request GET BUCKET. For that you need to have Bucket Name, Prefix, and Delimiter as request parameters.

Syntax 1:



GET / HTTP/1.1
Host: BucketName .s3.amazonaws.com
Date: date
Authorization: signatureValue
Content-Type: text/plain
 

When you do not provide any prefix, it will list all objects with its actual Object Key Name. A single GET BUCKET request returns a max of 1000 objects in a single time. In response, you get a marker key which will help you get the next 1000 objects in the second request by mentioning this marker key.

Syntax 2:



GET /?prefix=<prefixstring>&delimiter=<delimiterstring> HTTP/1.1
Host: <BucketName>.s3.amazonaws.com
Date: Wed, 01 Mar 2009 12:00:00 GMT
Authorization: AWS AKIAIOSFODNN7EXAMPLE:xQE0diMbLRepdf3YB+FIEXAMPLE=
 

The second syntax shows you two optional parameters of Prefix and Delimiter.

Full Path View

If you provide prefix and ignore delimiter (optional), then it will list only the objects which starts from given prefix string in full path view mode. (or you can also pass null value in delimiter).

Folder View

If you provide Prefix and Delimiter ("/"), it will list only the objects which starts with the given prefix and Object key is delimited by the given delimiter "/". In response, you will get two segments, one of Object List and another of Common Prefix for the given prefix.

Object Listing using Bucket Explorer

While the "GET Bucket" API of AWS allows you to list all files in two formats by writing code, Bucket Explorer lets you do that easily without writing any code at all. Bucket Explorer allows you view the object list for the selected Bucket in two formats.

  1. Folder View

       By default, object listing is in Folder View and it lists the Objects similar to local file system.

  2. Show Full Path

       This will list all the Objects at root level instead of supernumerary hierarchy. Since we do not have folder structure at Amazon, "Show Full Path" will list the Object with their full path without sustaining the folder structure.

To list the Objects in Full Path, follow the steps below:

  1. Run Bucket Explorer.
  2. Select any Bucket from Bucket listing.
  3. It will list the Object in Object table.
  4. By default, the Object listing is in "Folder View" . To change it to "Show Full Path" format, click on "Show Full Path" button at the top right corner of object table window.
  5. It will now display the Objects in Full Path format.

What is Full Path View?

It will list as Full Path View Object Listing when you pass Bucket Name, Prefix (Empty), and "null" for Delimiter.

Full Path View is listing all files with its full name. If the file that you have uploaded has a file name myData/Folder1/Folder1.1/hello.txt (This is the actual file name at S3 and not the path.), Bucket Explorer will list it as it is and no virtual folder structure will show.

What is Folder View?

It will list as "Folder View Object Listing" when you pass Bucket Name, Prefix Empty, and "/" for Delimiter.

Folder View is listing all files with its last file name. If the file that you have uploaded has a file name myData/Folder1/Folder1.1/Folder1.1.1/hello.txt (This is the actual file name at S3 and not the path.), Bucket Explorer will then list myData first at root listing.

Cases:

When you

  • Request GET Bucket with Prefix myData and Delimiter, it will list Folder1.
  • Then request GET Bucket with Prefix "myData/Folder1" and Delimiter "/", it will list Folder1.1
  • Then request GET Bucket with Prefix "myData/Folder1/Folder1.1" and Delimiter "/", it will list Folder1.1.1
  • And when finally you request GET Bucket with Prefix "myData/Folder1/Folder1.1/Folder1.1.1" and Delimiter "/", it will list hello.txt

This goes the same way when you're searching.
  1. It will list objects starting from Prefix string in Folder View Object Listing MODE when you pass Bucket Name, Prefix (any String), and Delimiter "/".
  2. It will list objects starting from Prefix string and file path delimited by Delimiter string in Full Path View Object Listing MODE when you pass Bucket Name, Prefix (any String) and Delimiter (any String).
By default, Bucket Explorer only allows you to get up to 1000 objects in a single request. While the objects in a Bucket are limited, you can manage them with ease but as the size grows it becomes a cumbersome task. In the case of more than 1000 objects, Bucket Explorer allows you to implement paging while your
listing of objects is shown. This speeds up the listing process. There is a button "Next with a question mark (?)" . Clicking on the question mark takes you to an explanation how you can see a long list of objects in a shorter time by listing its page per page rather than by a continuous listing. You can set a number of objects per page to be seen at a time. The next button will help you see the next chunk of S3 objects according to page size.

You can change the Page Size setting by:

  1. In Bucket Explorer, go to Tools menu and click on "Preferences" option.
  2. It will open a Preferences window.
  3. Specify the page size in the given "page size" box.
  4. Click on the "OK" button to save the page size settings.
  5. Now, refresh object listing and you will see the number of objects that you've set in Preference panel. To do that, click on "Refresh" icon on the Object toolbar or right click on the object panel and select "Refresh File Listing" option.
  6. You will see a next button on the top bar of object panel if the number of object in the Bucket is greater than the page size.
  7. Clicking on Next button will display the next number of objects as per page size.