Lambda Basics
This module provides a set of useful functions for lambda.
Methods:
-
getSSMParameterValue(parameterName)
: Will return a decrypted value of given parameter -
getResponseObject(statusCode, headers, body)
: Will return a response object where the body is json string -
getErrorResponseBody(message, type)
: Wil lreturn a error response body -
log(message)
: Will console.log a message and send it to sentry -
logException(exception)
: Will console.log a message and send it to sentry -
validateRequestParams(requiredParams)(params)
: Will return a function which will check ifparams
containsrequiredParams
Usage
Just add the package to your deployment package to lambda.
Install
npm i -S @mineko-io/lambda-basics