Skip to content
SaltwaterC edited this page Aug 11, 2011 · 8 revisions

Usage mode

var rds = require('aws2js').load('rds');

// it is mandatory to set the AWS credentials
rds.setCredentials('accessKeyId', 'secretAccessKey'); 

// optional call to set the region
// the default entry point is in us-east-1
// if defined, it must be one of the follwing:
// us-east-1, us-west-1, eu-west-1, ap-southeast-1, ap-northeast-1
rds.setRegion('us-east-1');

// call something of the RDS query API
rds.call('action', query, function (error, response) {
	if (error) {
		console.error(error);
		console.error(response);
	} else {
		console.log(response);
	}
});

rds.call reference

  • The 'action' parameter is the action required by the RDS query API itself.
  • The query parameter is an object containing the query parameters of the API.
  • The callback arguments, error + response:
  • If there's an error, it is returned as the error argument of the callback. For more details follow: HTTP Errors, XML Parser.
  • If the error argument is null, then the response argument contains a JavaScript object containing the requested data.
Clone this wiki locally