Hi everyone - I’m wondering if someone knows the trick to listing object 
versions in AWS S3?

I was previously using a non-Zn library (there are a few around - but they are 
quite old and I’m not sure how much they are maintained) - however I hadn’t 
realised that Zn actually supports S3 until I read it a bit carefully and 
realised that I needed to load an extra AWS group.

So - I have a bucket that is versioned, and I wanted to read the versions of an 
object - and hopefully be able to read the contents of an older version.

I can list the contents of a bucket, but when I try to read the versions of an 
object - I get a forbidden error - which when I dig deeper gives a stranger 
explanation?

I have confirmed that the AWS CLI is able to list versions in that bucket - so 
I’m a bit confused what the issue might be?

(client := ZnAWSS3Client new)
        accessKeyId: 'xxx';
        secretAccessKey: ‘yyyyy';
        checkIntegrity: true.

client buckets. “Works"
client keysIn: 'mtt-data’. “Works"

client at: 'mtt-data' -> 'sample.txt’. “Works"

client keysIn: 'mtt-data' query: (Dictionary with: 'versions'->nil). “Gives an 
error?”


HTTP/1.1 403 Forbidden

<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we 
calculated does not match the signature you provided. Check your key and 
signing method.</Message><AWSAccessKeyId>xxx</AWSAccessKeyId><StringToSign>GET


Has anyone tried doing this - I’m sure there is something really simple that I 
am missing?

Tim

Reply via email to