aws-core-utils
Advanced tools
Comparing version 7.0.8 to 7.0.9
@@ -53,2 +53,3 @@ 'use strict'; | ||
* @param {Object|undefined} [context] - the context, which is just used for logging | ||
* @param {AWS|undefined} [context.AWS] - an optional, alternative AWS constructor to use (if unspecified, uses the standard AWS-SDK AWS constructor) - e.g. enables use of an AWS XRay-captured AWS constructor | ||
* @returns {AWS.DynamoDB.DocumentClient} a cached or new AWS DynamoDB.DocumentClient instance created and cached for | ||
@@ -99,3 +100,4 @@ * the specified or current region | ||
// constructor, e.g. by adding "attrValue" with value "S8" | ||
dynamoDBDocClient = new AWS.DynamoDB.DocumentClient(options ? copy(options) : options); | ||
const Aws = context.AWS ? context.AWS : AWS; | ||
dynamoDBDocClient = new Aws.DynamoDB.DocumentClient(options ? copy(options) : options); | ||
@@ -102,0 +104,0 @@ // Cache the new instance ... |
@@ -52,2 +52,3 @@ 'use strict'; | ||
* @param {Object|undefined} [context] - the context, which is just used for logging | ||
* @param {AWS|undefined} [context.AWS] - an optional, alternative AWS constructor to use (if unspecified, uses the standard AWS-SDK AWS constructor) - e.g. enables use of an AWS XRay-captured AWS constructor | ||
* @returns {AWS.Kinesis} a cached or new AWS Kinesis instance created and cached for the specified or current region | ||
@@ -95,3 +96,4 @@ */ | ||
// Create a new kinesis instance with the modified options | ||
kinesis = new AWS.Kinesis(options); | ||
const Aws = context.AWS ? context.AWS : AWS; | ||
kinesis = new Aws.Kinesis(options); | ||
// Cache the new instance and the options used to create it | ||
@@ -98,0 +100,0 @@ kinesisByRegionKey.set(regionKey, kinesis); |
@@ -52,2 +52,3 @@ 'use strict'; | ||
* @param {Object|undefined} [context] - the context, which is just used for logging | ||
* @param {AWS|undefined} [context.AWS] - an optional, alternative AWS constructor to use (if unspecified, uses the standard AWS-SDK AWS constructor) - e.g. enables use of an AWS XRay-captured AWS constructor | ||
* @returns {AWS.KMS} a cached or new AWS KMS instance created and cached for the specified or current region | ||
@@ -95,3 +96,4 @@ */ | ||
// Create a new kms instance with the modified options | ||
kms = new AWS.KMS(options); | ||
const Aws = context.AWS ? context.AWS : AWS; | ||
kms = new Aws.KMS(options); | ||
// Cache the new instance and the options used to create it | ||
@@ -98,0 +100,0 @@ kmsByRegionKey.set(regionKey, kms); |
@@ -15,3 +15,3 @@ 'use strict'; | ||
const deepEqual = require('deep-equal'); | ||
const strict = {strict:true}; | ||
const strict = {strict: true}; | ||
@@ -53,2 +53,3 @@ let AWS = require('aws-sdk'); | ||
* @param {Object|undefined} [context] - the context, which is just used for logging | ||
* @param {AWS|undefined} [context.AWS] - an optional, alternative AWS constructor to use (if unspecified, uses the standard AWS-SDK AWS constructor) - e.g. enables use of an AWS XRay-captured AWS constructor | ||
* @returns {AWS.Lambda} a cached or new AWS Lambda instance created and cached for the specified or current region | ||
@@ -96,3 +97,4 @@ */ | ||
// Create a new lambda instance with the modified options | ||
lambda = new AWS.Lambda(options); | ||
const Aws = context.AWS ? context.AWS : AWS; | ||
lambda = new Aws.Lambda(options); | ||
// Cache the new instance and the options used to create it | ||
@@ -99,0 +101,0 @@ lambdaByRegionKey.set(regionKey, lambda); |
{ | ||
"name": "aws-core-utils", | ||
"version": "7.0.8", | ||
"version": "7.0.9", | ||
"description": "Core utilities for working with Amazon Web Services (AWS), including ARNs, regions, stages, Lambdas, AWS errors, stream events, Kinesis, DynamoDB.DocumentClients, etc.", | ||
@@ -15,7 +15,7 @@ "author": "Byron du Preez", | ||
"core-functions": "3.0.18", | ||
"logging-utils": "4.0.18", | ||
"deep-equal": "1.0.1" | ||
"deep-equal": "1.0.1", | ||
"logging-utils": "4.0.18" | ||
}, | ||
"devDependencies": { | ||
"aws-sdk": "2.128.0", | ||
"aws-sdk": "2.143.0", | ||
"aws-core-test-utils": "3.0.5", | ||
@@ -22,0 +22,0 @@ "tape": "^4.8.0", |
@@ -1,2 +0,2 @@ | ||
# aws-core-utils v7.0.8 | ||
# aws-core-utils v7.0.9 | ||
@@ -3,0 +3,0 @@ Core utilities for working with Amazon Web Services (AWS), including ARNs, regions, stages, Lambdas, AWS errors, stream events, Kinesis, DynamoDB.DocumentClients, etc. |
## Changes | ||
### 7.0.9 | ||
- Changed `dynamodb-doc-client-cache`, `kinesis-cache`, `kms-cache` & `lambda-cache` modules to use an optional, | ||
alternative AWS constructor passed via a new optional `context.AWS` property to enable use of an AWS XRay-captured | ||
AWS constructor | ||
- Updated `aws-sdk` dependency to version 2.143.0 | ||
### 7.0.8 | ||
@@ -4,0 +10,0 @@ - Updated `core-functions` dependency to version 3.0.18 |
@@ -31,2 +31,3 @@ 'use strict'; | ||
* @property {CustomSettings|undefined} [custom] - an object configured with optional custom settings to use | ||
* @property {AWS|undefined} [AWS] - an optional, alternative AWS constructor to use (if unspecified, uses the standard AWS-SDK AWS constructor) - e.g. enables use of an AWS XRay-captured AWS constructor | ||
* @property {AWS.Kinesis|undefined} [kinesis] - an optional AWS.Kinesis instance to use | ||
@@ -33,0 +34,0 @@ * @property {AWS.DynamoDB.DocumentClient|undefined} [dynamoDBDocClient] - an optional AWS.DynamoDB.DocumentClient instance to use |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
585382
8576