aws/aws-sdk-js — pull request #115 by lsegal (2013-05-29 23:02:45+00:00)
Title: Add support for pre-signed URLs in Amazon S3

Adds support for pre-signed URLs in Amazon S3. Call the `getSignedUrl`
method with the operation name and parameters to get a pre-signed URL for that
operation:

```js
// A signed URL for a GET object
s3.getSignedUrl('getObject', {Bucket: 'myBucket', Key: 'myKey'}, function (err, url) {
console.log("The URL is", url);
});
```

If the callback is omitted, the function will be called synchronously. Note that
if you call this method synchronously you should ensure that you have already
loaded your credentials into `AWS.config.credentials`.

```js
// Synchonous call to getSignedUrl for PUT object operation
var url = s3.getSignedUrl('putObject', {Bucket: 'myBucket', Key: 'myKey'});
```