Skip to content

fix(kiro): support IAM Identity Center accounts outside us-east-1#2009

Open
dm0x13 wants to merge 1 commit into
decolua:masterfrom
dm0x13:fix/kiro-multi-region
Open

fix(kiro): support IAM Identity Center accounts outside us-east-1#2009
dm0x13 wants to merge 1 commit into
decolua:masterfrom
dm0x13:fix/kiro-multi-region

Conversation

@dm0x13

@dm0x13 dm0x13 commented Jun 23, 2026

Copy link
Copy Markdown

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant