Subchapter 16.1
references/doctor.mdMarkdown6 KBView on GitHub
Check your environment and tell you exactly what’s needed to use the AgentCore CLI.
agentcore command not found or CLI isn’t behaving correctlyagentcore create or agentcore deploy fails immediately with an environment errorDo NOT use for:
agents-get-startedagents-deployagents-debugNo arguments required.
Run each check and report the result. For anything missing, give the exact fix command — don’t just say “install X.”
agentcore --versionIf the command errors instead of returning a version:
Run which agentcore to see what’s installed:
/usr/local/lib/python*/site-packages/ or similar Python location → the old Starter Toolkit is shadowing the new CLI. Uninstall it (see below).If not found:
npm install -g @aws/agentcoreRequires Node.js 20+. If npm isn’t available, install Node.js first: https://nodejs.org (opens in a new tab)
If old Starter Toolkit is installed (Python-based agentcore command):
# Uninstall the old CLI first
pip uninstall bedrock-agentcore-starter-toolkit
# or: pipx uninstall bedrock-agentcore-starter-toolkit
# or: uv tool uninstall bedrock-agentcore-starter-toolkit
# Then install the new CLI
npm install -g @aws/agentcorenode --versionRequires Node.js 20.x or later. If older:
brew install node or download from https://nodejs.org (opens in a new tab)nvm install 20 (https://github.com/nvm-sh/nvm (opens in a new tab))uv --versionuv manages Python virtual environments for your agent code. It’s required for Python agents.
If not found:
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or via pip
pip install uv
# Or via Homebrew
brew install uvAfter installing, restart your terminal or run source ~/.bashrc (or ~/.zshrc).
aws sts get-caller-identityIf AWS CLI not found:
# macOS
brew install awscli
# Or download from https://aws.amazon.com/cli/If credentials not configured:
aws configure
# Enter: AWS Access Key ID, Secret Access Key, default region, output formatIf using SSO:
aws sso login --profile your-profileCheck the region: The region in aws configure must match the region where you’ve enabled Bedrock model access and where you’ll deploy.
aws bedrock list-foundation-models \
--region $(aws configure get region) \
--query 'modelSummaries[?contains(modelId, `claude`) && modelLifecycle.status==`ACTIVE`].modelId' \
--output tableIf no Claude models appear, or if you see access errors:
Required model for default projects: The default model is a cross-region inference profile (e.g., global.anthropic.claude-sonnet-4-5-20250929-v1:0 — the CLI scaffolds global. by default). The global. prefix routes to any commercial region; geographic prefixes (us., eu., apac.) keep inference within that geography. All prefixes require model access enabled in every destination region the profile covers. Check agentcore.json after agentcore create for the exact model ID used.
aws iam simulate-principal-policy \
--policy-source-arn $(aws sts get-caller-identity --query Arn --output text) \
--action-names iam:CreateRole bedrock:InvokeModel \
--resource-arns "*" \
--query 'EvaluationResults[*].{Action:EvalActionName,Decision:EvalDecision}'For deploy to work, you need:
iam:CreateRole — to create execution rolesbedrock:InvokeModel — to call Bedrock modelsecr:CreateRepository, ecr:PutImage — for container buildscodebuild:StartBuild — for remote buildsIf permissions are missing, ask your AWS admin to attach BedrockAgentCoreFullAccess and AmazonBedrockFullAccess managed policies to your IAM user or role.
docker --version
docker info 2>&1 | head -5Docker is only required if you’re using --build Container. CodeZip builds (the default) don’t need Docker locally — they use AWS CodeBuild.
If Docker not running:
sudo systemctl start dockerAlternatives to Docker: AgentCore also supports Podman and Finch.
Report results as a clear checklist:
AgentCore Environment Check
✅ AgentCore CLI: 0.9.1
✅ Node.js: v20.11.0
✅ uv: 0.4.18
✅ AWS credentials: configured (account: 123456789012, region: us-east-1)
✅ Bedrock model access: Claude models enabled
⚠️ IAM permissions: missing iam:CreateRole — deploy will fail
❌ Docker: not running — needed for Container builds (optional)
Issues to fix:
1. IAM: Ask your admin to attach BedrockAgentCoreFullAccess to your user
2. Docker: Start Docker Desktop (only needed for Container builds)
All clear? Run `agents-get-started` to create your first project.agents-get-started skill when environment is healthy