# Shared Lambda authorizer

**URL:** <https://forum.serverless.com/t/shared-lambda-authorizer/6447>\
**Category:** Serverless Framework\
**Tags:** aws, lambda, api-gateway\
**Created:** [November 14, 2018, 12:10pm UTC](https://forum.serverless.com/t/shared-lambda-authorizer/6447 "2018-11-14T12:10:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan1](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@Dan1](https://forum.serverless.com/u/Dan1)\
**Post date:** [November 14, 2018, 12:10pm UTC](https://forum.serverless.com/t/shared-lambda-authorizer/6447/1 "2018-11-14T12:10:40Z")

</div>

I am trying to create a custom Lambda authorizer that will be shared between a few different services/serverless stacks. If I understand the documentation here [https://serverless.com/framework/docs/providers/aws/events/apigateway/#note-while-using-authorizers-with-shared-api-gateway](https://serverless.com/framework/docs/providers/aws/events/apigateway/#note-while-using-authorizers-with-shared-api-gateway), that means that I need to create a shared authorizer resource in a “common resources” service/serverless stack, and then refer to that shared authorizer from my other services. First of all: Is my understanding correct?

If my understanding is correct, my next question becomes: How do I do this? The documentation doesn’t provide a clear example for lambda authorizers, so here’s how I tried to customize it:

> functions:  
> authorizerFunc:  
> handler: authorizer/authorizer.handler  
> runtime: nodejs8.10
> 
> resources:  
> Resources:  
> authorizer:  
> Type: AWS::ApiGateway::Authorizer  
> Properties:  
> AuthorizerResultTtlInSeconds: 0  
> Name: Authorizer  
> Type: REQUEST  
> AuthorizerUri: ???  
> RestApiId:  
> Fn::ImportValue: myRestApiId

I don’t understand what the syntax for AuthorizerUri is supposed to be. I’ve tried “Ref: authorizerFunc”, “Fn::GetAtt: [authorizerFunc, Arn]” etc. to no avail.

When I get the authorizerUri working, do I just add an Output for my authorizer resource, then Fn::ImportValue it from the services containing my API Lambdas?
