package
AWS Lambda mock context object
npm install aws-lambda-mock-contextGitHub-flavored package documentation.
Across all versions, last 30 days.
45,078 in 30 days
Runtime metadata.
Tagged topics.
AWS Lambda mock context object
$ npm install --save-dev aws-lambda-mock-contextconst context = require('aws-lambda-mock-context');
const ctx = context();
index.handler({hello: 'world'}, ctx);
ctx.Promise
.then(() => {
//=> succeed() called
})
.catch(err => {
//=> fail() called
});Type: string
Default: us-west-1
AWS region.
Type: string
Default: 123456789012
Account number.
Type: string
Default: aws-lambda-mock-context
Name of the function.
Type: string
Default: $LATEST
Version of the function.
Type: string
Default: 128
Memory limit.
Type: string
Alias of the function.
Type: number
Default: 3
Timeout of the lambda function in seconds.
MIT © Sam Verschueren
Estimated unpacked size across 4 packages.
4.4 MB
Includes dependencies.