Kimi Code CLI v2.7.0 Adds Native Amazon Bedrock Support via AWS Credential Chains
Moonshot AI updates Kimi Code CLI with native Amazon Bedrock support, letting developers authenticate using standard AWS credentials and SSO instead of separate API keys.

Moonshot AI has released version 2.7.0 of its open-source Kimi Code CLI, introducing a native Amazon Bedrock provider that simplifies how developers connect to foundation models on AWS. Previously, using Kimi Code with models on Amazon Bedrock required setting up a generic provider using OpenAI-compatible APIs alongside a standalone Bedrock API key. With this release, the CLI connects directly through standard AWS credential workflows, allowing developers to authenticate using named CLI profiles, AWS Single Sign-On (SSO), and IAM roles without managing extra API keys.
Simplified AWS Authentication and Under-the-Hood Operations
The native Bedrock provider alters how authorization and routing are executed between local development environments and AWS infrastructure. Rather than storing static or manually generated API keys inside configuration files, the CLI resolves credentials through the ambient AWS CLI credential chain. When an inference request is initiated, the agent relies on the @aws/bedrock-token-generator package to fetch a short-lived bearer token for Bedrock operations. These ephemeral tokens remain active for up to 12 hours or for the duration of the active AWS session.
This setup uses environment variables such as AWS_REGION or AWS_DEFAULT_REGION to construct regional bedrock-runtime endpoints. In practice, model aliases declared in the local configuration point directly to Amazon Bedrock model IDs or global inference profiles, such as global.moonshotai.kimi-k3.1. The agent then handles streaming responses, client-side tool calling, and multimodal inputs within the organization's existing AWS data boundary.
What it means for developers
For engineering teams operating inside AWS environments, the native integration removes the security burden of generating, storing, and rotating supplementary API keys. Access control can be governed directly using AWS Identity and Access Management (IAM) policies and short-term sessions backed by AWS IAM Identity Center.
Key operational details include:
- Streamlined Access Control: Authentication aligns with the principle of least privilege using standard IAM roles, reducing credential sprawl.
- Protocol and Network Customization: Developers can override default protocols—choosing between OpenAI Chat Completions, OpenAI Responses, or Anthropic Messages protocols—and route requests through private AWS VPC endpoints or Mantle endpoints via custom base URLs.
- Explicit Capability Declaration: Models such as Kimi K3.1 Pro Highspeed offer up to a 1-million-token context window and support capabilities like configurable reasoning (
thinkingandalways_thinking), image inputs (image_in), and function calling (tool_use). - Cost Optimization: Deploying models through global cross-Region inference profiles offers a 10% discount compared to standard regional inference profiles.
While native enterprise infrastructure integrations benefit heavy AWS users, developers looking for a simpler way to experiment across multiple providers can try top AI models cheaply through one API at https://apixoai.online.
Configuring and Testing the Integration
To configure the native provider, developers edit their config.toml file (located in ~/.kimi-code/ or defined by KIMI_CODE_HOME). Within the configuration file, users define the provider type as bedrock and supply environment settings like AWS_REGION and optional AWS_PROFILE names.
Because Kimi Code does not auto-detect model capabilities on Amazon Bedrock, supported features must be explicitly declared in the model configuration block. Once configured, developers can verify their permissions and network paths non-interactively by issuing a command like kimi --model <model-alias> --prompt "<test-prompt>". Because the desktop and web user interfaces may display a "connected" status without validating actual IAM permissions or network connectivity, executing a test prompt serves as the definitive verification step.
Source: Use Kimi Code CLI with models on Amazon Bedrock | Amazon Web Services — AWS Machine Learning. Written by the Apixo team from that report.
One key for Claude, GPT, GLM, DeepSeek and more. Pay per token with crypto.
Get your API key

