@turbot/guardrails-lib-fn
v1.1.0
Published
Guardrails Lib Fn.
Keywords
Readme
@turbot/guardrails-lib-fn
A wrapper for Guardrails control functions.
Install
npm install --save @turbot/guardrails-lib-fnUsage
This package returns a function with the signature expected by AWS Lambda for node. It should be assigned to the handler entry point for the control.
const gfn = require("@turbot/guardrails-lib-fn");
exports.control = gfn((turbot, $) => {
// your code here
});Test mode
If TURBOT_TEST is truthy then the function will be run in test mode:
- Input should be passed directly (no SNS message wrapper)
- The function will return
{ result: {/*original result*/}, turbot: {/*process event data*/} }whereturbotcontains the process event data fromturbot.sendFinal(). - Commands will not be published to SNS.
