[{"data":1,"prerenderedAt":58},["ShallowReactive",2],{"pattern-apigw-lambda-authorizer-custom-header":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":15,"extension":16,"framework":17,"gitHub":18,"highlight":6,"introBox":24,"language":31,"level":32,"meta":33,"patternArch":34,"resources":48,"s3URL":6,"services":6,"stem":53,"testing":54,"videoId":6,"__hash__":57},"patterns\u002Fpatterns\u002Fapigw-lambda-authorizer-custom-header.json","Amazon API Gateway REST API with AWS Lambda token authorizer",null,{"text":8},[9],"Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fshaun-guo.json",{"text":13},[14],"sam deploy","Create an API with a mapping template that enriches the request with additional data from Lambda Token Authorizer.","json","AWS SAM",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-lambda-authorizer-custom-header","serverless-patterns\u002Fapigw-lambda-authorizer-custom-header","apigw-lambda-authorizer-custom-header","template.yaml",{"headline":25,"text":26},"How it works",[27,28,29,30],"This SAM template creates an API that uses additional logic from the Lambda token authorizer to add data to the request.","The data is passed to the HTTP endpoint in the form of a custom header.","This aproach can be used to inject data that downstream legacy systems expect and that is dependent on data that is available to authorizer.","The HTTP endpoint in the example returns a response showing the headers that are received.","Node.js","200",{},{"icon1":35,"icon2":40,"line1":44},{"x":36,"y":37,"service":38,"label":39},25,50,"apigw","Amazon API Gateway",{"x":41,"y":37,"service":42,"label":43},75,"lambda","AWS Lambda",{"from":45,"to":46,"label":47},"icon1","icon2","",{"bullets":49},[50],{"text":51,"link":52},"Working with API Gateway and mapping templates","https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Fmodels-mappings.html","patterns\u002Fapigw-lambda-authorizer-custom-header",{"text":55},[56],"Once the application is deployed, retrieve the API URL and a request from Postman or from a terminal using the curl command with an AuthorizationToken header of 'allow'.","A0-EBA7ZMnr8FIjwN_HIqxAuUjF7lsmo0-Gj9TLaiSw",1778846882028]