conn = boto.s3.connect_to_region('us-west-2')
bucket = conn.get_bucket(your_bucket)
folders = bucket.list('', '/')
for folder in folders:
    pass
How can i get list of only folders in amazon S3 using python boto