AWS S3 MetaData

32 views
Skip to first unread message

Mehdi Yazid

unread,
Mar 10, 2017, 11:43:48 AM3/10/17
to ruby-fog
Hello, 

I need to add a metadata to a folder into the S3 bucket. I know how to add metadata in object, but it's possible to add metadata to a folder ?


Frederick Cheung

unread,
Mar 10, 2017, 12:20:52 PM3/10/17
to ruby...@googlegroups.com, Mehdi Yazid
On 10 March 2017 at 16:43:48, Mehdi Yazid (meh....@gmail.com) wrote:
Hello, 

I need to add a metadata to a folder into the S3 bucket. I know how to add metadata in object, but it's possible to add metadata to a folder ?

S3 doesn't actually have folders. it is just a object store, but with the convention that / in the keys are presented as directories (and if you're using the apis direction you don't even have to use / as your delimiter)

When you do create folder in the console you're just creating an empty object. If you create an object with the key  a-folder/ (the / at the end is critical) then that shows up in the ui as a folder named "a-folder"

You can set metadata on that object as with any other object in S3

Fred

Reply all
Reply to author
Forward
0 new messages