After days of trial and error, I finally managed to get signin/signup working in VueJS with AWS Cognito. I have an idToken and accessToken and would like to pass that on to my Lambda function.

I read something about the API Gateway which has options for authentication, but there's no simple explanation how this all works together.

Any suggestions or hints how to move forward?

* Use aws-sdk within the function and somehow get the username/userid?
* Use the API Gateway to pass on the user before the function is invoked?