update id
This commit is contained in:
@@ -53,6 +53,9 @@ def lambda_handler(event: DynamoDBStreamEvent, context: LambdaContext):
|
||||
new_image = record.dynamodb.new_image # type: ignore
|
||||
table_name = table_from_arn(record.event_source_arn) # type: ignore
|
||||
keys = record.dynamodb.keys # type: ignore
|
||||
# Pay attention - key order matters
|
||||
# e.g., {"id": ..., "sk": ...} and {"sk": ..., "id": ...}
|
||||
# generate different MD5 hashes
|
||||
_id = md5_hash(str(keys))
|
||||
|
||||
match record.event_name:
|
||||
|
||||
Reference in New Issue
Block a user