amazon web services - Signing S3 urls fails (The request signature we calculated does not match the signature you provided. Check your key and signing method) -


i'm trying generate signed urls upload , download objects in s3 bucket, fails "signaturedoesnotmatch" per below.

<?xml version="1.0" encoding="utf-8"?> <error><code>signaturedoesnotmatch</code><message>the request signature calculated not match signature provided. check key , signing method.</message><awsaccesskeyid>akiaj66rwejpywx6pl2a</awsaccesskeyid><stringtosign>get 

i understand symptom problem described here

amazon mws - request signature calculated not match signature provided

that is, credentials somehow wrong. double checked .aws/credentials file , generated new ones. moreover, can other aws operations these credentials, such querying dynamodb or listing buckets.

the code use generate urls, copied here:

http://docs.aws.amazon.com/amazons3/latest/dev/shareobjectpresignedurljavasdk.html

final zoneddatetime expiration = zoneddatetime.now().plusseconds(expirationseconds);  final generatepresignedurlrequest generatepresignedurlrequest = new generatepresignedurlrequest(     bucketname, objectid.tostring()); generatepresignedurlrequest.setmethod(isupload ? httpmethod.put : httpmethod.get); generatepresignedurlrequest.setexpiration(date.from(expiration.toinstant()));  return amazons3client.generatepresignedurl(generatepresignedurlrequest).touri(); 

and, yes, bucket exists. how can bottom this?

i found problem, using chrome plugin "advanced rest client" send request , guess cors rule make request fail apps' javascript. doing request address filed of browser works.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -