S3 Presigned URL (NodeJS SDK) By Example

    const params = {
        Bucket: bucketName,
        Key: objectKey,
        Expires: 600
    let signedUrl = null;
    try {
        const result = await S3.getSignedUrlPromise('putObject', params);
        signedUrl = result;
    } catch (e) {

You may directly PUT to returned presigned URL from any browser and any address. Change “putObject” to “getObject” to get a time-limited URL for downloading an object.

There are no way to limit S3 object downloads by number of requests. Presigned URL will be valid for as many time as requested until it expires.

NOTE: You cannot directly add .promise() as you would to getSignedUrl(). The async version of the method is named getSignedUrlPromise().

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s