aws-dynamodb-stream-eventbridge-fanout icon indicating copy to clipboard operation
aws-dynamodb-stream-eventbridge-fanout copied to clipboard

Options to push unmarshall(ed) payload or keep the case of data type attribute name

Open stewarthou-cxz opened this issue 5 years ago • 0 comments

Hi there,

This project helped us a lot on dynamoDB to event bridge integration, Thanks!

However the data we have in event bridge looks like this

"newImage": {
  "address": {
    "m": {
      "country": {
        "s": "Australia"
      },
      "postcode": {
        "s": "3008"
      },
      "suburb": {
        "s": "Knoxfield"
      },
      "state": {
        "s": "Victoria"
      },
      "line2": {
        "s": ""
      },
      "line1": {
        "s": "1 Main Street"
      }
    }
  },
  "id": {
    "s": "41c86759-cd87-4352-81b4-e436572a4df6"
  }
}

The data type attribute name has been changed to s, m instead of S and M. as the result in nodejs aws-sdk.DynamoDB.Converter.unmarshall() does not work anymore, we have to convert all DynamoDB data type attributes to upper cases in consumers.

stewarthou-cxz avatar Aug 09 '20 03:08 stewarthou-cxz