UNPKG

@codegenie/serverless-express

Version:

This library enables you to utilize AWS Lambda and Amazon API Gateway to respond to web and API requests using your existing Node.js application framework.

23 lines (19 loc) 388 B
const getRequestValuesFromSqs = ({ event }) => { const method = 'POST' const headers = { host: 'sqs.amazonaws.com' } const body = event return { method, headers, body } } const getResponseToSqs = ({ body }) => { try { return JSON.parse(body) } catch (error) {} } module.exports = { getRequest: getRequestValuesFromSqs, getResponse: getResponseToSqs }