1

I have AWS Api Gateway, that invokes Lambda function on AWS. How would I achieve Routing using express or any module which could work. Following is my basic lambda function

exports.handler = (event, context, callback)
{
 callback(null, 'Hello From Lambda)
}
John Rotenstein
273k28 gold badges455 silver badges540 bronze badges
asked Mar 27, 2020 at 14:59
3
  • Perhaps the aws-lambda-router package can be used: npmjs.com/package/aws-lambda-router Commented Mar 27, 2020 at 15:36
  • @user3601546 Thank you, that's exactly what I needed Commented Mar 27, 2020 at 16:31
  • @user3601546 Please make it as an answer so that can mark it right Commented Mar 28, 2020 at 10:05

1 Answer 1

1

I suggest to use the aws-lambda-router package.

It's a library for AWS Lambda providing routing for API Gateway, Proxy Integrations, SNS and S3 Events.

More info: https://npmjs.com/package/aws-lambda-router

answered Mar 28, 2020 at 16:35
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.