Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to change headers on an S3 object without downloading the entire object?

Tags:

amazon-s3

I've uploaded a bunch of images to Amazon S3, and now want to add a Cache-Control header to them.

Can the header be updated without downloading the entire image? If so, how?

like image 267
Scott Avatar asked Nov 06 '08 18:11

Scott


People also ask

Can S3 files be edited?

s3 doesn't support editing files... it stores objects that must be rewritten any time you want to update them.

Does S3 Putobject overwrite?

If an object already exists in a bucket, the new object will overwrite it because Amazon S3 stores the last write request.

Does S3 support range header?

Using the Range HTTP header in a GET Object request, you can fetch a byte-range from an object, transferring only the specified portion. You can use concurrent connections to Amazon S3 to fetch different byte ranges from within the same object.

How do I change the object on my ACL S3?

To set ACL permissions for an object Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/ . In the Buckets list, choose the name of the bucket that contains the object. In the objects list, choose the name of the object for which you want to set permissions.


1 Answers

It's beta functionality, but you can specify new meta data when you copy an object. Specify the same source and destination for the copy, and this has the effect of just updating the meta data on your object.

PUT /myObject HTTP/1.1 Host: mybucket.s3.amazonaws.com   x-amz-copy-source: /mybucket/myObject   x-amz-metadata-directive: REPLACE   x-amz-meta-myKey: newValue 
like image 195
stevemegson Avatar answered Oct 11 '22 13:10

stevemegson