How to get the pure Json string from DynamoDB stream new image?

后端 未结 6 919
不知归路
不知归路 2020-12-09 18:59

I\'ve a Dynamodb table with streaming enabled. Also I\'ve created a trigger for this table which calls an AWS Lambda function. Within this lambda function, I\'m trying read

6条回答
  •  粉色の甜心
    2020-12-09 19:30

    This library do the job: dynamoDb-marshaler

    var unmarshalJson = require('dynamodb-marshaler').unmarshalJson;
    
    console.log('jsonItem Record: %j', unmarshalJson(record.dynamodb.NewImage));
    

提交回复
热议问题