Created
December 6, 2018 16:58
-
-
Save MikeGarde/e7abffcf63bab6aaba9b9e87695e68e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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