Currently, I am faced with a scenario where I must comprehend the distinction between NEW_IMAGE
and OLD_IMAGE
on dynamoDB streams.
As per the information available at:
https://aws.amazon.com/blogs/database/dynamodb-streams-use-cases-and-design-patterns/
DynamoDB Streams offers various stream record viewpoints:
KEYS_ONLY—Consisting of only the key attributes of the modified item
NEW_IMAGE—Comprising the complete item after modification
OLD_IMAGE—Containing the complete item before being modified
NEW_AND_OLD_IMAGES—Showcasing both the new and old versions of the item
I am unable to subscribe for observing IMAGE_DIFFERENCE
or similar events.
Hence, what would be the optimal approach to address this query? Kindly provide an example, preferably in JavaScript/TypeScript.