DynamoDB Global Table replication stream event issues

0

We are encountering a situation where if we have a table globally replicated but also use the tables stream to process records on insert/update events.

Ex. We have a table replicated between us-east-1 and us-west-2 with a lambda connected to each tables stream in their region.
When an update is performed in the us-east-1 table the us-west-2 lambda is invoked with the updated record. The problem is we need to not process the record replicated to us-west-2, we are using version 2019 of dynamodb global tables so there are no metadata or additional fields that help to do this validation.

Anyone knows how to mitigate this issue?

질문됨 3년 전791회 조회
4개 답변
1

The approach I typically recommend for this is to add your own attribute which records the region where the most recent change was made. Then, your Lambda function which processes the stream records ignores any record for which the region identification is not local.

답변함 3년 전
0

Thanks for the response, I understand the approach you are suggesting, for this to be implemented it requires changes in all the places where create/updates to dynamo are made, do you know another strategy that not requires changes in the insert logic of the records?

답변함 3년 전
0

Sorry, no - this is the only way I am aware of.

답변함 3년 전
0

Accepted answer: The approach I typically recommend for this is to add your own attribute which records the region where the most recent change was made. Then, your Lambda function which processes the stream records ignores any record for which the region identification is not local.

답변함 3년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠