Skip to content

Latest commit

 

History

History
67 lines (48 loc) · 3.19 KB

File metadata and controls

67 lines (48 loc) · 3.19 KB

Enable DynamoDB Stream

A DynamoDB Stream is enabled by updating the DynamoDB table.

Stream View Type

When you configure a DynamoDB Stream you can choose what data is sent into the stream. The less you send in the stream the less read capacity units consumed.

View Type Description
KEYS_ONLY Only the keys are sent into the event.
NEW_IMAGE The entire new version of the item in DynamoDB
OLD_IMAGE The entire old version of the item in DynamoDB
NEW_AND_OLD_IMAGES Both the old and new versions of the item are sent in the event payload

For our use case we need both the old and new versions of the item to compare any changes to the task assignments.

Check Status

Like updating a table's provisioning, when enabling a stream it will change the status of the table to updating while the service provisions the stream. The table will be accessible while the stream is being enabled.

Testing DynamoDB Stream

This code below is simplistic version of what it takes to read from a DynamoDB stream. It does does not handle failures and scaling concerns. When we use Lambda to handle reading from a DynamoDB Stream all we have to write is our business logic in the foreach for the shardReader Func<>. Lambda takes care of managing the scaling and failures for the shards of a DynamoDB Stream.


Continue on to next page: Assign Task Lambda Function