AWS Lambda mock context object
npm install aws-lambda-mock-context> AWS Lambda mock context object
```
$ npm install --save-dev aws-lambda-mock-context
`js
const context = require('aws-lambda-mock-context');
const ctx = context();
index.handler({hello: 'world'}, ctx);
ctx.Promise
.then(() => {
//=> succeed() called
})
.catch(err => {
//=> fail() called
});
`
#### options
##### region
Type: stringus-west-1
Default:
AWS region.
##### account
Type: string123456789012
Default:
Account number.
##### functionName
Type: stringaws-lambda-mock-context
Default:
Name of the function.
##### functionVersion
Type: string$LATEST
Default:
Version of the function.
##### memoryLimitInMB
Type: string128
Default:
Memory limit.
##### alias
Type: string
Alias of the function.
##### timeout
Type: number3`
Default:
Timeout of the lambda function in seconds.
- aws-lambda-pify - Promisify an AWS lambda function.
MIT © Sam Verschueren