s3 update metadata

261 views
Skip to first unread message

Randall

unread,
Jul 30, 2009, 11:03:01 PM7/30/09
to boto-users
I'm using boto to manage s3 and it appears that the only way to update
metadata for a key is to update the file contents. Calls such as
key.set_metadata only update the local metdata dictionary and I don't
see any call to sync it to s3. It seems there should be a way to
update metadata without (re)uploading the file contents. Am I just
not seeing it?

-Randall

Mitchell Garnaat

unread,
Jul 30, 2009, 11:42:38 PM7/30/09
to boto-...@googlegroups.com
Unfortunately not.  This is a limitation of S3 itself, not boto.  You cannot update metadata for an existing object.  The only way is to use the COPY request to perform a copy operation within S3 and update the metadata in the process.  See:

http://docs.amazonwebservices.com/AmazonS3/latest/UsingCopyingObjects.html

For details.

Mitch
Reply all
Reply to author
Forward
0 new messages