
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
dynamo2es-lambda-hotfix
Advanced tools
Configurable AWS Lambda handler to index documents from DynamoDB Streams in Amazon Elasticsearch
Configurable AWS Lambda handler to index documents from DynamoDB Streams in Amazon Elasticsearch Service.
$ npm install dynamo2es-lambda
dynamo2es-lambda takes options object and returns AWS Lambda handler (using lambda-handler-as-promised) that is ready to be connected to any DynamoDB Stream. options object supports the following configuration options:
indexField is providedtypeField is providedseparator; required if indexPrefix field is present; can't be used together with indexindexField valueseparator; can't be used together with typeseparator [defaults to document's key field(s)]'.']meta object contains parsed event data, action description and document that was indexedNote: hooks provide convenient place to add custom logic, but they don't change workflow (except error hooks where you can define if error should be thrown)
Note:
contextobject, available in hooks, includes all the context extensions provided bylambda-handler-as-promised
Note:
afterHookanderrorHooksupport asynchronous operations when logic is wrapped into Promise
const d2es = require('dynamo2es-lambda');
module.exports.handler = d2es({
elasticsearch: {
hosts: 'your-aws-es-host.amazonaws.com',
bulk: {
refresh: 'wait_for'
}
},
indexField: ['storeId', 'customerId'],
type: 'type',
idField: 'orderId',
versionField: '_version',
separator: '-',
beforeHook: (event, context) => context.log.info({ event }),
afterHook: (event, context, result) => {
context.log.info({ result });
if (result.errors) {
/* error handling logic */
}
},
errorHook: (event, context, err) => context.log.error({ err }),
recordErrorHook: (event, context, err) => context.log.error({ err }),
transformRecordHook: (record) => {
return Object.assign({}, record, {fullName: `${record.firstName} ${record.lastName}`});
}
});
dynamo2es-lambda returns raw result provided by the bulk API:
"took": 123,
"errors": false,
"items": [
{
"index": {
"_index": "08c312d0-9bd0-4a43-9748-9469f78e3ea0",
"_type": "type",
"_id": "f2f8cef2-031d-401f-a0c5-d6ce50a0bef3",
"_version": 0,
"result": "created",
"_shards": {
"total": 2,
"successful": 2,
"failed": 0
},
"created": true,
"status": 201
}
}
]
Note:
errorsproperty is set totrueonly in case of critical errors (e.g. version conflict), but not for non-critical ones (e.g. not found).
The MIT License (MIT)
Copyright (c) 2016-2017 Anton Bazhal
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Configurable AWS Lambda handler to index documents from DynamoDB Streams in Amazon Elasticsearch
The npm package dynamo2es-lambda-hotfix receives a total of 4 weekly downloads. As such, dynamo2es-lambda-hotfix popularity was classified as not popular.
We found that dynamo2es-lambda-hotfix 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
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.