← Back
AWS ML Blog

Extend Claude Code to remote sessions on Amazon Bedrock AgentCore with security controls

•18 min read•
#agents#deployment#llm#amazon#bedrock#inference
Level:Advanced
For:ML Engineers, AI Ops
✦TL;DR

The authors demonstrate how to run Claude Code as a remote, isolated agent within Amazon Bedrock AgentCore, ensuring each coding task executes in a sandboxed session inside the user’s AWS account. Every model invocation is routed through Bedrock’s managed endpoint, and the generated code is automatically packaged into a GitHub pull request for review and merge. This approach eliminates the need to host the Claude model locally while preserving strict security boundaries and providing a seamless CI/CD workflow. The key trade‑off is the added latency of remote Bedrock calls, but the isolation guarantees that code execution cannot escape the AWS VPC.

⚡ Key Takeaways

  • Each coding task runs in its own isolated Bedrock AgentCore session, preventing cross‑task interference.
  • Model calls are funneled through Amazon Bedrock, leveraging its managed scaling and compliance features.
  • The output is delivered as a GitHub pull request, integrating directly with existing code review pipelines.
  • Security controls are enforced via Bedrock’s IAM role policies, ensuring only authorized agents can invoke the Claude model.
  • WhyItMatters: Engineers can now embed powerful code‑generation capabilities into production pipelines without exposing the model to local infrastructure, reducing attack surface while maintaining tight integration with GitHub workflows.
  • TechnicalLevel: Advanced
  • TargetAudience: ML Engineers, AI Ops
  • PracticalSteps:
  • Create an AgentCore skill that points to the Claude Code model via the Bedrock endpoint ARN.
  • Configure the skill’s IAM role to include `bedrock:InvokeModel` and `codecommit:CreatePullRequest` permissions.
  • Enable the GitHub integration in AgentCore, specifying the repository and branch for PR creation.
  • ToolsMentioned: Claude Code, Amazon Bedrock AgentCore, GitHub
  • Tags: AGENTS, DEPLOYMENT, LLM, AMAZON, BEDROCK, INFERENCE

🔧 Tools & Libraries

Claude CodeAmazon Bedrock AgentCoreGitHub
💡 Why It Matters

Engineers can now embed powerful code‑generation capabilities into production pipelines without exposing the model to local infrastructure, reducing attack surface while maintaining tight integration with GitHub workflows.

✅ Practical Steps

  1. Create an AgentCore skill that points to the Claude Code model via the Bedrock endpoint ARN.
  2. Configure the skill’s IAM role to include `bedrock:InvokeModel` and `codecommit:CreatePullRequest` permissions.
  3. Enable the GitHub integration in AgentCore, specifying the repository and branch for PR creation.

Want the full story? Read the original article.

Read on AWS ML Blog ↗

More like this

Introducing workload recovery and expanded infrastructure checks on Amazon SageMaker HyperPod

AWS ML Blog•#deployment

Introducing Unity Gateway Insights

Databricks Blog•#deployment

Introducing Gemini 4 Neon

Google DeepMind•#llm

DaisyRose-27B: Pushing the Frontier of Post-Training Efficiency

Hugging Face Blog•#llm

EXPLORE AI NEWS

Daily hand-picked stories on LLMs, RAG, agents and production AI — curated for engineers who ship.

BROWSE NEWS

GET THE WEEKLY DIGEST

Join engineers getting the Monday signal-over-noise AI breakdown. No spam, unsubscribe anytime.

LEARN AI ENGINEERING

Curated courses, research papers, repos and tutorials built for engineers leveling up in AI.

START LEARNING