Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var AWS = require('aws-sdk');
var s3 = new AWS.S3();
var config = require('./configure');
var helper = require('./helper');
const log = require('lambda-log');
const Format = require("@nativedocuments/docx-wasm/formats");
// ND_LICENSE_URL, or ND_DEV_ID and ND_DEV_SECRET are read from environment
// If using the S3 trigger, S3_BUCKET_OUTPUT should be set there as well
// See README for more details
// debug messages?
if (process.env.DEPLOY_ENV !== 'PROD') {
log.options.debug = true;
}
// The use case for this app is to output PDF.
// But if your use case is binary .doc to docx conversion,
// change this to Format.DOCX
var outputAs = Format.PDF;
var srcBucket;
var srcKey;
var dstBucket;
var dstKey;
var INITIALISED = false;