I've been going through this tutorial posted by amazon. On the step titled "Enabling the lambda blueprint", it references a dynamodb-to-elasticsearch blueprint. In my AWS console, there is no such blueprint. Does anybody know what the Python code for this blueprint looks like? Am I unable to see this because of my specific AWS account, or has AWS removed this?
-
maybe they prefer this way now: docs.aws.amazon.com/elasticsearch-service/latest/developerguide/…at0mzk– at0mzk2016-12-13 02:13:11 +00:00Commented Dec 13, 2016 at 2:13
-
I tried that before taking a look into the lambda approach, but it led me down this path for which there doesn't appear to be a great solutionCody Ma– Cody Ma2016-12-13 04:46:02 +00:00Commented Dec 13, 2016 at 4:46
1 Answer
You need to make sure a DynamoDB stream is enabled on your table including both old and new images. First, pull the DynamoDB stream record out of the Kinesis stream record. Then, determine whether the DynamoDB stream record represents an insertion, update or deletion. Third, delegate appropriately and upsert the corresponding document in ES for insertions and updates, and delete the corresponding document in ES for deletions.
For the time being, you can adapt the Python lambda handler shared here on Github - it parses stream records and writes documents to ES.