aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.36k stars 3.77k forks source link

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

Open olehrdk opened 1 month ago

olehrdk commented 1 month ago

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

CDK version used

2.143.1

Environment details (OS name and version, etc.)

-

khushail commented 4 weeks ago

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. @pahud ,wdyt?