Followed the upgrade procedures to cdk v2 and the ...
# help
t
Followed the upgrade procedures to cdk v2 and the experimental apigatewayv2-authorizers is giving me this issue
Copy code
TypeError: Cannot read property ‘Symbol(@aws-cdk/core.Stack.myStack)’ of undefined
    at Function.of (/node_modules/aws-cdk-lib/core/lib/stack.ts:67:20)
    at lambdaAuthorizerArn (/node_modules/@aws-cdk/aws-apigatewayv2-authorizers-alpha/lib/http/lambda.ts:96:23)
    at HttpLambdaAuthorizer2.bind (/node_modules/@aws-cdk/aws-apigatewayv2-authorizers-alpha/lib/http/lambda.ts:70:24)
r
It could be that the way the authorizers are defined in the stack is slightly different. New way is:
Copy code
const basicAuthHandler = new sst.Function(this, 'basicAuthHandler', {
      handler: 'src/main/handlers/auth/some.handler',
    });

    const basicAuthoriser = new apigAuthorizers.HttpLambdaAuthorizer('basic-authorizer', basicAuthHandler, {
      authorizerName: 'lambdaBasicAuthoriser',
    });
t
Thank you - trying this right now
f
Thanks @Ross Coundon
@Tony J did you get this to work?
t
Yes worked thank you!