-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
backend.data.resources.graphqlApi.modes
is empty even when modes are defined
#2644
Comments
Hey @kwwendt, thanks for raising this. Have you tried |
Hey @AnilMaktala - it's not a matter of needing access to auth modes but being able to reference the Subset of code pulled from above:
Location in the CDK code where it checks for IAM in the |
Marking this is as a bug as I was able to reproduce it consistently as well. The |
Support for the We're currently using version Since this is a newer AppSync CDK construct feature that was not available at the time of GA release for Amplify Gen2, I think this issue should be labeled a feature request. I will discuss with the team whether there are blockers to upgrading our |
Our most recent CDK upgrade only went to 2.129.0 because of problems we encountered attempting to migrate to a higher version--specifically, we had issues with some functions in the Gen 1 CLI. We have a plan to split this repo into Gen 1 and Gen 2 branches, which will enable us to iterate and upgrade the Gen 2 branch more easily. We haven't yet started work on that project, but will keep this request in mind when we finish it. |
We upgraded the CDK version in |
This was released in @aws-amplify/graphql-api-construct@1.13.0, @aws-amplify/data-construct@1.10.1. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Environment information
Data packages
Description
The
modes
attribute is empty even thoughIAM
is included by default and my API also hasAMAZON_COGNITO_USER_POOLS
added as an auth mode.Root cause (most likely): in
construct-export.ts
Code link reference, the authorization modes aren't passed into thefromGraphqlApiAttributes
method. Further investigation shows that the CDK implementation of that method setsmodes
to an empty array if the attribute isn't passed as part of the method CDK code reference.Recommendation: modify the
construct-export.ts
file to pull in the L2 construct vs importing it from theL1
construct OR explicitly pass the other attributes for thefromGraphqlApiAttributes
method.Impact: Without this, I am unable to use the Amazon EventBridge AppSync target L2 construct. That construct checks for
IAM
as an included auth mode and fails when I passbackend.data.resources.graphqlApi
to the construct. Example code below to reproduce.The text was updated successfully, but these errors were encountered: