Wednesday, 25 July 2018

Testing/Mocking request headers for Lambda function

I have a simple node app that will eventually become a Lambda function, used by API Gateway on AWS.In the real world Lambda/API Gateway usage, the request will be forwarding headers with authorization token to the Lambda function which it will need to authorize.So I am trying to understand the best way to mock this in local development as stand alone node app that will be easily transferable to Lambda function, and in turn, test the passing of this authorization to the stand alone node app.I've thought about using Express in the local version, but I'm not sure I want to go to that length or if there is a simpler way I can mock the request header to get my local dev going?

Submitted July 26, 2018 at 03:30AM by mgeez

No comments:

Post a Comment