Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var parseString = require('xml2js').parseString;
exports.handler = function (event, context, callback) {
parseString(event.body, function (err, result) {
event.body = result;
let respondToGateway = {
statusCode: '200',
body : JSON.stringify({
event: event,
context: context
}),
headers : {
'Content-Type': 'application/json'
}
};
callback(null, respondToGateway);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment