I am trying to use the aws Java API to create a lambda function that gets triggered on updates to a table in Dynamo DB. I was referring to tutorials in Amazon website (http://docs.aws.amazon.com/lambda/latest/dg/with-dynamodb-create-package.html). The code gets executed without issues but when i see the logs in cloudwatch,i see that the output(record.getDynamodb()) is not in JSON format. Whereas if i use node.js to create the lambda function, the output is in JSON format. Jusy trying to understand what needs to be done to get the output in JSON format. Plese help
public String handleRequest(DynamodbEvent ddbEvent, Context context) {
for (DynamodbStreamRecord record: ddbEvent.getRecords()) {
System.out.println(record.getDynamodb());
}
}