Using AWS Bedrock With Kilo Code
Kilo Code supports accessing models through Amazon Bedrock, a fully managed service that makes a selection of high-performing foundation models (FMs) from leading AI companies available via a single API. This provider connects directly to AWS Bedrock and authenticates with the provided credentials.
Website: https://aws.amazon.com/bedrock/
Prerequisites
- AWS Account: You need an active AWS account.
- Bedrock Access: You must request and be granted access to Amazon Bedrock. See the AWS Bedrock documentation for details on requesting access.
- Model Access: Within Bedrock, you need to request access to the specific models you want to use (e.g., Anthropic Claude).
- Install AWS CLI: Use AWS CLI to configure your account for authentication
aws configure
Getting Credentials
You have three options for configuring AWS credentials:
- Bedrock API Key:
- Create a Bedrock-specific API key in the AWS Console. This is a simple service-specific authentication method.
- See the AWS documentation on Bedrock credentials for instructions on creating an API key.
- AWS Access Keys (Recommended for Development):
- Create an IAM user with the necessary permissions (at least
bedrock:InvokeModel). - Generate an access key ID and secret access key for that user.
- (Optional) Create a session token if required by your IAM configuration.
- Create an IAM user with the necessary permissions (at least
- AWS Profile:
- Configure an AWS profile using the AWS CLI or by manually editing your AWS credentials file. See the AWS CLI documentation for details.
Configuration in Kilo Code
Open Settings (gear icon) and go to the Providers tab to add AWS Bedrock. The extension uses the AWS credentials chain for authentication — configure your AWS credentials using the AWS CLI or environment variables before adding the provider.
The extension stores this in your kilo.json config file. You can also edit the config file directly — see the CLI tab for the file format.
Tips and Notes
- Permissions: Ensure your IAM user or role has the necessary permissions to invoke Bedrock models. The
bedrock:InvokeModelpermission is required. - Pricing: Refer to the Amazon Bedrock pricing page for details on model costs.
- Cross-Region Inference: Using cross-region inference may result in higher latency.