Release: AWS SDK for Node.js v1.4.0

This release adds experimental support for request and response pagination, the ability to abort requests, and adds new operations to the AWS.Redshift and AWS.STS services.


Created On: July 18, 2013
Last Updated: October 09, 2017


Latest Version

npm install aws-sdk

New Features

Change Description
Pagination Support

Added experimental support for request and response pagination. This change adds the AWS.Request.eachPage() and AWS.Response.nextPage() functions. Pagination can be used like so:

s3.listObjects(params).eachPage(function (err, data) {
  console.log(data); // logs each individual page of data
});

Or with nextPage():

s3.listObjects(params, function (err, page1) {
  // got first page
  this.nextPage(function (err, page2) {
    // this will contain the second page of data
  });
});

Documentation for this new experimental pagination support can be found on the AWS.Request and AWS.Response classes. Note that these features are marked as experimental, and therefore may be changed in future minor or patchlevel releases.

AWS.Request.abort()

Added AWS.Request.abort() method to abort requests after one had been sent. Sample usage:

var s3 = new AWS.S3();
var params = {
  Bucket: 'bucket', Key: 'key',
  Body: new Buffer(1024 * 1024 * 5) // 5MB payload
};
var request = s3.putObject(params);
request.send(function (err, data) {
  if (err) console.log("Error:", err.code, err.message);
  else console.log(data);
});

// abort request in 1 second
setTimeout(request.abort.bind(request), 1000);

// prints "Error: RequestAbortedError Request aborted by user"
AWS.Redshift

Added two new operations to Amazon Redshift (AWS.Redshift):

AWS.STS

Added support for the decodeAuthorizationMessage() operation on AWS Security Token Service.

Resolved Issues

Change Description
HTTP Timeout

Fixed an issue with Node v0.8.x where the HTTP stream object would throw multiple TimeoutErrors when a timeout occurred. See GitHub issue #130.

Supported API Versions

This release of the SDK supports the following API versions:

Service API Version
Amazon CloudFront 2012-05-05
2013-05-12
Amazon CloudSearch 2011-02-01
Amazon CloudWatch 2010-08-01
Amazon DynamoDB 2011-12-05
2012-08-10
Amazon Elastic Compute Cloud 2013-02-01
Amazon Elastic MapReduce 2009-03-31
Amazon Elastic Transcoder 2012-09-25
Amazon ElastiCache 2012-11-15
Amazon Glacier 2012-06-01
Amazon Redshift 2012-12-01
Amazon Relational Database Service 2013-01-10
2013-02-12
2013-05-15
Amazon Route 53 2012-12-12
Amazon Simple Email Service 2010-12-01
Amazon Simple Notification Service 2010-03-31
Amazon Simple Queue Service 2012-11-05
Amazon Simple Storage Service 2006-03-01
Amazon Simple Workflow Service 2012-01-25
Amazon SimpleDB 2009-04-15
Auto Scaling 2011-01-01
AWS CloudFormation 2010-05-15
AWS Data Pipeline 2012-10-29
AWS Direct Connect 2012-10-25
AWS Elastic Beanstalk 2010-12-01
AWS Identity and Access Management 2010-05-08
AWS Import/Export 2010-06-01
AWS OpsWorks 2013-02-18
AWS Security Token Service 2011-06-15
AWS Storage Gateway 2012-06-30
AWS Support 2013-04-15
Elastic Load Balancing 2012-06-01