AWS SDK ListObjects returning 'folders' of 0k? Did you FTP to S3....

Posted by Matt Bryson on 28-Feb-2014 19:17:47
Find me on:

Recently discovered that using an FTP client, such as cyberduck, creates empty keys in S3.

When uploading, it must create the notion of a 'folder' by creating an empty key for the folder path.

 

So uploading an object with the key

my/file/path/my_file.png

with the S3 SDK, would create one object, with the key of the same name.

 

 

However, cyberduck appears to create the following keys

my/
my/file/
my/file/path/
my/file/path/my_file.png

All the 'folder' objects are 0k, so you might need to filter them our when trying to list files in an S3 bucket.

m.

Topics: S3

About the author

Matt Bryson is an experienced systems engineer with over 15 years Development and Systems Operations experience.

Free eBook Download

The 5 big eDetailing issues you should be aware of. Click below to download the eBook.

Download now

Subscribe to Email Updates