We can track the changes of dynamodb using the dynamoDB streams. On create, delete or updated, when the dynamodb streams is being enabled we can run a lambda function and do necessary tasks.
When we use global dynamodb table and data is being replicated between multiple region, the dynamodb streams must be enabled.
StreamViewType determines what information are writtne to the stream to this table.
KEYS_ONLY: Only pass the modified key items
NEW_IMAGE: Pass the new value
OLD_IMAGE: Pass the existing value
NEW_AND_OLD_IMAGES: Pass both the new and old values
As stream source, if we make use of lambda, the lambda needs permission to read these stream. In this case, we can make use of a managed policy,
dynamoDB Streamscan only be integrated with lambda functions, can not integrated with sns or sqs etc.