Reputation: 1367
I have an S3 bucket. In it are folders Foo
and foo
(among others). I deleted Foo
.
When I refresh the page in the S3 browser console, about 50% of the time I still see Foo
listed. I refresh again, and it's gone. Refresh a third time, and it's back. This is also the case with the AWS CLI.
The only idea I can come up with is something related to upper/lowercase clashes, but I was under the impression that S3 is case-sensitive. Any idea what might be going on?
Upvotes: 2
Views: 4286
Reputation: 269302
The important thing to appreciate is that folders do not actually exist in Amazon S3. Amazon S3 is an object store, not a filesystem, and all objects are stored in a flat namespace with no directories.
That said, S3 emulates directories via:
key
of the object) include the full path, so bar.txt
stored in the foo
directory actually has a Key of foo/bar.txt
aws s3 cp bar.txt s3://bucket/docs/bar.txt
So, firstly don't worry too much about empty folders appearing/disappearing. It doesn't really mean anything. It might be caused by S3 eventual consistency or due to versioning. If it is really upsetting for you, you could contact AWS Support (if you are subscribed). Otherwise, just keep trying to delete it and hopefully it will give you a consistent result.
Upvotes: 3