S3 Inventory Folder Size



There is an S3 Inventory I can access only using Redshift. I cannot access it from S3. All the records from this Inventory follow the same pattern: If the Key has this structure (which I understand it's a folder structure): Folder1/Folder2/, then the size is 0. There are 2 exceptions, though, when size is not 0: These 2 keys look like this: Enter image description here

There are also files in the folder123/: Enter image description here

There is no file/folder in the folder1/folder2/folder3/ folder. But its size is not 0.

My question is why all the folders have size 0, except the ones above?

Thank you,


asked 2 years ago936 views
2 Answers
Accepted Answer

As per the Object key naming guidelines "/" is not supported for either Filename or Folder/Prefix name. Only exception is objects with a prefix of "./" must uploaded or downloaded with the AWS Command Line Interface (AWS CLI), AWS SDKs, or REST API. You cannot use the Amazon S3 console. If you are already seeing this behavior in your bucket then I would encourage you to open a ticket with AWS support so this can be checked further.

answered 2 years ago
  • Thank you, Harsh_P.

    Have a great day, Luminita


It seems that your S3 bucket has versioning enabled or suspended. The reason you are seeing the object bytes from the S3 inventory report may be due to the versioned objects, which means that the object is deleted from bucket and a versioned object is present under prefix folder1/folder2/folder3. To check this from S3 console you can enable the show version toggle button on your S3 bucket after navigating to folder1/folder2/folder3 prefix as follows. If you would like to know the resource specific details then you can open a support ticket with AWS .

answered 2 years ago
  • Hi Harsh_P,

    Thank you so much for your answer.

    One of my colleagues who has access to S3 directly checked for me what is inside that folder. And they found out that there is a file named / inside folder1/folder2/folder3. So, if I have a file named /, then the key should be = folder1/folder2/folder3// and needs to have size <> 0 (the key should have 2 slashes at the end - the first one means that folder3 is a folder and the second one means there is a file named / inside folder3). And there should also be another key = folder1/folder2/folder3/ with size = 0, that represents the folder. But there is only one key = folder1/folder2/folder3/ with the same size as my colleague saw that the folder / has.

    This seems to be a bug. Please advise.

    Thank you, Luminita

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions