DynamoDB - with Serverless
Consider this Lambda function triggered by a DynamoDB Stream event that logs the "NewImage" of the record:
exports.handler = async (event) => {
event.Records.forEach(record => {
console.log(JSON.stringify(record.dynamodb.NewImage));
});
};What will be logged if an item with {"userId": "789", "active": true} is inserted?