-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
apigateway: Can't override authorization_type on child resource if parent resource uses a custom authorizer #29658
Comments
Thanks for reporting this issue. It looks like it may be a duplicate of #8827, can you confirm? |
@tim-finnigan yep, looks like a duplicate to me! Edit: I'm also kvncp - work vs personal accounts :) |
Thanks for confirming, I'll close this in favor of tracking the other issue. |
|
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the bug
When setting the default authorization method on an API gateway resource to CUSTOM, the CDK logic prevents overriding this authorization on child resources to anything other than a Custom resource.
Attempts to override the authorizer type will fail with the message "Error: ApigwBugStack/api/Default/unauthenticated_endpoint/GET - Authorization type is set to NONE which is different from what is required by the authorizer [CUSTOM]"
Expected Behavior
It should be possible to override a child resource with a different authorization type.
Current Behavior
CDK failed with the error mentioned in the description.
Reproduction Steps
This repro can be found here: https://github.com/kvncp/cdk-repro/blob/main/apigw-bug/apigw_bug/apigw_bug_stack.py
Possible Solution
When setting the
authorization_type
on a child resource, CDK should not fail if a custom authorizer was set on a parent resource.Additional Information/Context
No response
CDK CLI Version
2.134
Framework Version
No response
Node.js Version
20.0.0
OS
OSX 12.2
Language
Python
Language Version
3.10
Other information
No response
The text was updated successfully, but these errors were encountered: