# How can I sync an entire dynamodb table with Elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-can-i-sync-an-entire-dynamodb-table-with-elasticsearch/261063>\
**Category:** Elasticsearch\
**Created:** [January 13, 2021, 11:31pm UTC](https://discuss.elastic.co/t/how-can-i-sync-an-entire-dynamodb-table-with-elasticsearch/261063 "2021-01-13T23:31:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcosvrrs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcosvrrs/32/77073_2.png) [@marcosvrrs](https://discuss.elastic.co/u/marcosvrrs)\
**Post date:** [January 13, 2021, 11:31pm UTC](https://discuss.elastic.co/t/how-can-i-sync-an-entire-dynamodb-table-with-elasticsearch/261063/1 "2021-01-13T23:31:18Z")

</div>

Hi all, I am having trouble to connect ES to dynamodb. Today I use a python lambda (serverless) to send every dynamodb change (update, delete, modify) to the Elasticsearch clusters.  
But we want to be able to reindex old dynamodb tables.  
We used a workaround to trigger a bulk change in every dynamodb registry, so lambda would detect and send to ES. This workaround doesn't seem to be the best solution as it writes to production tables.  
I would love any kind of suggestion, thanks in advance!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 14, 2021, 3:12am UTC](https://discuss.elastic.co/t/how-can-i-sync-an-entire-dynamodb-table-with-elasticsearch/261063/2 "2021-01-14T03:12:14Z")

</div>

I don't know DynamoDB but can't you just run a request which selects all from the table and send that to elasticsearch instead of trying to reuse the same "watch for changes" code?

---

<div class="post-metadata">

**Author:** ![marcosvrrs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcosvrrs/32/77073_2.png) [@marcosvrrs](https://discuss.elastic.co/u/marcosvrrs)\
**Post date:** [January 14, 2021, 12:22pm UTC](https://discuss.elastic.co/t/how-can-i-sync-an-entire-dynamodb-table-with-elasticsearch/261063/3 "2021-01-14T12:22:26Z")

</div>

Thanks @dadoonet, I am looking for this kind of thing. I was reading aws sdk and saw that I can make a scan operation through the whole table, that is similar to a SQL statement " SELECT \* FROM table".  
But I don't know if I can do this in logstash, and how to.  
I use this kind of query in logstash with mysql through the jdbc connector and it works flawlessly, sent the tables and kept sync with every changes in the table. Was wondering if anyone have a more "tutorial" way of doing it (I don't have much experience dealing with elasticsearch and nosql data).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 14, 2021, 1:35pm UTC](https://discuss.elastic.co/t/how-can-i-sync-an-entire-dynamodb-table-with-elasticsearch/261063/4 "2021-01-14T13:35:48Z")

</div>

Why not using a similar lambda as the one you previously wrote?

---

<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 11, 2021, 1:36pm UTC](https://discuss.elastic.co/t/how-can-i-sync-an-entire-dynamodb-table-with-elasticsearch/261063/5 "2021-02-11T13:36:02Z")

</div>

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