fix(kiro): support IAM Identity Center accounts outside us-east-1#2009
Open
dm0x13 wants to merge 1 commit into
Open
fix(kiro): support IAM Identity Center accounts outside us-east-1#2009dm0x13 wants to merge 1 commit into
dm0x13 wants to merge 1 commit into
Conversation
Kiro/CodeWhisperer endpoints were hardcoded to us-east-1. IAM Identity Center (IdC) accounts homed in another region (e.g. eu-central-1) fail: the data-plane returns 403 "bearer token invalid", and ListAvailableProfiles returns an empty profile list from us-east-1, so the account falls back to the shared default profileArn and is rejected again. Thread providerSpecificData.region (already captured by the IdC device flow) through the runtime paths, defaulting to us-east-1 so Builder ID / social / api-key accounts are unaffected: - kiroConstants: add resolveKiroRegion / resolveKiroDataPlaneUrl / resolveKiroControlPlaneHost (single source of truth). - KiroExecutor.getOrderedBaseUrls: route non-default regions to the regional Amazon Q data-plane endpoint. - fetchKiroProfileArn(accessToken, region): query the regional control-plane host so the profile resolves at login/refresh; pass region at both call sites (device-flow login in providers.js, refresh in tokenRefresh/providers.js). - getKiroUsage: region-aware usage hosts. Adds tests/unit/kiro-region.test.js.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes Kiro / CodeWhisperer region-aware so IAM Identity Center accounts outside us-east-1 work (data-plane, profile resolution, usage). Defaults to us-east-1, so existing accounts are unaffected. See the commit message for full details. Adds tests/unit/kiro-region.test.js.