Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var AWSXRay = require("aws-xray-sdk-core");
var logger = require('winston');
AWSXRay.setLogger(logger);
var AWS = AWSXRay.captureAWS(require('aws-sdk'));
var docClient = new AWS.DynamoDB.DocumentClient({
apiVersion: '2012-08-10'
});
// Table name is configured as env var.
var table = process.env.TABLE_NAME;
exports.handler = (event, context, callback) => {
console.log('Received event:', JSON.stringify(event, null, 2));
var responseBody = {
message: ""
};