Does AWS S3 lifecycle rule delete folders

amazon s3amazon-web-services

I have an S3 bucket with several folders and each folder contains several files. Because the number of files keep growing, I'm thinking to create a S3 lifecycle rule to delete files older than 14 days.

My concern is that this rule might also delete a folder if it's empty. Is this the case or will this rule only delete files/objects?

Thanks.

Best Answer

http://docs.aws.amazon.com/AmazonS3/latest/UG/FolderOperations.html

Amazon S3 has a flat structure with no hierarchy like you would see in a typical file system. However, for the sake of organizational simplicity, the Amazon S3 console supports the folder concept as a means of grouping objects. Amazon S3 does this by using key name prefixes for objects.

In other words, folders don't actually exist on S3.