Robert Chandler
04/10/2022, 8:43 PMHttpUserPoolAuthorizer
from @aws-cdk/aws-apigatewayv2-authorizers
to create a Cognito jwt authoriser I get the following error:
Is this a version incompatibility issue between SST and Cognito?
Error: construct does not have an associated node. All constructs must extend the "Construct" base class
at Function.of (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/core/node_modules/constructs/src/construct.ts:30:13)
at new Node (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/core/node_modules/constructs/src/construct.ts:75:12)
at new ConstructNode (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/core/lib/construct-compat.ts:291:24)
at Object.createNode (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/core/lib/construct-compat.ts:78:11)
at new Construct (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/core/node_modules/constructs/src/construct.ts:575:26)
at new Construct (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/core/lib/construct-compat.ts:75:5)
at new Resource (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/core/lib/resource.ts:151:5)
at new HttpAuthorizer (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/aws-apigatewayv2/lib/http/authorizer.ts:159:5)
at HttpUserPoolAuthorizer.bind (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/aws-apigatewayv2-authorizers/lib/http/user-pool.ts:59:25)
at new HttpRoute (/home/robert/code/HeyDaily/heydaily-serverless/node_modules/@aws-cdk/aws-apigatewayv2-alpha/lib/http/route.ts:196:45)
Robert Chandler
04/10/2022, 8:55 PMFrank
Robert Chandler
04/10/2022, 9:14 PMconst authorizer = new HttpUserPoolAuthorizer("InfluencerApiAuthorizer", props.auth.cognitoUserPool, {
userPoolClients: [props.auth.cognitoUserPoolClient],
});
robert@robert-XPS-15-9560:~/code/HeyDaily/heydaily-serverless$ sst --version
SST: 0.69.2
CDK: 2.15.0
Frank
@aws-cdk/aws-apigatewayv2-authorizers
in ur package.json?Robert Chandler
04/10/2022, 9:16 PM"@aws-cdk/aws-apigatewayv2-authorizers": "^1.152.0",
Frank
2.15.0-alpha.0
and then give it a try?Robert Chandler
04/10/2022, 9:17 PMRobert Chandler
04/10/2022, 9:17 PMnpm ERR! notarget No matching version found for @aws-cdk/aws-apigatewayv2-authorizers@2.15.0-alpha.0.
Frank
"@aws-cdk/aws-apigatewayv2-authorizers-alpha": "2.15.0-alpha.0"
Frank
Robert Chandler
04/10/2022, 9:19 PMimport { HttpUserPoolAuthorizer } from "@aws-cdk/aws-apigatewayv2-authorizers-alpha";
looks promisingFrank
Robert Chandler
04/10/2022, 9:20 PMFrank
Frank
Robert Chandler
04/10/2022, 9:25 PMFrank
thdxr
04/10/2022, 9:50 PM