本文介绍了自动将发电机表卸载到云搜索域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在大量使用Dynamo DB来构建服务。出现了新的客户端请求,该请求需要云搜索。我看到可以通过AWS控制台从发电机表创建云搜索域。

I'm using Dynamo DB pretty heavily for a service I'm building. A new client request has come in that requires cloud search. I see that a cloud search domain can be created from a dynamo table via the AWS console.

我的问题是:

宁愿选择此方法,而是手动将dynamo文档卸载到cloudsearch。

I'd prefer this to manually offloading dynamo documents to cloudsearch. All help greatly appreciated!

推荐答案

这里有两个想法。


  1. 使用CloudSearch搜索DynamoDB数据的AWS官方方法

  1. The official AWS way of searching DynamoDB data with CloudSearch

在将搜索域与a 。

缺点是听起来很痛苦:您有重新创建新的搜索域或维护更新表以进行同步,您将需要执行cron作业或执行脚本。

The downside is that it sounds like a huge pain: you have to either re-create new search domains or maintain an update table in order to sync, and you'd need a cron job or something to execute the script.

AWS Lambdas方式

The AWS Lambdas way

使用最新的Lambdas事件处理服务。设置基于Dynamo的事件流非常简单(请参见)。

Use the newish Lambdas event processing service. It is pretty simple to set up an event stream based on Dynamo (see http://docs.aws.amazon.com/lambda/latest/dg/wt-ddb.html).

您的Lambda然后会提交根据Dynamo事件将文档搜索到CloudSearch。有关从Lambda提交文档的示例,请参见

Your Lambda would then submit a search document to CloudSearch based on the Dynamo event. For an example of submitting a document from a Lambda, see https://gist.github.com/fzakaria/4f93a8dbf483695fb7d5

我认为这种方法要好得多,因为它将不断更新搜索索引,而无需您的任何参与。

This approach is a lot nicer in my opinion as it would continuously update your search index without any involvement from you.

这篇关于自动将发电机表卸载到云搜索域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 20:41