awslabs / dynamodb-cross-region-library

A library to facilitate cross-region replication with Amazon DynamoDB Streams.
Apache License 2.0
275 stars 98 forks source link

(question not issue) Using Lambda #5

Closed arieljake closed 9 years ago

arieljake commented 9 years ago

I am just starting to learn about dynamodb cross-region sync'ing, and I was wondering whether something like this could be done with Lambda?

schwar commented 9 years ago

Hi Ariel,

There are two common ways of processing a DynamoDB Stream: Kinesis Client Library (KCL) + DynamoDB Streams Kinesis Adapter and with Lamda. There are tradeoffs to either approach:

With Kinesis Client Library, you have explicit control over the Stream processing (checkpointing, error handling). Lambda exposes some configuration settings (that are suitable for most applications), but with KCL the code running on your host is making direct low-level API calls to DynamoDB Streams.

Lambda fully manages the Streams processing infrastructure. It also takes some of the work out of configuration by providing you with a set of options.

The pricing model also differs for these solutions. Lambda is pay per request, so for Streams with high enough throughput (or processing many Streams on the same host), it may be less expensive to run a dedicated host running KCL.

Please let me know if you have additional questions.

Best, Ben

dymaws commented 9 years ago

Closing issue as the question has been answered.