Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(apigateway): set authorization scope when authorization type is C…
…ognito (#30035) ### Issue # (if applicable) Closes #29781 ### Reason for this change Authorization scope is set even when the auth type is None. This will cause deployment failure >12:52:11 PM | CREATE_FAILED | AWS::ApiGateway::Method | ActionsApiGatewayI...oxyOPTIONS041B022A Resource handler returned message: "Invalid Method authorization type specified. Authorization Scopes are only valid for COGNITO_USER_POOLS authorization type (Servic e: ApiGateway, Status Code: 400, Request ID: f9c6357b-428e-42a8-884c-07b77939d165)" (RequestToken: bb8de2e9-37b7-ca15-9bd8-547bc7eea134, HandlerErrorCode: InvalidRequ est) ### Description of changes Check when auth type is not Cognito, set auth scope to none. Not a breaking change because original templates cannot deploy. ### Description of how you validated changes All existing and new tests pass. ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information