Skip to content

Commit 9657467

Browse files
authored
fix(utilities): DDB Large numbers
Signed-off-by: Simon Thulbourn <[email protected]>
1 parent 62ec234 commit 9657467

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

aws_lambda_powertools/utilities/data_classes/dynamo_db_stream_event.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ def _deserialize_bool(self, value: bool) -> bool:
7373
return value
7474

7575
def _deserialize_n(self, value: str) -> Decimal:
76+
if len(value) > 38:
77+
l = len(value[38:]) - len(value[38:].rstrip('0'))
78+
value = value[:-l]
79+
7680
return DYNAMODB_CONTEXT.create_decimal(value)
7781

7882
def _deserialize_s(self, value: str) -> str:

0 commit comments

Comments
 (0)