Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
aws-dynamodb-lambda-trigger
Advanced tools
Cleans up the code you need to run a DynamoDB trigger on AWS Lambda.
var trigger = require('aws-dynamodb-lambda-trigger')
// regular lambda fn business here
exports.handler = function myLambdaTriggerForTableName(event, context) {
// register a handler for inserts
trigger.insert(event, context, function handleInsert(record, callback) {
console.log(record)
callback()
})
}
trigger.insert(event, context, handler)
register a handler for INSERT
trigger.modify(event, context, handler)
register a handler for MODIFY
trigger.remove(event, context, handler)
register a handler for REMOVE
trigger.all(event, context, handler)
register a handler for INSERT
, MODIFY
and REMOVE
trigger.save(event, context, handler)
register a handler for INSERT
, MODIFY
trigger.change(event, context, handler)
register a handler for INSERT
and REMOVE
In all cases the handler
is a function with the following signature:
function handleSave(record, callback) {
// do something with record and then callback node-style
// if an err is passed to the callback it will be passed to context.fail
callback(null, record)
}
var trigger = require('aws-dynamodb-lambda-trigger/lambda')
// runs on every record inserted
function handler(record, callback) {
callback()
}
exports.handler = trigger.insert(handler)
FAQs
clean dynamo triggers
The npm package aws-dynamodb-lambda-trigger receives a total of 5 weekly downloads. As such, aws-dynamodb-lambda-trigger popularity was classified as not popular.
We found that aws-dynamodb-lambda-trigger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.