-
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
(aws-apigateway): incorrect cross-region/partition LambdaAuthorizer references #18443
Comments
@ryparker @otaviomacedo how could we help expedite review of #18444 that is associated with this issue? This bug is blocking our team's multi-region deployments due to the authorizer being in a single region. |
Fixes: #18443 *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Fixes: aws#18443 *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Fixes: aws#18443 *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
What is the problem?
The existing ARN reference mechanism used by the
TokenAuthorizer
only allows pointing to lambdas on the sameaccount
.Both the partition and the region are being incorrectly inferred from the stack where the reference itself was defined instead from what it refers to.
More concretely:
cdk.Stack.of(fn).region
refers toREGION-A
, not the desired/expectedREGION-B
.Reproduction Steps
Given the following Stack
Stack
What did you expect to happen?
The
authorizerUri
should be setus-east-1
After manually editing the Authorizer on the console:
What actually happened?
The
authorizerUri
was set to the incorrect region (e.g.us-east-2
)CDK CLI Version
1.137.0
Framework Version
No response
Node.js Version
v12.22.9
OS
mass Big Sur 11.6.1
Language
Typescript
Language Version
TypeScript (4.5.4)
Other information
Co-authored-by: Sam Hewitt [email protected]
Co-authored-by: Cameron Sumpter [email protected]
The text was updated successfully, but these errors were encountered: