From the source
Moonshot AI's Kimi Code CLI v2.7.0 adds a native
Amazon Bedrock provider, letting developers authenticate with their existing AWS credential chain instead of a separate Bedrock API key.
- Previously, connecting the open source coding agent to Bedrock models meant configuring a generic provider of type "openai" or "openai_responses" and supplying a regional base_url plus a Bedrock API key, a credential AWS customers had to obtain and protect.
- The provider resolves credentials through the standard AWS CLI chain, including named profiles and SSO, then uses @aws/bedrock-token-generator to mint a short-lived bearer token that it renews as needed.
- It builds the regional bedrock-runtime endpoint from AWS_REGION or AWS_DEFAULT_REGION and maps the model alias to a Bedrock model or inference profile ID, such as the global profile global.moonshotai.kimi-k3.1.
- The ephemeral keys are valid for up to 12 hours or the AWS session length, whichever is shorter, and an explicit key passed through api_key or api_key_env still takes precedence.
- AWS recommends short-term credentials over long-term ones, and the post notes the change does not remove the user's responsibility to protect AWS credentials and scope permissions.






