API Gateway: CDK fails to attach a cognito user pool authorizer to the construct #29535
Labels
@aws-cdk/aws-cognito
Related to Amazon Cognito
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
After defining a Cognito HalAuthorizer in openapi yaml (security Schema and endpoint) and attempting to correlate that with a CognitoUserPoolAuthorizer created in an API Gateway construct, the follow error results:
Expected Behavior
The Authorizer should be attached to the REST API and the CDK deployment should succeed.
Current Behavior
CDK fails to attach the Cognito Authorizer and the Rest API creation is inconsistent.
Reproduction Steps
See #7377, which is related to the same issue but mention a case where separate stacks are used.
Possible Solution
The bug seems to be in CognitoUserPoolsAuthorizer object and related to the following lines:
Additional Information/Context
No response
CDK CLI Version
2.130.0 (build bd6e5ee)
Framework Version
Python 3.11.2
Node.js Version
N/A
OS
MacOS
Language
Python 3.11.2
Language Version
Python 3.11.2
Other information
No response
The text was updated successfully, but these errors were encountered: