If I have existing files on Amazon's S3, what's the easiest way to get their md5sum without having to download the files?
Thanks
If I have existing files on Amazon's S3, what's the easiest way to get their md5sum without having to download the files?
Thanks
Hmm... I think you can look at the ETag header. (in which case you can use the HTTP HEAD method rather than GET.) They don't quite say it explicitly, but it's almost certain Amazon uses MD5 hash for the ETag. From the PUT Object documentation (dunno why they don't just come right out and say it):
To ensure data is not corrupted over the network, use the Content-MD5 header. When you use the Content-MD5 header, Amazon S3 checks the object against the provided MD5 value. If they do not match, Amazon S3 returns an error. Additionally, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned Etag to the calculated MD5 value.
Also, the SOAP methods let you request just the metadata and not the data itself.
Thank You Jason for the reply, Easiest way to retrieve the MD5 hash for the ETag is to use the sample applet within jets3 (jets3t-0.7.4\applets\jets3t-cockpit.html). http://developer.amazonwebservices.com/connect/entry.jspa?externalID=617