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(...) # ← failsAttributeError: '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.
