I have an API served over apigateway, that uses AWS_IAM authentication. I'm looking to use a lambda authorizer so I can implement custom authorization. I realize that I could use cognito or a custom OAuth application, and have my client send relevant auth tokens.
However my current client already sends a AWS v4 signature (for the AWS_IAM implementation), can I use that to identify the user and verify that the signature is valid?
The token received in the authorizer lambda looks like this:
AWS4-HMAC-SHA256 Credential=ASIASLKDFSLKDF923C/20200408/us-east-1/execute-api/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=2c65e09dedasdfasdfwfewfa592a60bcc2623296174e78780a2caad