# Shared Authorizer in httpApi

**URL:** <https://forum.serverless.com/t/shared-authorizer-in-httpapi/19893>\
**Category:** Serverless Framework\
**Tags:** aws, api-gateway\
**Created:** [January 27, 2024, 6:21pm UTC](https://forum.serverless.com/t/shared-authorizer-in-httpapi/19893 "2024-01-27T18:21:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gchokeen](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/gchokeen/32/7779_2.png) [@gchokeen](https://forum.serverless.com/u/gchokeen)\
**Post date:** [January 27, 2024, 6:21pm UTC](https://forum.serverless.com/t/shared-authorizer-in-httpapi/19893/1 "2024-01-27T18:21:27Z")

</div>

Hi,  
I have default service and I defined custom authorizer with in that service

```auto
service: default-service
  httpApi:
    authorizers:
      authorizer:
        type: request
        functionName: authorizer
        identitySource: $request.header.Authorization
        enableSimpleResponses: true
      tenantAuthorizer:
        type: request
        functionName: tenantAuthorizer
        identitySource: $request.header.Tenantid
        enableSimpleResponses: true
    cors:
      allowedOrigins:
        - http://localhost:4200
      allowedHeaders:
        - Content-Type
        - Authorization
        - Tenantid
functions:
  apigateway:
    handler: index.handler
    events:
      - httpApi: "*"
  authorizer:
    handler: src/authorizer.handler

  tenantAuthorizer:
    handler: src/tenantAuthorizer.handler

```

I would like to refer these authorisers in the other service

```auto
tenantCreate:
  handler: src/handler.create
  events:
    - httpApi:
        path: /tenants
        method: post
        authorizer:
          type: request
          id:
            Ref: tenantAuthorizer

```

I also tried hardcoded id instead of tenantAuthorizer. but I got cloud formation error.  
Please help me to achive shared authoriser?
