https://serverless-stack.com/ logo
#help
Title
# help
u

Uncharted

05/22/2022, 11:04 AM
Hello I create a lambda authorizer, when I set resultsCacheTtl with '0 seconds' it works perfectly and when I put '30 seconds" the first call works and it seems to reject until the next 30s : any idea of what could be wrong ? The authorizer is defined as the example in the doc :
Copy code
const authHandler = new sst.Function(stack, 'AuthorizerFn', {
    handler: 'src/authorizer.authorize',
  });
and in api
Copy code
authorizers: {
      LambdaAuthorizer: {
        type: 'lambda',
        function: authHandler,
        resultsCacheTtl: '0 seconds',
      },
    },
f

Frank

05/25/2022, 5:14 PM
Hey @Uncharted are you still having this issue?
when I put ’30 seconds” the first call works and it seems to reject until the next 30s
When you say
the first call works
, do u mean the Lambda function handling the route got invoked?
u

Uncharted

05/25/2022, 5:15 PM
Hello yes i still have the problem
yes the lambda is invoked
and then it s not invoked
and I got an internal message error in response
until the next 30 s
f

Frank

05/25/2022, 5:17 PM
i see.. is this running in
sst start
or after u
sst deploy
?