Amplify CLI Version
14.2.5
Question
Hi, i can not manage Lambda Authorizer appsync auth for my custom query getComponentFiltered(id: ID!, organizationID: String): Component , which is using custom resolvers created with amplify add custom and then selecting CDK option. My custom VTL resolvers are created in backend and present locally in 'amplify\backend\custom\CustomResolvers\' folder along with 'cdk-stack.ts' and *.vtl files
real problem: when i invoke this query (either from client or from appsync web-console with a selection of Lambda Authorizer) i'm getting this error:
{
"data": {
"getComponentFiltered": null
},
"errors": [
{
"path": [
"getComponentFiltered"
],
"data": null,
"errorType": "Unauthorized",
"errorInfo": null,
"locations": [
{
"line": 2,
"column": 3,
"sourceName": null
}
],
"message": "Not Authorized to access getComponentFiltered on type Query"
}
]
}
my appsync has been set-up with Cognito UserPool as a default authorization method, with AWS_LAMBDA as a secondary method.
I tried adding @aws_lambda @aws_cognito_user_pools directives to my query in schema.graphql, but it leads to the fact that my custom resolvers are not detected anymore, as it seems appsync auto-generates own VTL templates based on these directives.
My question: is there a way to attach both AWS_LAMBDA and UserPool authentication capabilities to custom query with custom resolvers?
I am using Amplify JS Gen.1 v6 API (Transformer v2)
Amplify CLI Version
14.2.5
Question
Hi, i can not manage Lambda Authorizer appsync auth for my custom query
getComponentFiltered(id: ID!, organizationID: String): Component, which is using custom resolvers created withamplify add customand then selecting CDK option. My custom VTL resolvers are created in backend and present locally in 'amplify\backend\custom\CustomResolvers\' folder along with 'cdk-stack.ts' and *.vtl filesreal problem: when i invoke this query (either from client or from appsync web-console with a selection of Lambda Authorizer) i'm getting this error:
{ "data": { "getComponentFiltered": null }, "errors": [ { "path": [ "getComponentFiltered" ], "data": null, "errorType": "Unauthorized", "errorInfo": null, "locations": [ { "line": 2, "column": 3, "sourceName": null } ], "message": "Not Authorized to access getComponentFiltered on type Query" } ] }my appsync has been set-up with Cognito UserPool as a default authorization method, with AWS_LAMBDA as a secondary method.
I tried adding
@aws_lambda @aws_cognito_user_poolsdirectives to my query in schema.graphql, but it leads to the fact that my custom resolvers are not detected anymore, as it seems appsync auto-generates own VTL templates based on these directives.My question: is there a way to attach both AWS_LAMBDA and UserPool authentication capabilities to custom query with custom resolvers?
I am using Amplify JS Gen.1 v6 API (Transformer v2)