Example of a service that uses API Gateway custom authorizer feature to authorize your endpoints.
serverless install --url https://github.com/eahefnawy/serverless-authorizercd serverless-authorizerserverless deploy- Notice the displayed endpoint after deployment
curl --header "Authorization: allow" <endpoint>- Should work! Authorized!curl --header "Authorization: deny" <endpoint>- Should not workcurl --header "Authorization: unauthorized" <endpoint>- Should not workcurl --header "Authorization: blabla" <endpoint>- Should not workcurl <endpoint>- Should not work