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)
}
asked Mar 27, 2020 at 14:59
user12423529
1 Answer 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
user3601546
2981 gold badge6 silver badges15 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
lang-js
aws-lambda-routerpackage can be used: npmjs.com/package/aws-lambda-router