Live
Cloudflare Images Analytics Dashboard Adds 30‑Day Delivery VisibilityAmazon ECS Adds Native Blue/Green, Canary, and Linear Deployments for Safer Container RolloutsGemini agentic tools add LLM‑driven automation to Partner Marketing StudioGitHub Actions makes RHEL 9/10 runner images generally available for larger workloadsIntegrating Decider Models to Reduce Latency and Cost in AI Agent WorkflowsAWS Emulator Enables Local Testing of 200+ Services, but Lacks IAM ValidationSageMaker AI monitoring adds automatic latency drift, idle GPU, and configuration gap detection for inference endpointsEmbedding Proactive Governance into Enterprise‑Scale Agentic AICloudflare Images Analytics Dashboard Adds 30‑Day Delivery VisibilityAmazon ECS Adds Native Blue/Green, Canary, and Linear Deployments for Safer Container RolloutsGemini agentic tools add LLM‑driven automation to Partner Marketing StudioGitHub Actions makes RHEL 9/10 runner images generally available for larger workloadsIntegrating Decider Models to Reduce Latency and Cost in AI Agent WorkflowsAWS Emulator Enables Local Testing of 200+ Services, but Lacks IAM ValidationSageMaker AI monitoring adds automatic latency drift, idle GPU, and configuration gap detection for inference endpointsEmbedding Proactive Governance into Enterprise‑Scale Agentic AI
AWS

Native Bedrock Provider in Kimi Code CLI Removes the Need for Separate API Keys

AI SummaryPowered by AI

Kimi Code CLI version 2.7.0 adds a built‑in Bedrock provider that leverages the standard AWS credential chain instead of a dedicated Amazon Bedrock API key. This change simplifies credential management and aligns the tool with existing AWS authentication practices, which matters to engineers who must secure and automate AI workloads.

The latest Kimi Code CLI release (v2.7.0) introduces a native bedrock provider that automatically uses the AWS CLI credential chain—named profiles, SSO, or default credentials—so you no longer have to provision a separate Bedrock API key. For anyone building or operating AI‑assisted tooling on Amazon Bedrock, this removes an extra secret to store, rotate, and protect.

What’s New in Kimi Code CLI

The new provider changes the connection model in three concrete ways:

  • Credential source. The CLI now reads AWS_PROFILE, AWS_REGION, or the default environment chain, just like any other AWS SDK call.
  • Automatic token generation. Internally it invokes @aws/bedrock-token-generator to create a short‑lived Bedrock bearer token, refreshing it as needed.
  • Endpoint inference. The provider derives the correct regional bedrock-runtime endpoint from the model identifier, with an override option for custom URLs.

How the Native Provider Works

  1. Resolve AWS credentials. If no explicit api_key is set, the provider follows the standard AWS credential resolution order, allowing you to select a profile via AWS_PROFILE or rely on SSO‑backed credentials.
  2. Generate a short‑lived bearer token. Using the @aws/bedrock-token-generator package, the CLI creates a temporary Bedrock token that supersedes any manually supplied API key. An explicit api_key still wins if provided.
  3. Build the regional endpoint. The provider reads AWS_REGION (or AWS_DEFAULT_REGION) and constructs the appropriate bedrock-runtime URL for the model’s API format. For Moonshot Kimi models this resolves to the OpenAI‑compatible Chat Completions path.
  4. Invoke the inference profile. The model alias (e.g., global.moonshotai.kimi-k3.1) maps to a Bedrock model or inference profile. The global. prefix selects the profile, while the region determines the endpoint that receives the request.

Operational and Security Considerations

Switching to the native provider has several practical implications:

  • Reduced secret surface. You no longer need to store a long‑term Bedrock API key, which lowers the risk of credential leakage.
  • Short‑term token lifecycle. Generated tokens are valid for up to 12 hours or the length of the underlying AWS session, matching AWS’s recommendation to prefer temporary credentials.
  • IAM permission scope. The AWS identity used must have the Bedrock runtime permissions required for the chosen model or inference profile. Review and tighten policies accordingly.
  • Automation impact. CI/CD pipelines that previously injected a Bedrock key can now rely on the existing AWS credential chain, simplifying pipeline configuration and secret management.
  • Region awareness. Because the provider builds the endpoint from AWS_REGION, ensure the region matches the model’s availability; otherwise requests will fail.

Related CloudNinjas coverage: AWS.

What This Means For Practitioners

Adopt the native bedrock provider to align Kimi Code CLI with your organization’s AWS authentication strategy. Verify that the IAM role or user running the CLI has the necessary Bedrock permissions, and confirm that your profile or SSO setup resolves to the correct region. Monitor token expiration in long‑running sessions and be prepared to refresh credentials automatically. By eliminating a separate API key, you reduce operational overhead and improve the security posture of AI‑driven development workflows.

Originally published atAWS Machine Learning Blog