I\'m using curl to call into a Java ReST API to retrieve a URL. Java then generates a pre-signed URL for S3 upload using my S3 credentials, and returns that in the ReST reply. C
Despite the fact that GeneratePresignedUrlRequest
accepts an http method argument (and has a setMethod
function), it appears to be unusable for anything but GET.
http://wiki.nercomp.org/wiki/images/0/05/AmazonWebServices.pdf states "The practice of signing a request and giving it to a third-party for execution is suitable only for simple object GET requests." Perhaps setting another method can be used for something, but apparently not this.
So, instead, I had to follow the instructions here:
http://aws.amazon.com/articles/1434?_encoding=UTF8&jiveRedirect=1
This is more complex, because the client is required to post a complete form, rather than just using a URL, and also means all that post info has to be communicated to the client separately, but it does seem to work.