Skip to content
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

(appsync): Add ability to add additional authorization mode on existing appsyn api #30398

Open
1 of 2 tasks
olehrdk opened this issue May 31, 2024 · 4 comments
Open
1 of 2 tasks
Assignees
Labels
@aws-cdk/aws-appsync Related to AWS AppSync effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p2

Comments

@olehrdk
Copy link

olehrdk commented May 31, 2024

Describe the feature

Add support for additional authorization modes on existing app sync api (retrieved by calling appsync.GraphqlApi.fromGraphqlApiAttributes)

Use Case

I have Amplify project with default Cognito user pool authorization mode. I want to add one more user pool as additional mode. Amplify does not support 2 user pools, that's why I use CDK to create one more user pool, and want to be able to add it as additional mode to my app sync api with CDK.

Proposed Solution

Add new method (addAdditionalAuthorizationModes) on IGraphqlApi similar to setupAdditionalAuthorizationModes which will add additional authorizations modes to existing app sync api.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.143.1

Environment details (OS name and version, etc.)

@olehrdk olehrdk added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 31, 2024
@github-actions github-actions bot added the @aws-cdk/aws-appsync Related to AWS AppSync label May 31, 2024
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels May 31, 2024
@khushail khushail self-assigned this May 31, 2024
@khushail
Copy link
Contributor

khushail commented Jun 7, 2024

Hi @olehrdk , thanks for reaching out. I am not very much clear about your ask here. I see these are the supported authorization modes which includes cognito user pool and here is a doc on how you could use additional authorization modes.
I highly doubt providing additional user pool would be a good idea here but we are open to inputs here.
cc : @pahud

@khushail khushail added p2 effort/medium Medium work item – several days of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Jun 7, 2024
@bschulz87
Copy link

bschulz87 commented Aug 2, 2024

I have a similar setup:

  • AppSync created via Amplify for DataStore usage
  • Multiple User Pools created via CDK

How to add these User Pools to the existing imported IGraphqlApi fromGraphqlApiAttributes?

Property 'authorizationConfig' does not exist on type 'IGraphqlApi'.

cdk --version
2.138.0

@moelasmar moelasmar self-assigned this Aug 15, 2024
@samson-keung
Copy link
Contributor

Hi @olehrdk @bschulz87 , if I understood correctly, you have a GraphqlApi that is created via Amplify (not created in CDK). And you would like to import it into CDK and make changes to it.

Modifying imported resources (e.g. a GraphqlApi instance retrieved via the fromGraphqlApiAttributes method) is not supported in CDK. Such imported resource is a read-only object. I would recommend reaching out to Amplify support about how to add additional user pool.

@bschulz87
Copy link

Yes. I am aware that CDK is built upon CloudFormation which also has no way to add User Pools to an imported AppSync Resource. Once it is possible there i would still love to see the requested feature here.

@moelasmar moelasmar added the needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. label Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-appsync Related to AWS AppSync effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p2
Projects
None yet
Development

No branches or pull requests

5 participants