Open faizhasim opened 7 years ago
I rewrote the code in ES5, supported natively by node 4.3 and remove babelify transformation. I still run into the same problem.
If I totally remove browserfiy, it works fine.
const processConfigTables = require('provision-dynamodb');
module.exports.hello = (event, context, callback) => {
processConfigTables([{
"name":"test-table",
"readStrategy": {
"name":"capacity-ratio",
"upperThresholdRatio":0.8,
"lowerThresholdRatio":0.15,
"incrementRatio":3,
"decrementRatio":0.8,
"lowerBoundUnit":1,
"upperBoundUnit":28},
"writeStrategy": {
"name":"capacity-ratio",
"upperThresholdRatio":0.8,
"lowerThresholdRatio":0.15,
"incrementRatio":3,
"decrementRatio":0.8,
"lowerBoundUnit":1,
"upperBoundUnit":28
}
}]).then(result => {
const response = {
statusCode: 200,
body: JSON.stringify({ok: true}),
};
return callback(null, response);
}).catch(err => {
return callback(null, {
statusCode: 500,
body: JSON.stringify(err),
});
});
};
I am requiring a module [provision-dynamodb]() in my serverless project (in which I'm one of the authors, so I can make changes to that module, if needed). Execution in lambda fails.
This is my lambda function:
I got this error: