Enable Amazon API Gateway Custom Authorization - Amazon API Gateway
docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html?adbsc=docs_20160227_58439126
From the page
Saved with the link. Notes from 2007 to 2016 are mostly the page's own words, so this is probably an excerpt.
With Amazon API Gateway custom authorization, you can control access to your APIs using bearer token authentication strategies, such as OAuth or SAML. To do so, you provide and configure a custom authorizer, a Lambda function you own, for API Gateway to use to authorize the client requests for the configured APIs.