diff --git a/API.md b/API.md index 510bcff..b91818b 100644 --- a/API.md +++ b/API.md @@ -252,6 +252,7 @@ for details. - `options.accessKeyId` **[string]** credentials for the client to utilize - `options.secretAccessKey` **[string]** credentials for the client to utilize - `options.sessionToken` **[string]** credentials for the client to utilize + - `options.credentials` **[AWS.Credentials]** [AWS.Credentials](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Credentials.html) object for the client to utilize - `options.logger` **[object]** a writable stream for detailed logging from the aws-sdk. See [constructor docs for details](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#constructor-property). - `options.maxRetries` **[number]** number of times to retry on retryable errors. See [constructor docs for details](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#constructor-property). diff --git a/index.js b/index.js index 5af85ac..7cb0786 100644 --- a/index.js +++ b/index.js @@ -22,6 +22,7 @@ module.exports = Dyno; * @param {string} [options.accessKeyId] - credentials for the client to utilize * @param {string} [options.secretAccessKey] - credentials for the client to utilize * @param {string} [options.sessionToken] - credentials for the client to utilize + * @param {AWS.Credentials} [options.credentials] - an AWS.Credentials object for the client to utilize * @param {object} [options.logger] - a writable stream for detailed logging from the aws-sdk. See [constructor docs for details](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#constructor-property). * @param {number} [options.maxRetries] - number of times to retry on retryable errors. See [constructor docs for details](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#constructor-property). * @returns {client} a dyno client @@ -70,6 +71,7 @@ function Dyno(options) { accessKeyId: options.accessKeyId, secretAccessKey: options.secretAccessKey, sessionToken: options.sessionToken, + credentials: options.credentials, logger: options.logger, maxRetries: options.maxRetries }; diff --git a/package.json b/package.json index f6f7586..6439762 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mapbox/dyno", - "version": "1.4.1", + "version": "1.5.0", "description": "Simple DynamoDB client", "main": "index.js", "scripts": {