Alexander
Alexander

Reputation: 51

Is there any AWS events listener in Java SDK?

I want my local Java application to know that some changes made to the item in AWS DynamoDB table. Is it posible without polling? I understand that I should use DynamoDB Stream to invoke AWS Lamda trigger but what should Lambda function do to send information to my local app? If it's possible.

Upvotes: 1

Views: 476

Answers (1)

Sergey Kovalev
Sergey Kovalev

Reputation: 9431

In my opinion Lambda is not a good fit here. AWS provides reference architectures that will meet your needs. Usually it goes like this:

DynamoDB Stream -> Kinesis Adapter for DynamoDB Streams -> Kinesis Client Library

Take a closer look at these documents: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.KCLAdapter.html https://aws.amazon.com/blogs/database/dynamodb-streams-use-cases-and-design-patterns/

enter image description here

You can also design your app as this (the top part) and consume events from SQS long polling, but using Kinesis Client Library seems more straightforward and easier:

enter image description here

Upvotes: 1

Related Questions