# Lambda is not called after authorizer

**URL:** <https://forum.serverless.com/t/lambda-is-not-called-after-authorizer/18629>\
**Category:** Serverless Framework\
**Tags:** lambda, api-gateway\
**Created:** [March 28, 2023, 5:23pm UTC](https://forum.serverless.com/t/lambda-is-not-called-after-authorizer/18629 "2023-03-28T17:23:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pn2075](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/pn2075/32/7405_2.png) [@pn2075](https://forum.serverless.com/u/pn2075)\
**Post date:** [March 28, 2023, 5:23pm UTC](https://forum.serverless.com/t/lambda-is-not-called-after-authorizer/18629/1 "2023-03-28T17:23:05Z")

</div>

I have this authorizer function which return this response if allow:

```auto
"principalId": principal,
        "policyDocument":{
            "Version" : "2023-03-28",
            "Statement": [
                {
                    "Action": "execute-api:Invoke",
                    "Effect": "Allow",
                    "Resource": "*",
                }
            ],
        },

```

I have tested it using sls offline, if it passed and return this response, it triggers the lambda that I’m calling. But when I get to deploy it on the actual server, for some reason the lambda after authorizer does not get call at all. I’m not sure if it something that I set up in serverless.yml or what’s wrong with it.

What I expect and it work offline:  
Request → Authorizer (allow) → lambda trigger  
But what I get is:  
Request → Authorizer (allow)  
There’s no sign of lambda being trigger at all. Is there anything I need to check for this? Normally on sls offline if the response is incorrect it would show the error like:

```auto
Authorization function returned an error response: (λ: authorizer)

```

But I don’t think I can find that online
