Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • ARGH.. what an awful API that it requires that M thing aws.DynamoDB.Converter.output({ 'M': record.dynamodb.NewImage }) Commented Jun 14, 2017 at 9:04
  • AWS.DynamoDB.Converter.output is the part of the DocumentClient that translates DynamoDB AttributeValue objects to JSON-style objects. I assumed the M was part of the data you got in the stream event. Commented Jun 14, 2017 at 17:29
  • 4
    I opened a PR to improve the API by adding a marshall function that doesn't require the M key, and it was included in version 2.71.0 of the SDK. Commented Jun 15, 2017 at 21:35
  • 1
    Worked fine for me as of April 2020 using the AWS SDK Javascript API. Thanks a lot! Commented Apr 20, 2020 at 10:44
  • I know this is an old answer but this is not working for me and it seems related to the fact that a query can return a mix of json that can be decorated or not with datatyping. For exemple this doesn't work : { "Items": [ { "entityType": { "S": "member" } } ], "Count": 1, "ScannedCount": 1 }... will result in : { Items: undefined, Count: undefined, ScannedCount: undefined } .. even array [] alone doesn't work. Commented Aug 18, 2021 at 14:20