tags:

views:

1000

answers:

2

how can i create a folder under a bucket using boto library for amazon s3, i followed the manual, and create keys with contents with permission, metadata etc, but no where in the boto's documentation say how to create folders under bucket, or create folder under folders in bucket.

+1  A: 

Hey,

Amazon S3 indeed doesn't have a concept of the folders. As you correctly mentioned you need to create keys with slash symbol to mimic that. You can use CloudBerry Explorer freeware to create folders separated by '/' rather than with $folder$ suffix.

cloudberryman
+3  A: 

Yes, thers no folder concept in S3, you can create file names like "abc/xys/uvw/123.jpg" which many S3 access tools like S3Fox show like a directory structure. But actually the its a single file in a bucket.

Amey Kanade

thanks for the answer, so i guess if i want to see the contents of a particular folder, i will need to traverse lots other unnecessary files?
vito huang
The S3 API lets you query a bucket for keys with a given prefix. So you should be able to construct a request that only returns objects in your logical folder. See: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/dev/index.html?ListingKeysHierarchy.html
James Cooper