mapbox/dynamodb-replicator

Replicate to a table with a different key schema

Opened this issue · 1 comments

A bit of an unusual use case but in trying to replicate to destination table with an different key schema than the source table, this line is problematic. We are assuming both tables have identical key schema.

We could workaround this by allowing the user to define the destination key schema explicitly or by looking up the key schema for the destination table.

We could workaround this by allowing the user to define the destination key schema explicitly or by looking up the key schema for the destination table.

The tricky part is that these functions are designed to run on lambda instances, where every bit of configuration that doesn't come bundled in the event is a chore. We could run one describeTable request per function invocation to determine the key schema, otherwise we'd need that information to be passed in via environment variable somehow.