# Dynamo2es-lambda plugin versionField is showing FieldNotFoundError

**URL:** <https://discuss.elastic.co/t/dynamo2es-lambda-plugin-versionfield-is-showing-fieldnotfounderror/114036>\
**Category:** Elasticsearch\
**Created:** [January 4, 2018, 8:09am UTC](https://discuss.elastic.co/t/dynamo2es-lambda-plugin-versionfield-is-showing-fieldnotfounderror/114036 "2018-01-04T08:09:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaidehi9039](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vaidehi9039/32/25891_2.png) [@vaidehi9039](https://discuss.elastic.co/u/vaidehi9039)\
**Post date:** [January 4, 2018, 8:09am UTC](https://discuss.elastic.co/t/dynamo2es-lambda-plugin-versionfield-is-showing-fieldnotfounderror/114036/1 "2018-01-04T08:09:13Z")

</div>

Hi,

I am trying to insert data from dynamodb to elasticsearch through lambda function. But it is creating new indices in elasticsearch whenever I insert data in dynamoDB. The versionField in "dynamo2es-lambda" plugin is throwing fieldNotFound error.  
Below is my lambda function.

const d2es = require('dynamo2es-lambda');  
exports.handler = d2es({  
elasticsearch: {  
hosts: '[https://search-inventory-elasticsearchendpointpath.us-west-2.es.amazonaws.com](https://search-inventory-elasticsearchendpointpath.us-west-2.es.amazonaws.com)',  
bulk: {  
refresh: 'wait\_for'  
}  
},  
indexField: ['product\_id'],  
type: 'string',  
idField: 'product\_id',  
versionField: '\_version',  
separator: '-',  
beforeHook: (event, context) =\> [context.log.info](http://context.log.info)({ event }),  
afterHook: (event, context, result) =\> {  
[context.log.info](http://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 })

});

Please help me

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 1, 2018, 8:09am UTC](https://discuss.elastic.co/t/dynamo2es-lambda-plugin-versionfield-is-showing-fieldnotfounderror/114036/2 "2018-02-01T08:09:16Z")

</div>

Closed on February 1, 2018, 8:09am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
