<i id='z2xga'><tr id='z2xga'><dt id='z2xga'><q id='z2xga'><span id='z2xga'><b id='z2xga'><form id='z2xga'><ins id='z2xga'></ins><ul id='z2xga'></ul><sub id='z2xga'></sub></form><legend id='z2xga'></legend><bdo id='z2xga'><pre id='z2xga'><center id='z2xga'></center></pre></bdo></b><th id='z2xga'></th></span></q></dt></tr></i><div id='z2xga'><tfoot id='z2xga'></tfoot><dl id='z2xga'><fieldset id='z2xga'></fieldset></dl></div>
      <bdo id='z2xga'></bdo><ul id='z2xga'></ul>

    1. <small id='z2xga'></small><noframes id='z2xga'>

      <legend id='z2xga'><style id='z2xga'><dir id='z2xga'><q id='z2xga'></q></dir></style></legend>
      <tfoot id='z2xga'></tfoot>

        使用 Lambda 设置 DynamoDB 触发器

        Setup DynamoDB Trigger using Lambda(使用 Lambda 设置 DynamoDB 触发器)

      1. <tfoot id='1QiP6'></tfoot>

        1. <i id='1QiP6'><tr id='1QiP6'><dt id='1QiP6'><q id='1QiP6'><span id='1QiP6'><b id='1QiP6'><form id='1QiP6'><ins id='1QiP6'></ins><ul id='1QiP6'></ul><sub id='1QiP6'></sub></form><legend id='1QiP6'></legend><bdo id='1QiP6'><pre id='1QiP6'><center id='1QiP6'></center></pre></bdo></b><th id='1QiP6'></th></span></q></dt></tr></i><div id='1QiP6'><tfoot id='1QiP6'></tfoot><dl id='1QiP6'><fieldset id='1QiP6'></fieldset></dl></div>
          <legend id='1QiP6'><style id='1QiP6'><dir id='1QiP6'><q id='1QiP6'></q></dir></style></legend>
          • <bdo id='1QiP6'></bdo><ul id='1QiP6'></ul>

            <small id='1QiP6'></small><noframes id='1QiP6'>

                <tbody id='1QiP6'></tbody>
                1. 本文介绍了使用 Lambda 设置 DynamoDB 触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试使用 DynamoDB Streams 和 AWS Lambda 创建一个 DynamoDB 触发器.我进行了很多研究,但找不到任何方法来读取和处理 Java 8 中的 DynamoDB Stream 事件.我对这两种技术都是全新的,所以不知道如何使用它.

                  I'm trying to create a DynamoDB trigger using DynamoDB Streams and AWS Lambda. I researched a lot but I couldn't find any way to read and process a DynamoDB Stream event in Java 8. I'm completely new to both these technologies so don't know how to work with this.

                  本质上,我想做的是每当在表 A 中创建记录时在表 B 中创建记录.

                  Essentially, what I want to do is create a record in table B whenever a record is created in table A.

                  谁能给我指出一个用Java处理这个用例的代码或帖子?

                  Could any of you please point me to a code or post that handles this use case in Java?

                  谢谢:)

                  推荐答案

                  这段代码对我有用.您可以使用它在 Lambda 函数中接收和处理 DynamoDB 事件 -

                  This code worked for me. You can use it to receive and process DynamoDB events in a Lambda function -

                  public class Handler implements RequestHandler<DynamodbEvent, Void> {
                  
                      @Override
                      public Void handleRequest(DynamodbEvent dynamodbEvent, Context context) {
                  
                          for (DynamodbStreamRecord record : dynamodbEvent.getRecords()) {
                  
                              if (record == null) {
                                  continue;
                              }
                  
                              // Your code here
                              // Write to Table B using DynamoDB Java API
                          }
                  
                          return null;
                      }
                  }
                  

                  创建 Lambda 时,将表 A 中的流添加为事件源,一切顺利

                  When you create your Lambda, add the stream from table A as your event source, and you're good to go

                  这篇关于使用 Lambda 设置 DynamoDB 触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

                          <tbody id='CrrEl'></tbody>
                      1. <small id='CrrEl'></small><noframes id='CrrEl'>

                        <legend id='CrrEl'><style id='CrrEl'><dir id='CrrEl'><q id='CrrEl'></q></dir></style></legend>
                        <i id='CrrEl'><tr id='CrrEl'><dt id='CrrEl'><q id='CrrEl'><span id='CrrEl'><b id='CrrEl'><form id='CrrEl'><ins id='CrrEl'></ins><ul id='CrrEl'></ul><sub id='CrrEl'></sub></form><legend id='CrrEl'></legend><bdo id='CrrEl'><pre id='CrrEl'><center id='CrrEl'></center></pre></bdo></b><th id='CrrEl'></th></span></q></dt></tr></i><div id='CrrEl'><tfoot id='CrrEl'></tfoot><dl id='CrrEl'><fieldset id='CrrEl'></fieldset></dl></div>

                        1. <tfoot id='CrrEl'></tfoot>
                            <bdo id='CrrEl'></bdo><ul id='CrrEl'></ul>