I am trying to attach a custom authorizer to API using CDK.
I am using Cognito for the user management.
What I want to achieve with the custom authorizer is,
- Check whether the user has permission to use the API
- Identify the user's email (userId) and attach it to the request body
- Use that email inside the API lambda
I can't find any examples or documents regarding how to attach a custom authorizer to an API. How can I attach an custom authorizer or if it's not supported in CDK is there a work around to achieve the requirements?