Actually the same question as this. but I need solution for Python. Does AWS Python SDK support converting DynamoDB docs to JSON within Python Lambda function? In other words I need something like dynamodb-json lib within my Lambda.
            Asked
            
        
        
            Active
            
        
            Viewed 1,513 times
        
    1 Answers
1
            you can do something like this :
from boto3.dynamodb.types import TypeDeserializer
def _deserialize(raw_data):
    result = {}
    if not raw_data:
        return result
    deserializer = TypeDeserializer()
    for key, val in raw_data.items():
       result[key] = deserializer.deserialize(val)
    return result 
 
    
    
        Reza Nasiri
        
- 1,360
- 1
- 6
- 19
