Abstract
Protected
auth0Protected
authorizationProtected
bodyProtected
claimsProtected
clientProtected
clientProtected
clientProtected
cognitoProtected
currentProtected
defaultProtected
eventProtected
httpProtected
Optional
initProtected
loggerProtected
logProtected
metricsProtected
pathProtected
pathProtected
principalProtected
projectProtected
queryProtected
resourceProtected
resourceProtected
resourceProtected
returnProtected
Optional
returnProtected
stageProtected
templateProtected
tracerProtected
tracerProtected
tracerProtected
translationsProtected
checkTo
Protected
deleteTo
Protected
deleteTo
Protected
doneDefault ending function for the Lambda.
Optional
error: anyOptional
rawResult: anyProtected
getGet the current log level for the current Lambda function's logger
.
Note: "FATAL" means that no log will be printed.
Protected
getForce the parsing of a query parameter as an array of strings.
Protected
getForce the parsing of a query parameter as a boolean.
Protected
getTo
Protected
getTo
Protected
handleRemap an error to manage the logging and make sure no unhandled error is returned to the requester.
The main function (to override), that handles the request and must terminate invoking the method done
.
Protected
headTo
Protected
headTo
Simulate an internal API request, invoking directly the lambda and therefore saving resources.
the body of the response
Protected
loadLoad a shared resource in the back-end (translation, template, etc.). Search for the specified file path in both the Lambda function's main folder and the layers folder.
Load the translations from the shared resources and set them with a fallback language.
Optional
defLang: stringProtected
patchTo
Protected
patchTo
Protected
postTo
Protected
postTo
Protected
preparePrepare the CloudWatch metrics at the beginning of a request.
Protected
publishPublish the CloudWatch metrics (default and custom-defined) at the end of a reqeust.
Optional
error: anyProtected
putTo
Protected
putTo
Set the log level for the current Lambda function's logger
.
Protected
sharedCheck whether shared resource exists in the back-end (translation, template, etc.). Search for the specified file path in both the Lambda function's main folder and the layers folder.
Raise the log level of the current Lambda function's logger
to "FATAL", hence avoiding printing any log.
Protected
storeStore the log associated to the request (no response/error handling).
Get a translated term by key, optionally interpolating variables (e.g. {{user}}
).
If the term doesn't exist in the current language, it is searched in the default language.
Optional
interpolateParams: any
An abstract class to inherit to manage API requests (AWS API Gateway) in an AWS Lambda function.