Skip to content

Instantly share code, notes, and snippets.

@MikeGarde
Created December 6, 2018 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MikeGarde/e7abffcf63bab6aaba9b9e87695e68e3 to your computer and use it in GitHub Desktop.
Save MikeGarde/e7abffcf63bab6aaba9b9e87695e68e3 to your computer and use it in GitHub Desktop.
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