Skip to content

aws.load()

SaltwaterC edited this page Jan 18, 2013 · 5 revisions

About

This is the API client loader. Instead of having a bunch of client instances loaded by default, aws2js loads on demand the clients with the default configuration.

Reference

aws.load(client, [accessKeyId], [secretAccessKey], [sessionToken], [httpOptions])
  • 'client' - the supported API client (eg: ec2, rds, s3, etc.). This must be a proper value. Otherwise, the client throws an Error.
  • 'accessKeyId' - optional. If available together with secretAccessKey, then client.setCredentials() is automatically called.
  • 'secretAccessKey' - optional.
  • 'sessionToken' - optional. In use by STS Client provided credentials.
  • 'httpOptions' - optional. An object for passing options directly to the underlying HTTP client. Such as: {agent: false} for turning off the connection pooling. In order to use this option, you need to pass proper credentials (accessKeyId, secretAccessKey) to aws.load(). For non STS enabled service, set sessionToken to something that coerces to boolean false, like null.

The client loader creates a new object on every invocation.

Clone this wiki locally