I am using AWS DynamoDB in order to store information. I have two machines running separate codes, that accessing the information in the database.
One of the machines is writing into the database and the second one is reading. Since the second one does not know whether or not the information in the database has been changed I need to somehow monitor my database for changes. I know that there is something called dynamo streams that can provide you with the information regarding changes made in your database and I already have that code implemented.
The question is as follows: if I am monitoring the database constantly, I need to query this stream all the time, let's say once every minute. What is the difference between doing that and actually querying the database every minute? Is it much more efficient? Is it less costly (resources, moneywise)? Is there any other, more efficient way of monitoring changes in the database in a specific table from the code?
any help would be appreciated, thank you.