Kiro Provider
Access Amazon CodeWhisperer (AWS) models through Kiro OAuth authentication with flexible browser modes and IDE token import.Quick Start
Authentication
OAuth Flow
OAuth Specifics:
- Flow Type: Authorization Code (browser-based)
- Callback Port: Provider-specific port
- Token Format:
kiro-{oauth}-{profile_id}.json - Account ID: Extracted from filename (not email-based)
Browser Mode Control
Kiro supports browser mode customization for reliability:- Normal Browser (Default)
- Incognito Mode
- Saves AWS SSO credentials
- Faster re-auth on token expiry
- More reliable on Linux
Configuration
Set default browser mode in~/.ccs/config.yaml:
On Linux, incognito mode often fails for AWS OAuth. Keep
kiro_no_incognito: true for best reliability.Token Import from Kiro IDE
Skip browser OAuth by importing existing token from Kiro IDE:How Import Works
IDE Config Locations (platform-dependent):
- Linux:
~/.config/kiro/or~/.kiro/ - macOS:
~/Library/Application Support/Kiro/ - Windows:
%APPDATA%\Kiro\
Multi-Account Support
Kiro uses filename-based account identification (no email):Account Identification
Pattern:kiro-{oauth}-{profile_id}.json → {oauth}-{profile_id}
Example:
- Token file:
kiro-github-ABC123.json - Account ID:
github-ABC123 - Nickname: Auto-generated from ID or custom via
--nickname
Account Commands
Configuration
Config Keys
Configure via~/.ccs/config.yaml:
Environment Variables
Auto-managed by CCS. Manual override rarely needed.
Commands Reference
Basic Usage
Authentication Commands
Browser Mode
Account Management
Troubleshooting
OAuth Fails on Linux
Symptom: Browser opens but OAuth callback never completes Cause: Incognito mode unreliable on Linux Solution: Ensure normal browser mode enabled:--no-incognito flag explicitly:
Token Import Fails
Symptom:ccs kiro --import returns “Token not found”
Cause: Kiro IDE not installed or not authenticated
Solution: Install Kiro IDE and sign in first, or use standard OAuth:
AWS SSO Session Expired
Symptom: API errors after token expiry Solution: Re-authenticate:Wrong Account Being Used
Symptom: Unexpected AWS account in use Solution: Check default account:Storage Locations
| Path | Description |
|---|---|
~/.ccs/cliproxy/auth/kiro-*.json | OAuth tokens (one per account) |
~/.ccs/cliproxy/accounts.json | Account registry, nicknames |
~/.ccs/cliproxy/config.yaml | CLIProxy configuration |
~/.ccs/config.yaml | Global CCS config (browser mode) |
Token Structure
Kiro OAuth token file format:kiro-{oauth}-{profile_id}.json
Account Identification: Extracted from filename (no email field)
AWS SSO Details
Authorization Flow
- Browser opens AWS SSO login page
- User signs in with Builder ID or IAM credentials
- AWS redirects to CCS callback server
- OAuth token cached locally
- CLIProxyAPI uses token for CodeWhisperer API calls
Token Refresh
- Automatic refresh via
refresh_token - Triggered when
access_tokenexpires - Graceful re-auth prompt if refresh fails
- Normal browser mode speeds up re-auth (credentials cached)
Advanced Features
Import Mechanism
Token Import Flow:- Scan IDE paths (OS-specific)
- Read config files (JSON/TOML format)
- Extract OAuth credentials
- Validate token structure
- Copy to CCS auth directory
- Register in accounts.json
Browser Mode Rationale
Why--no-incognito is Default:
- Linux Compatibility: Incognito mode has known issues with AWS OAuth on Linux
- UX: Faster re-auth when credentials cached in normal browser
- Security Trade-off: Acceptable for single-user machines, override for shared systems
Cost Information
| Tier | Access | Cost |
|---|---|---|
| AWS Builder ID | Individual developers | Free tier available |
| IAM Identity Center | Enterprise | AWS subscription required |
