@shinyaz

AgentCore boto3 clients are split between control plane and data plane

1 min read

Tried calling create_code_interpreter on the bedrock-agentcore client and got an AttributeError.

client = boto3.client("bedrock-agentcore", region_name="us-east-1")
client.create_code_interpreter(...)  # ← fails
AttributeError: 'BedrockAgentCore' object has no attribute 'create_code_interpreter'.
Did you mean: 'invoke_code_interpreter'?

AgentCore uses separate boto3 clients for the control plane and data plane.

# Control plane: resource CRUD
control = boto3.client("bedrock-agentcore-control", region_name="us-east-1")
control.create_code_interpreter(...)   # ✓
control.delete_code_interpreter(...)   # ✓
control.create_agent_runtime(...)      # ✓
 
# Data plane: runtime operations
data = boto3.client("bedrock-agentcore", region_name="us-east-1")
data.invoke_code_interpreter(...)          # ✓
data.start_code_interpreter_session(...)   # ✓
data.invoke_agent_runtime(...)             # ✓

This split applies to both Code Interpreter and Agent Runtime. The Did you mean in the error helpfully suggests a data plane method — which is actually a clue that you're on the wrong client.

Share this post

Shinya Tahara

Shinya Tahara

Solutions Architect @ AWS

I'm a Solutions Architect at AWS, providing technical guidance primarily to financial industry customers. I share learnings about cloud architecture and AI/ML on this site.The views and opinions expressed on this site are my own and do not represent the official positions of my employer.