Use Kimi Code CLI with models on Amazon Bedrock
Kimi Code CLI v2.7.0 adds a native Amazon Bedrock provider, so you can connect the open source coding agent to models like Kimi K3.1 Pro using your standard AWS credential chain (named profiles or SSO) instead of a separate API key. This post shows how to configure the provider and send your first request.
Moonshot AI has released an updated version of the Kimi Code CLI, version 2.7.0, which introduces a native Bedrock provider. This eliminates the need to create and manage a separate API key for connecting the tool to models on Amazon Bedrock. To use this new feature, you can configure the agent to utilize your existing AWS credential chain, which includes named profiles and single sign-on (SSO).
This change simplifies the authentication process and reduces reliance on managing separate credentials. The native Bedrock provider resolves temporary credentials through the standard AWS Command Line Interface (AWS CLI) credential chain, using either the default chain or a named profile, including a profile backed by SSO. The Bedrock provider generates a short-lived bearer token, which renews when needed, and does not require any AWS access key or manual Bedrock key to be placed in the Kimi Code config.toml file.
Once the provider is set up, it builds the regional endpoint based on the AWS_REGION or AWS_DEFAULT_REGION environment variables and constructs the appropriate bedrock-runtime endpoint for the model's inferred API. The provider then calls the selected inference profile, which maps to an Amazon Bedrock model or inference profile ID.
In this example, the global inference profile global.moonshotai.kimi-k3.1 is used, with the global. prefix selecting the profile and AWS_REGION determining the regional endpoint that receives the request. The Kimi Code CLI then streams the model response and supports client-side tool calling during coding tasks. To set up the Bedrock provider in the Kimi Code CLI, make sure you have Kimi Code CLI v2.7.0 or later installed, an AWS account with access to the target model and inference profile in a supported AWS Region, the AWS CLI, and the necessary IAM permissions.
Ensure that you review the Amazon Bedrock pricing to understand the expected costs before using the model.
Written by urgent.news from AWS Machine Learning's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.
This story
This is one outlet's version. Read the fullest account.