I am using custom authentication (with custom authorizer) for accessing AWS lambda. The authorization process works fine. But I have a problem to transmit data (ex principalId) between the authorizer lambda and the business lambda. All my lambdas are developed in JS. As explain in AWS doc, in the authorizer lambda, I add few simple fields (principalId in the code below) in context field of the Auth response. But in my business lambda, I am not able to get these fields. The AWS documentation talks about $context variable.
First, could you explain me if the $context variable is another variable or the same variable than the context variable received in parameter of the JS function?
Second, could you explain me how to get in my business lambda the data field (ex: principalId) provided by the authorizer?
Seb