Use open weight models as your AI coding agent with Amazon Bedrock
AWS•How-to••by Aris Tsakpinis, Suryansh Rana, Saurabh Trikande and Sainath Miriyala•AWS Artificial Intelligence Blog
Pair OpenCode, an open-source terminal-native AI coding agent, with open weight models on Amazon Bedrock to get a secure, flexible, pay-per-use coding assistant. Learn how to configure multi-model workflows, match the right model to each task, and keep your data in your own AWS account with no infrastructure to manage.
Shows how to run the open-source OpenCode coding agent against open weight models on Amazon Bedrock, with different models assigned to planning and build roles.
Who it is for
Developers and architects on AWS who want a terminal coding agent that keeps code inside their AWS account and pays per token.
Key points
Configured via opencode.json with separate plan and build model agents
Bedrock Flex tier is 50% lower cost than Standard for latency-tolerant batch coding work
Default Bedrock limits cited as 100M tokens per minute and 10K requests per minute
AI:The open source Model Profiler gives one searchable view of Bedrock foundation models, with pricing, quotas, regional availability and lifecycle status, refreshed daily by a serverless pipeline.
AI:AWS Transform now assesses generative AI codebases and produces a plan to move model calls from third-party providers to Amazon Bedrock, with cost comparisons and code changes.
AI:A customer case with Works Human Intelligence shows two HR support agents moved to AgentCore Runtime, with prompt caching and a smaller model cutting per-process cost by up to 97%.