- Updated dependencies
- Updated dependencies
- Changes to
api-lambdas
andother-lambdas
modules:- Changed
succeedLambdaCallback
andfailLambdaCallback
functions to return promises of the callback results - Added more error handling to
succeedLambdaCallback
andfailLambdaCallback
functions in an attempt to catch and resolve issues encountered where callback is not being invoked
- Changed
- Changes to
api-lambdas
module:- Added support for an optional
postConfigure
function, which can be configured ontocontext.handler
, that can be used by an AWS Lambdahandler
to add any additional configuration needed to the context AFTER the primary configuration of the context has completed and BEFORE the main function is executed - Added more checks to better handle missing
context
failure cases - Added
stringify
function to better survive responses with circular dependencies
- Added support for an optional
- Changes to
other-lambdas
module:- Added support for an optional
postConfigure
function, which can be configured ontocontext.handler
, that can be used by an AWS Lambdahandler
to add any additional configuration needed to the context AFTER the primary configuration of the context has completed and BEFORE the main function is executed - Added more checks to better handle missing
context
failure cases - Added
stringify
function to better survive responses with circular dependencies - Fixed intermittent unit test issues
- Added support for an optional
- Changes to
stages
module:- Enabled configuration of logging options via a new
logging
property or the legacyloggingOptions
property - Enabled configuration of logging settings via a new
logging
property or the legacyloggingSettings
property
- Enabled configuration of logging options via a new
- Changes to
contexts
module:- Enabled configuration of staging options via a new
staging
property or the legacystagingOptions
property - Enabled configuration of staging settings via a new
staging
property or the legacystagingSettings
property - Enabled configuration of custom options via a new
custom
property or the legacycustomOptions
property - Enabled configuration of custom settings via a new
custom
property or the legacycustomSettings
property - Fixed unit test defect
- Enabled configuration of staging options via a new
- Updated
aws-sdk
dev dependency to match latest used in AWS Lambda
- Updated
aws-core-test-utils
dependency
- Breaking changes to
api-lambdas
module:- Removed deprecated
succeedCallback
function - replaced bysucceedLambdaCallback
function - Removed deprecated
failCallback
function - replaced byfailLambdaCallback
function - Removed deprecated
failCallbackForApiGateway
function - replaced byfailLambdaCallback
function - Removed
useLambdaProxy
,defaultHeaders
&allowedHttpStatusCodes
properties andtoErrorResponse
function from theopts
argument of thegenerateHandlerFunction
function in favour of rather configuring these properties via thegenerateHandlerFunction
function's existingcreateSettings
&createOptions
arguments - Removed
opts
from theconfigureHandlerContext
function in favour of rather configuring its properties via the function's existingcreateSettings
&createOptions
arguments - Dropped support for the legacy 6th
allowedHttpStatusCodes
argument of thegenerateHandlerFunction
function - i.e. any code still using legacy 5th to 9th parameters:logRequestResponseAtLogLevel
,allowedHttpStatusCodes
,invalidRequestMsg
,failureMsg
&successMsg
(instead ofopts
) will now ignore anyallowedHttpStatusCodes
argument
- Removed deprecated
- Breaking changes to
other-lambdas
module:- Removed
toErrorResponse
function from theopts
argument of thegenerateHandlerFunction
function in favour of rather configuring thegenerateHandlerFunction
function with thetoErrorResponse
function (and others) via its existingcreateSettings
argument - Removed
opts
from theconfigureHandlerContext
function in favour of rather configuring itstoErrorResponse
function via theconfigureHandlerContext
function's existingcreateSettings
argument
- Removed
- Breaking changes to
lambdas
module:- Removed out-of-date
failCallback
function - replaced byfailLambdaCallback
& other functions of theother-lambdas
module
- Removed out-of-date
- Added
.npmignore
- Renamed
release_notes.md
toCHANGES.md
- Updated dependencies
- Changes to
api-lambdas
module:- Added support for configuring a custom
preSuccessCallback
function to be run before succeeding the Lambda callback - Added support for configuring a custom
preFailureCallback
function to be run before failing the Lambda callback - Minor breaking changes to API of "new"
failLambdaCallback
andsucceedLambdaCallback
functions added in 7.1.0
- Added support for configuring a custom
- Changes to
other-lambdas
module:- Added support for configuring a custom
preSuccessCallback
function to be run before succeeding the Lambda callback - Added support for configuring a custom
preFailureCallback
function to be run before failing the Lambda callback - Minor breaking changes to API of "new"
failLambdaCallback
andsucceedLambdaCallback
functions added in 7.1.0
- Added support for configuring a custom
- Committed updated
package-lock.json
- Changes to
api-lambdas
module:- Added error response configuration options & settings to the context
- Added new
succeedLambdaCallback
andfailLambdaCallback
functions with cleaner parameters needed by customtoErrorResponse
functions - Deprecated & removed internal usage of old
succeedCallback
andfailCallback
functions - Changed
generateHandlerFunction
to use newsucceedLambdaCallback
andfailLambdaCallback
functions instead
- Added a new
other-lambdas
module, which is a simplified version ofapi-lambdas
, for generating handler functions for "other" AWS Lambdas that are NOT exposed via API Gateway
- Added an optional
toErrorResponse
function to theopts
arguments offailLambdaCallback
andgenerateHandlerFunction
functions of theapi-lambdas
module to enable callers to customise the error response object or Lambda Proxy error response body returned - Updated
core-functions
dependency to version 3.0.22 - Updated
logging-utils
dependency to version 4.0.22 - Updated
aws-sdk
dev dependency to version 2.190.0
- Updated
core-functions
dependency to version 3.0.20 - Updated
logging-utils
dependency to version 4.0.20 - Updated
aws-sdk
dev dependency to version 2.161.0 - Updated
aws-core-test-utils
dev dependency to version 3.0.7
- Renamed dummy first exports (
exports._ = '_'; //IDE workaround
) of most modules to (exports._$_ = '_$_';
) to avoid potential future collisions withlodash
&underscore
- Updated
core-functions
dependency to version 3.0.19 - Updated
logging-utils
dependency to version 4.0.19 - Updated
aws-core-test-utils
dev dependency to version 3.0.6
- Changed
dynamodb-doc-client-cache
,kinesis-cache
,kms-cache
&lambda-cache
modules to use an optional, alternative AWS constructor passed via a new optionalcontext.AWS
property to enable use of an AWS XRay-captured AWS constructor - Updated
aws-sdk
dependency to version 2.143.0
- Updated
core-functions
dependency to version 3.0.18 - Updated
logging-utils
dependency to version 4.0.18
- Changes to
api-lambdas
module to support API Gateway Lambda Proxy integration:- Replaced legacy 5th to 9th parameters of
generateHandlerFunction
function with a preferred single optionalopts
5th parameter, which includes the 5 legacy parameters (logRequestResponseAtLogLevel
,allowedHttpStatusCodes
,invalidRequestMsg
,failureMsg
&successMsg
) and also includes 2 new parameters (useLambdaProxy
&defaultHeaders
)- Note that the
generateHandlerFunction
function still supports invoking it with its legacy 5th to 9th parameters
- Note that the
- Replaced legacy 6th parameter of
failCallback
function with a preferred optionalopts
6th parameter, which includes the legacy parameter (allowedHttpStatusCodes
) and also includes 2 new parameters (useLambdaProxy
&defaultHeaders
)- Note that the
failCallback
function still supports invoking it with its legacy 6th parameter
- Note that the
- Changed
failCallback
function to also support Lambda Proxy integration - Added a new
succeedCallback
function to support both default integration & Lambda Proxy integration - Changed inner
handler
function to use newsucceedCallback
function & to pass thegenerateHandlerFunction
function's newopts
parameter on allfailCallback
&succeedCallback
calls - Setting the new
useLambdaProxy
parameter totrue
:- Enables your Lambda to be called from API Gateway using its Lambda Proxy integration mode
- Changes the
failCallback
& newsucceedCallback
functions to invoke your Lambda's callback function with ONLY a null "error" parameter and a non-null "data" parameter, which is compatible with Lambda Proxy integration
- Replaced legacy 5th to 9th parameters of
- Fixed unbound logger issues in logging in
dynamodb-doc-client-cache
,kinesis-cache
,kms-cache
,lambda-cache
®ions
modules - Updated
core-functions
dependency to version 3.0.17 - Updated
logging-utils
dependency to version 4.0.17 - Updated
aws-core-test-utils
dev dependency to version 3.0.5 - Updated
aws-sdk
dev dependency to version 2.128.0
- Changes to
regions
module:- Changed behaviour of
getRegionKey
function to EITHER get the existing region key (if any) OR return undefined and NOT set a new region key (if none) - Added new
getOrSetRegionKey
function that gets the existing region key (if any) or sets a new region key (if none) - Added new
listRegionKeys
function to list the currently cached region keys
- Changed behaviour of
- Changes to
dynamodb-doc-client-cache
,kinesis-cache
,kms-cache
&lambda-cache
:- Synchronised code to handle changes in
regions.getRegionKey
behaviour and to use newregions.getOrSetRegionKey
- Added new
clearCache
function to clear the instance & options caches according to the currently cached region keys
- Synchronised code to handle changes in
- Changes to
lambdas
module:- Added new
getInvokedFunctionNameWithAliasOrVersion
function - Changed the
getFunctionNameVersionAndAlias
function to also return aninvoked
property containing the same concatenation of invoked function name & alias or version generated bygetInvokedFunctionNameWithAliasOrVersion
- Added new
- Changes to
type-defs
module:- Added new
invoked
property toLambdaFunctionNameVersionAndAlias
type definition
- Added new
- Changes to
lambda-utils
module:- Replaced uses of deprecated
Promises.wrapMethod
withPromises.wrap
- Replaced uses of deprecated
- Replaced all logging of
error.stack
with logging of just the error - Updated
core-functions
dependency to version 3.0.15 - Updated
logging-utils
dependency to version 4.0.14
- Changed almost all modules' exports to modifications of the default
exports
object instead of replacing the defaultmodule.exports
object - Added dummy first exports (
exports._ = '_'; //IDE workaround
) to most modules as a temporary workaround for IDE issue - Updated
core-functions
dependency to version 3.0.14 - Updated
logging-utils
dependency to version 4.0.13
- Updated
core-functions
dependency to version 3.0.11 - Updated
logging-utils
dependency to version 4.0.11
- Synchronized
test/samples.js
with versions from other modules:- Added
sampleKinesisMessageAndRecord
&sampleDynamoDBMessageAndRecord
functions - Added
sampleMsg
,sampleKinesisRecord2
&sampleDynamoDBRecord
functions - Removed
sampleKinesisMessage
&sampleDynamoDBMessage
functions, which are no longer usable after removal of setting ofconsumerState
properties on messages
- Added
- Replaced usage of deleted
sampleDynamoDBMessage
function withsampleDynamoDBMessageAndRecord
- Minor patches to type definitions in
type-defs
module & to JsDoc comments incontexts
module
- Changes to
type-defs
module:- Defined more properties of
AWSContext
type definition - Added
LambdaFunctionNameVersionAndAlias
type definition - Added optional
invokedLambda
property toEventAWSContextAndStageAware
type definition
- Defined more properties of
- Changes to
regions
module:- Removed
ONLY_FOR_TESTING.setRegionIfNotSet
function - Removed fail fast logic from
getRegion
,getRegionKey
&configureRegion
functions, since its only applicable for unit testing - Replaced
ONLY_FOR_TESTING.getRegionRaw
export with direct export ofgetRegionRaw
function - Replaced
ONLY_FOR_TESTING.getDefaultRegionRaw
export with direct export ofgetDefaultRegionRaw
function - Removed
deprecation
fromconfigureRegion
function
- Removed
- Changes to
stages
module:- Removed deprecated
configureStageAndAwsContext
function - Removed deprecated
configureRegionStageAndAwsContext
function
- Removed deprecated
- Changes to
lambdas
module:- Changed
getFunctionName
function to also useprocess.env.AWS_LAMBDA_FUNCTION_NAME
- Changed
getFunctionVersion
function to also useprocess.env.AWS_LAMBDA_FUNCTION_VERSION
- Changed
getFunctionNameVersionAndAlias
function to also useprocess.env.AWS_LAMBDA_FUNCTION_NAME
&AWS_LAMBDA_FUNCTION_VERSION
- Changed
- Changes to
contexts
module:- Changed
configureEventAwsContextAndStage
function to also setcontext.invokedLambda
whenawsContext
provided & to NOT fail if region is not defined
- Changed
- Upgraded
aws-sdk
dependency to 2.92.0
- Changes to
type-defs
module:- Added
event
property toStandardContext
type definition - Renamed
StageAndAWSContextAware
type definition toEventAWSContextAndStageAware
- Added
event
property toEventAWSContextAndStageAware
type definition - Added
AWS.Lambda
related type definitions - Added
AWS.KMS
related type definitions
- Added
- Changes to
stages
module:- Deprecated
configureStageAndAwsContext
function - Changed
configureStageAndAwsContext
&configureRegionStageAndAwsContext
functions to also setcontext.event
- Deprecated
- Changes to
contexts
module:- Added
configureEventAwsContextAndStage
function - Changed
configureStandardContext
function to useconfigureEventAwsContextAndStage
instead of deprecatedstages.configureStageAndAwsContext
function
- Added
- Changes to
regions
module:- Added
regionKeysByRegion
cache - Added
getRegionKey
function
- Added
- Changes to
dynamodb-doc-client-cache
module:- Removed
regionKeysByRegion
cache &getRegionKey
function & replaced usage withregions/getRegionKey
- Removed
- Changes to
kinesis-cache
module:- Removed
regionKeysByRegion
cache &getRegionKey
function & replaced usage withregions/getRegionKey
- Removed
- Added new
lambda-cache
module - Added new
lambda-utils
module - Added new
kms-cache
module - Added new
kms-utils
module
- Updated
core-functions
dependency to version 3.0.9 - Updated
logging-utils
dependency to version 4.0.9
- Changes to
dynamodb-doc-client-utils
module:- Added new
updateProjectionExpression
,updateExpressionAttributeNames
&updateExpressionAttributeValues
functions - Changed
getItem
function to throw a TypeError if no result or non-object result is returned
- Added new
- Moved test devDependencies to package.json & removed test/package.json
- Upgraded
aws-core-test-utils
test dependency to 2.0.9 - Updated
core-functions
dependency to version 3.0.7 - Updated
logging-utils
dependency to version 4.0.7
- Changes to
api-lambdas
module:- Renamed
initContext
,initSettings
&initOptions
parameters ofgenerateHandler
function togenerateContext
,generateSettings
&generateOptions
respectively - Changed
generateHandler
function to acceptgenerateContext
,generateSettings
&generateOptions
arguments as functions that can be used to generate non-shared objects, in addition to still providing legacy support for them being passed as shared, module-scoped objects that must be copied to be safely used
- Renamed
- Upgraded
logging-utils
dependency to 4.0.6 - Upgraded
aws-sdk
dev dependency to 2.54.0 to match current AWS Lambda runtime version - Upgraded
aws-core-test-utils
test dependency to 2.0.8
- Upgraded
aws-core-test-utils
test dependency to 2.0.7 - Upgraded
uuid
test dependency to 3.1.0
- Changes to
type-defs
module - added more detail to type definitions:- Renamed
DynamoDBGetOpts
type definition toDynamoGetOpts
- Renamed
DynamoDBQueryOpts
type definition toDynamoQueryOpts
& added keyK
template - Renamed
DynamoDBGetResult
type definition toDynamoGetResult
- Renamed
DynamoDBQueryResult
type definition toDynamoQueryResult
& added extra keyK
template - Added new
DynamoBatchGetResult
type definition with itemI
& keyK
templates - Added new
DynamoScanResult
type definition with itemI
& keyK
templates - Added new
UnprocessedKeysMap
&CapacityUnitsMap
type definitions - Added details & properties to
ConsumedCapacity
type definition
- Renamed
- Upgraded
aws-core-test-utils
test dependency to 2.0.6 - Updated
core-functions
dependency to version 3.0.6 - Updated
logging-utils
dependency to version 4.0.5
- Upgraded
aws-core-test-utils
test dependency to 2.0.5 - Updated
core-functions
dependency to version 3.0.5 - Updated
logging-utils
dependency to version 4.0.4
- Upgraded
aws-core-test-utils
test dependency to 2.0.4
- Upgraded
aws-core-test-utils
test dependency to 2.0.3
- Upgraded
aws-core-test-utils
test dependency to 2.0.2
- Upgraded
aws-core-test-utils
test dependency to 2.0.1
- Added new
dynamodb-doc-client-utils
module - Changes to
type-defs
module (to sync withget
method of DynamoDB.DocumentClient rather thangetItem
method):- Renamed
DynamoDBGetItemOpts
toDynamoDBGetOpts
type definition - Renamed
DynamoDBGetItemResult
toDynamoDBGetResult
type definition
- Renamed
- Changes to
regions
module:- Changed
getRegion
function to treat "undefined" or "null" regions as undefined - Added
setRegion
function - Changed
setRegionIfNotSet
function to usesetRegion
- Deprecated
setRegionIfNotSet
function - Changed
configureRegion
function to fallback to usingconsole.log
ifcontext.info
is not configured yet
- Changed
- Changes to
stages
module:- Added
configureStageAndAwsContext
convenience function to configure resolved stage and AWS context on the given context - Deprecated old
configureRegionStageAndAwsContext
convenience function
- Added
- Changes to
contexts
module:- Changed
configureStandardContext
function to invokeregions.configureRegion
as early in the function as possible & to invokestages.configureStageAndAwsContext
instead ofstages.configureRegionStageAndAwsContext
- Changed
- Changes to
type-defs
module:- Added
StageAndAWSContextAware
type definition - Added
DynamoDBGetItemOpts
,DynamoDBGetItemResult
,DynamoDBQueryOpts
,DynamoDBQueryResult
&ConsumedCapacity
type definitions
- Added
- Upgraded to Node 6.10.3
- Updated
core-functions
dependency to version 3.0.4 - Updated
logging-utils
dependency to version 4.0.3 - Upgraded
aws-sdk
dev dependency to version 2.45.0 - Changes to
dynamodb-doc-client-cache
module:- Changed
setDynamoDBDocClient
to create & cache each new DynamoDB.DocumentClient instance with a COPY of the options while still caching the ORIGINAL options to avoid subsequent cache comparison failures related to AWS SDK 2.45.0 mutating the options passed to the constructor, e.g. by adding "attrValue" with value "S8"
- Changed
- Updated
core-functions
dependency to version 3.0.2 - Updated
logging-utils
dependency to version 4.0.1 - Patches to
test/samples.js
:- Fixed potential shared global regular expression issues in
sampleAwsContext
function
- Fixed potential shared global regular expression issues in
- Changes to
aws-errors
module:- Added
isResourceNotFoundException
function
- Added
- Changes to
dynamodb-utils
module:- Added
simplifyKeysNewImageAndOldImage
function
- Added
- Updated
core-functions
dependency to version 3.0.0 - Updated
logging-utils
dependency to version 4.0.0 - Changes to
api-lambdas.js
module:- Removed
log
function (replaced use with newlog
function &log
method inlogging-utils
)
- Removed
- Changes to
arns.js
module:- Moved
ArnResources
typedef totype-defs.js
- Moved
- Changes to
aws-errors.js
module:- Added
isItemCollectionSizeLimitExceededException
function - Added
isLimitExceeded
function - Removed limit exceeded cases from
isThrottled
function (not backward-compatible) - Added S3
SlowDown
case toisThrottled
function - Added
isLimitExceeded
&err.retryable
checks toisRetryable
function
- Added
- Changes to
dynamodb-utils.js
module:- Removed
toNumber
function (replaced use with newtoNumberOrIntegerLike
function incore-functions/numbers.js
) - Added new
toStorableObject
function - Added new
defaults
static property withemptyStringReplacement
property
- Removed
- Changes to
stages.js
module:- Replaced all setting names constants (e.g. CUSTOM_TO_STAGE_SETTING) with use of a new module-scope
settingNames
object property that holds all the standard stage handling settings names (e.g. settingNames.customToStage) - Added new
extractNameAndStageFromStreamName
&extractNameAndStageFromResourceName
settings - Added
extractNameAndStageFromQualifiedStreamName
&extractNameAndStageFromQualifiedResourceName
functions - Added
extractNameAndStageFromSuffixedStreamName
&extractNameAndStageFromSuffixedResourceName
functions - Added
_extractNameAndStageFromQualifiedName
&_extractNameAndStageFromSuffixedName
functions - Changed
extractStageFromQualifiedStreamName
to attempt fallback with_extractNameAndStageFromQualifiedName
- Changed
extractStageFromQualifiedResourceName
to attempt fallback with_extractNameAndStageFromQualifiedName
- Replaced all setting names constants (e.g. CUSTOM_TO_STAGE_SETTING) with use of a new module-scope
- Changes to
stream-events.js
module:- Added
MAX_PARTITION_KEY_SIZE
constant - Added
DynamoDBEventName
enum - Added
getEventID
,getEventName
,getEventSource
&getEventSourceARN
functions - Added
getKinesisShardId
,getKinesisShardIdFromEventID
,getKinesisShardIdAndEventNoFromEventID
&getKinesisSequenceNumber
functions - Added
getDynamoDBSequenceNumber
function - Added additional validation checks to
validateStreamEventRecord
,validateKinesisStreamEventRecord
&validateDynamoDBStreamEventRecord
functions
- Added
- Added many new typedefs to
type-defs.js
- Fixed critical module-scope defects in
generateHandlerFunction
function inapi-lambdas
module - Changes to
dynamodb-utils
module:- Changed
toNumber
function to return the given string if a large integer number's precision cannot be preserved - Added
toKeyValuePairs
function
- Changed
- Updated
core-functions
dependency to version 2.0.14 - Updated
logging-utils
dependency to version 3.0.12
- Added missing
context
as first argument togenerateHandlerFunction
function ofapi-lambdas.js
module
- Fixed missing require
core-functions/promises
issue inapi-lambdas.js
module
- Fixed defect in
generateHandlerFunction
function ofapi-lambdas.js
module
- Added new
generateHandlerFunction
function toapi-lambdas.js
module - More improvements to typedefs in
type-defs.js
module - Updated
core-functions
dependency to version 2.0.12 - Updated
logging-utils
dependency to version 3.0.10
- Updated
logging-utils
dependency to version 3.0.9
- Changes to
type-defs.js
module:- Added
StandardContext
,StandardSettings
,StandardOptions
,CustomAware
,CustomSettings
,CustomOptions
andRegionStageAWSContextAware
- Added
- Added new
contexts.js
module withconfigureStandardContext
andconfigureCustomSettings
functions - Added new
api-lambdas.js
module withfailCallback
(and synonymfailCallbackForApiGateway
) functions and re-exportedconfigureStandardContext
function fromcontexts.js
to simplify imports for API Gateway exposed Lambdas - Changes to
lambdas.js
module:- Moved
failCallbackForApiGateway
function to newapi-lambdas.js
module
- Moved
- Changes to
stages.js
module:- Added new
configureRegionStageAndAwsContext
convenience function to configure current region, resolved stage and AWS context on the given context - Improved JsDoc type definitions on all of the configuration functions
- Added new
- Added and improved existing examples in README.md
- Fixed broken unit tests by changing incorrect imports of
node-uuid
touuid
- Added new
RegionAware
,KinesisAware
andDynamoDBDocClientAware
typedefs totype-defs.js
module - Changes to
regions.js
module:- Changed the
context
argument and return type ofconfigureRegion
function to use newRegionAware
typedef
- Changed the
- Changes to
kinesis-cache.js
module:- Changed the
context
argument and return types ofconfigureKinesis
function to use newKinesisAware
typedef
- Changed the
- Changes to
dynamodb-doc-client-cache.js
module:- Changed the
context
argument and return type ofconfigureDynamoDBDocClient
function to use newDynamoDBDocClientAware
typedef
- Changed the
- Updated
logging-utils
dependency to version 3.0.8 - Renamed
stages-defs.js
module totype-defs.js
to synchronize with other modules
- Renamed
stage-handling-type-defs.js
module tostages-type-defs.js
- Added
stage-handling-type-defs.js
module to hold all of the stage handling related typedefs- Added
StageHandlingOptions
andStageHandlingSettings
typedefs fromstages.js
- Added new
StageHandling
andStageAware
typedefs
- Added
- Changes to
stages.js
module:- Removed
StageHandlingOptions
andStageHandlingSettings
typedefs - Changed the argument and return types on many of the functions to use the existing and new typedefs
- Removed
- Updated
logging-utils
dependency to version 3.0.7
- Updated
core-functions
dependency to version 2.0.11 - Updated
logging-utils
dependency to version 3.0.6 - Replaced
node-uuid
dependency withuuid
dependency intest\package.json
- Changes to
stream-events
module:- Added new
getEventSources
function - Added new
getDynamoDBEventSourceTableNames
function
- Added new
- Changes to
stages
module:- Changed
resolveStage
function to resolve the event's eventSource and when its DynamoDB to use the table names of the DynamoDB stream event as a stage source, instead of always assuming the event is a Kinesis stream event and only using the stream names of the Kinesis stream event as a stage source
- Changed
- Updated
core-functions
dependency to version 2.0.10 - Updated
logging-utils
dependency to version 3.0.5
- Updated
core-functions
dependency to version 2.0.9 - Updated
logging-utils
dependency to version 3.0.3
- Updated
core-functions
dependency to version 2.0.8 - Updated
logging-utils
dependency to version 3.0.2
- Changes to
stages.js
module:- Moved export of
configureStageHandlingWithSettings
toFOR_TESTING_ONLY
- Added missing notes on changes for Release 5.0.1 to
README.md
- Moved export of
- Changes to
stages.js
module:- Changed
configureStageHandling
function to usecore-functions/objects
module'scopy
andmerge
functions to ensure that any and all given custom settings and options are not lost - Changed
getDefaultStageHandlingSettings
&loadDefaultStageHandlingOptions
functions to usecore-functions/objects
module'scopy
andmerge
functions to ensure that any and all given custom options are not lost
- Changed
- Changes to
kinesis-cache.js
module:- Changed
setKinesis
to only modify a copy of the given kinesisOptions to avoid side-effects
- Changed
- Changes to
dynamodb-doc-client-cache.js
module:- Changed
setDynamoDBDocClient
to only modify a copy of the given dynamoDBDocClientOptions to avoid side-effects
- Changed
- Updated
core-functions
dependency to version 2.0.7 - Updated
tape
dependency to 4.6.3
- Changes to
arns.js
module:- Changed
getArnResources
function to support DynamoDB eventSourceARNs
- Changed
- Changes to
stream-events.js
module:- Renamed
getEventSourceStreamNames
function togetKinesisEventSourceStreamNames
- Renamed
getEventSourceStreamName
function togetKinesisEventSourceStreamName
- Added new
getDynamoDBEventSourceTableName
function - Added new
getDynamoDBEventSourceTableNameAndStreamTimestamp
function
- Renamed
- Changes to
stages.js
module:- Renamed
configureStageHandling
function toconfigureStageHandlingWithSettings
- Renamed
configureStageHandlingAndDependencies
function toconfigureStageHandling
- Removed
configureDependenciesIfNotConfigured
function - Removed
configureDefaultStageHandlingIfNotConfigured
function - Removed
configureStageHandlingIfNotConfigured
function
- Renamed
- Renamed
config.json
tostages-options.json
- Updated
core-functions
dependency to version 2.0.5 - Updated
logging-utils
dependency to version 3.0.0
- Renamed
kinesis-utils
module tokinesis-cache
to better reflect its actual purpose - Renamed
dynamodb-doc-clients
module todynamodb-doc-client-cache
to better reflect its actual purpose - Added new
dynamodb-utils
module - Changes to
stages.js
module:- Added new
configureStageHandlingAndDependencies
function to enable configuration of stage handling settings and all stage handling dependencies (currently just logging) at the same time - Added new
configureDependencies
function, which is used by the newconfigureStageHandlingAndDependencies
function - Added new
envStageName
setting to enable configuration of the name of theprocess.env
environment variable to be checked for a stage value during execution of theresolveStage
orconfigureStage
functions - Changed
resolveStage
function to first attempt to resolve a stage from a namedprocess.env
environment variable (if available), which must be configured using AWS Lambda's new environment support
- Added new
- Changes to
stages.js
module:- Added
configureDependenciesIfNotConfigured
function to configure stage handling dependencies (i.e. only logging for now) - Changed
configureStageHandlingIfNotConfigured
function to first invoke newconfigureDependenciesIfNotConfigured
function - Changed
configureStageHandling
function to acceptotherSettings
andotherOptions
as 3rd & 4th arguments to enable configuration of dependencies and to first invoke invoke newconfigureDependenciesIfNotConfigured
function - Changed
configureDefaultStageHandling
function to acceptotherSettings
andotherOptions
as 3rd & 4th arguments to enable configuration of dependencies and to always invokeconfigureStageHandling
- Added
- Changes to
stages.js
module:- Added a convenience
configureStageHandlingIfNotConfigured
function - Changed
configureDefaultStageHandlingIfNotConfigured
function to use newconfigureStageHandlingIfNotConfigured
function
- Added a convenience
- Updated
logging-utils
dependency to version 2.0.3
- Changes to
stages.js
module:- Added typedef for
StageHandlingOptions
to better define parameters and return types - Changed
getDefaultStageHandlingSettings
function to accept anoptions
argument of typeStageHandlingOptions
instead of an arbitraryconfig
object and to also load default options fromconfig.json
- Changed
configureDefaultStageHandling
function to accept a newoptions
argument of typeStageHandlingOptions
to enable optional, partial overriding of default stage handling settings - Changed
stageHandlingSettings
tostageHandlingOptions
inconfig.json
- Fixed require
logging-utils
link
- Added typedef for
- Updated
logging-utils
dependency to version 2.0.1
- Updated JsDoc comments in
dynamodb-doc-clients
andkinesis-utils
modules.
- Added a new
dynamodb-doc-clients
module to enable creation and configuration of AWS DynamoDB.DocumentClient instances and caching of a DynamoDB.DocumentClient instance per region. Note that this new module is an almost exact replica of thekinesis-utils
module, but for getting, setting and caching DynamoDB.DocumentClient instances instead of Kinesis instances.- Added
setDynamoDBDocClient
,getDynamoDBDocClient
,getDynamoDBDocClientOptionsUsed
,deleteDynamoDBDocClient
andconfigureDynamoDBDocClient
functions and unit tests for same.
- Added
- Updated
core-functions
dependency to version 2.0.3 - Updated
logging-utils
dependency to version 1.0.6
- Added
getDefaultStageHandlingSettings
function to get the default stage handling settings
- Changes to
stages
module:- Changed API of
configureStageHandling
function to accept a setting object instead of the multiple fixed parameters, to simplify configuration of new, custom settings. - Minor changes and fixes to code & unit tests to accommodate this change.
- Changed API of
- Major overhaul of
kinesis-utils
module to enable full configuration of an AWS Kinesis instance and caching of a Kinesis instance per region.- Added
setKinesis
,getKinesis
,getKinesisOptionsUsed
&deleteKinesis
functions and unit tests for same. - Rewrote and changed API of
configureKinesis
function to use the newsetKinesis
function and patched its unit tests.
- Added
- Technically should have been a 3.0.0 release semantically speaking, since I changed the APIs of two existing functions, but it did not seem warranted.
- Added new
kinesis-utils
module to provide basic configuration and caching of an AWS.Kinesis instance for Lambda - Changes to
stream-events
module:- Added
validateStreamEventRecord
function to check if a record is either a valid Kinesis or DynamoDB stream event record - Added
validateKinesisStreamEventRecord
function to check if a record is a valid Kinesis stream event record - Added
validateDynamoDBStreamEventRecord
function to check if a record is a valid DynamoDB stream event record - Added unit tests for new functions
- Added
- Minor change to
setRegionIfNotSet
to eliminate unnecessary logging when regions are the same - Updated
core-functions
dependency to version 2.0.2 - Updated
logging-utils
dependency to version 1.0.5
- Major changes to
stages
:- Changed existing configuration API from
resolveStage
-specific configuration to general stage handling configuration.- Added support for a custom to stage function.
- Added support for configuration of stream and resource name qualification.
- Added
configureStage
function. - Added configurable
toStageQualifiedStreamName
and defaulttoStageSuffixedStreamName
functions. - Added configurable
extractStageFromQualifiedStreamName
and defaultextractStageFromSuffixedStreamName
functions. - Added configurable
toStageQualifiedResourceName
and defaulttoStageSuffixedResourceName
functions. - Added configurable
extractStageFromQualifiedResourceName
and defaultextractStageFromSuffixedResourceName
functions. - Changed and added unit tests for revamped
stages
module.
- Changed existing configuration API from
- Changes to
regions
:- Added
configureRegion
function. - Added optional, hidden failFast argument to
getRegion
function needed forconfigureRegion
function.
- Added
- Changes to
aws-errors
:- Fixed incorrect usage in comments.
- Moved exported object's methods bodies to module-level functions.
- Changes to
lambdas
:- Added
failCallback
function to fail non-API Gateway Lambda callbacks with standard app errors to facilitate mapping of errors to HTTP status codes - Added
failCallbackForApiGateway
function to fail API Gateway Lambda callbacks with standard app errors to facilitate mapping of errors to HTTP status codes
- Added
- Added
stream-events
module and unit tests for it. - Updated
core-functions
dependency to version 1.2.0. - Added
logging-utils
1.0.2 dependency.
- Completed changes needed to release 1.0.0
- Added unit tests for stages.js
- Simplified regions.js API down to relevant methods
- Fixed defects attempting to source awsRegion and eventSourceARN from event instead of Kinesis records within event.
- Patched repository in package.json
- Initial commit