private async authInvoke(req: Request, res: Response){
return await lambda.invoke({
FunctionName: "integration-api-prod-login",
InvocationType: "RequestResponse",
Payload: JSON.stringify(
{
"body": { "key": req.body.key },
"requestContext": {
"identity": {
"sourceIp": req.apiGateway.event.requestContext.identity.sourceIp
}
}
}
)
}).promise().catch(
error => {
console.log(error)
res.json(error);
}
);
}
Created
May 5, 2023 01:42
-
-
Save tiagofrancafernandes/17b26cef023ac084cc95cc7aa6946149 to your computer and use it in GitHub Desktop.
dev-aws
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment