
Eks To Agentcore
- 1 installs
- Updated April 14, 2026
- aws-samples/sample-eks-to-agentcore-mcpserver-skills
eks-to-agentcore is a skill that guides migrating AI agents from Amazon EKS to the managed Amazon Bedrock AgentCore runtime.
About
Guides an agent through migrating AI agent workloads from Amazon EKS to Amazon Bedrock AgentCore, from assessment to cutover. A developer uses it to scan clusters, scaffold an AgentCore project, generate a main.py entrypoint wrapper, port secrets and networking config, and run both stacks in parallel before scaling down EKS. It pairs with the eks-to-agentcore MCP server for live cluster scanning and automated assessment.
- Six-phase migration: assess, scaffold, migrate code, migrate config, test and deploy, cut over
- Pairs with the eks-to-agentcore MCP server for live cluster scanning and assessment
- Feature-mapping table translates EKS Secrets, ConfigMaps, IRSA and HPA to AgentCore equivalents
Eks To Agentcore by the numbers
- 1 all-time installs (skills.sh)
- Ranked #933 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
- Data as of Jul 23, 2026 (Skillselion catalog sync)
eks-to-agentcore capabilities & compatibility
Requires an AWS account with EKS/Bedrock access; AgentCore uses consumption-based pricing per the docs.
- Capabilities
- eks upgrade check · cost governance
- Works with
- aws · kubernetes
- Use cases
- devops · ci cd · orchestration
- Runs
- Runs locally
- Pricing
- Bring your own API key
What eks-to-agentcore says it does
Migrate AI agents from Amazon EKS (containerized Kubernetes workloads) to Amazon Bedrock AgentCore (serverless, purpose-built agent runtime).
AgentCore Memory is NOT available during local dev (`agentcore dev`). Deploy first to test memory.
npx skills add https://github.com/aws-samples/sample-eks-to-agentcore-mcpserver-skills --skill eks-to-agentcoreAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| Last updated | April 14, 2026 |
| Repository | aws-samples/sample-eks-to-agentcore-mcpserver-skills ↗ |
What it does
Migrate an AI agent running on Amazon EKS to the managed Amazon Bedrock AgentCore runtime end to end.
Who is it for?
Teams moving supported-framework agent workloads off self-managed EKS onto AgentCore's serverless runtime
Skip if: Agents needing CUDA/GPU or custom native libraries where the Container build type is required
When should I use this skill?
Assessing EKS agent workloads for migration, scaffolding an AgentCore project, or generating entrypoint and CI/CD config
What you get
The agent workload runs on the managed AgentCore runtime with EKS resources cleaned up.
- AgentCore project scaffold
- main.py Runtime wrapper
- CI/CD pipeline config
By the numbers
- Six-phase migration process
- Seven eks-to-agentcore MCP tools referenced
Files
EKS to AgentCore Migration Guide
Overview
Migrate AI agents from Amazon EKS (containerized Kubernetes workloads) to Amazon Bedrock AgentCore (serverless, purpose-built agent runtime). This skill provides the domain knowledge to guide the migration end-to-end, from assessment through cutover.
AgentCore eliminates Kubernetes infrastructure management by providing a fully managed runtime with built-in session isolation (microVMs), memory, identity, observability, and consumption-based pricing.
---
Process
Phase 1: Assess
1. Identify agent workloads on EKS — use scan_eks_cluster MCP tool or kubectl get deployments 2. For each agent, evaluate:
- Python version (must be 3.10+)
- Framework (Strands, LangChain, LangGraph, CrewAI, Google ADK, OpenAI Agents, or custom)
- External dependencies (databases, APIs, caches)
- Kubernetes-specific dependencies (PVCs, Secrets, ConfigMaps, HPA, service mesh)
- Entrypoint file (AgentCore expects
main.py)
3. Use assess_agent or assess_cluster MCP tools for automated assessment 4. Prioritize: start with low-complexity agents (supported framework, no PVCs, no custom networking)
Phase 2: Scaffold
1. Install AgentCore CLI: npm install -g @aws/agentcore 2. Create project: agentcore create --name <AgentName> --defaults 3. Use generate_agentcore_project MCP tool for customized scaffold commands 4. Choose build type:
- CodeZip (default, recommended) — no Dockerfile needed
- Container — only if agent has heavy system-level dependencies (CUDA, custom native libs)
Phase 3: Migrate Code
1. Copy agent source to app/<AgentName>/ 2. Create main.py with AgentCore Runtime wrapper — use generate_main_py MCP tool 3. The wrapper pattern for Strands agents:
from strands import Agent
from bedrock_agentcore.runtime import BedrockAgentCoreApp
agent = Agent(model="...", system_prompt="...", tools=[...])
app = BedrockAgentCoreApp()
@app.entrypoint
def invoke(payload):
response = agent(payload.get("prompt", ""))
return response.message["content"][0]["text"]
if __name__ == "__main__":
app.run()4. Update pyproject.toml — remove K8s-specific deps (gunicorn, uvicorn, kubernetes client) 5. Remove web framework serving code (Flask/FastAPI) — AgentCore handles HTTP natively
Phase 4: Migrate Configuration
1. Secrets → agentcore add credential --name <svc> --api-key <key> or --type oauth 2. ConfigMaps/env vars → agentcore.json configuration 3. Networking:
- Internet-only APIs →
"networkMode": "PUBLIC"(default) - Private resources (RDS, ElastiCache) →
"networkMode": "VPC"
4. Memory/state (Redis, DynamoDB) → agentcore add memory --strategies SEMANTIC,SUMMARIZATION 5. IRSA → AgentCore Identity (CDK creates execution roles automatically)
Phase 5: Test & Deploy
1. Test locally: agentcore dev then agentcore dev "test prompt" 2. Preview: agentcore deploy --plan 3. Deploy: agentcore deploy 4. Verify: agentcore status and agentcore invoke --runtime <AgentName> "test" 5. Set up CI/CD — use generate_cicd_pipeline MCP tool
Phase 6: Cutover
1. Run both EKS and AgentCore agents in parallel 2. Route traffic gradually using weighted routing 3. Monitor via agentcore logs and agentcore traces list 4. After validation, scale down EKS: kubectl scale deployment <name> --replicas=0 5. Clean up K8s resources (Deployment, Service, Ingress, HPA, Secrets, ConfigMaps)
---
Key Decisions
| Decision | Recommendation |
|---|---|
| Build type | CodeZip unless you need CUDA/GPU or custom native libraries |
| Network mode | PUBLIC for internet APIs, VPC for private resources (RDS, ElastiCache) |
| Framework | Strands has the smoothest migration path; LangChain/LangGraph supported; custom needs service contract |
| Memory | Use AgentCore Memory to replace Redis/DynamoDB session state |
| CI/CD | agentcore deploy replaces Docker build + ECR push + kubectl apply |
---
Common Pitfalls
- AgentCore Memory is NOT available during local dev (
agentcore dev). Deploy first to test memory. - Entrypoint must be
main.py(or configured inagentcore.json) - Remove Flask/FastAPI/uvicorn — AgentCore Runtime handles HTTP serving
- Extended execution supports up to 8 hours. Decompose longer workloads.
- First deployment takes a few minutes while CDK bootstraps your account
- EKS tokens expire every ~15 minutes. Refresh with
aws eks update-kubeconfig
---
MCP Tools Reference
This skill works with the eks-to-agentcore MCP server. Available tools:
| Tool | Purpose |
|---|---|
scan_eks_cluster | Discover AI agent deployments on EKS (specify namespace for least privilege) |
assess_agent | Assess a single agent for migration compatibility |
assess_cluster | Full cluster scan + assessment report |
generate_agentcore_project | Generate agentcore CLI scaffold commands |
generate_cicd_pipeline | Generate CodeBuild or GitHub Actions pipeline config |
generate_main_py | Generate ready-to-use main.py with AgentCore Runtime wrapper |
get_eks_agentcore_feature_map | EKS-to-AgentCore feature mapping and cleanup checklist |
---
Guidelines
- Always specify a namespace when scanning (
scan_eks_cluster(namespace="agents")) to follow least-privilege principles - Env var values are never captured — only names are used for heuristic analysis
- Start with the simplest agent (low complexity) as a pilot migration
- Use CodeZip build type unless you have a specific reason for Container
- Keep the EKS agent running in standby for 1-2 weeks after cutover as a rollback option
- Use
agentcore deploy --planbefore every deployment to preview changes
AgentCore CLI Quick Reference
Installation
npm install -g @aws/agentcore
agentcore --versionProject Lifecycle
# Create project
agentcore create --name MyAgent --defaults
agentcore create # interactive wizard
# Local development
agentcore dev # start dev server with hot-reload
agentcore dev "test prompt" # test locally
agentcore dev "test prompt" --stream # test with streaming
agentcore dev --logs # view server logs
# Deploy
agentcore deploy --plan # preview changes
agentcore deploy # deploy to AWS
agentcore status # check resource states
# Invoke
agentcore invoke --runtime MyAgent "test" # invoke deployed agent
agentcore invoke --runtime MyAgent "test" --stream # with streaming
agentcore invoke --runtime MyAgent "follow-up" --session-id <id> # session continuity
# Observe
agentcore logs # stream logs
agentcore logs --since 30m --level error # filter logs
agentcore logs --query "timeout" # search logs
agentcore traces list # view traces
agentcore traces get <trace-id> # trace detailsAdd Components
# Memory
agentcore add memory --name SharedMemory --strategies SEMANTIC,SUMMARIZATION
# Credentials
agentcore add credential --name openai --api-key <key>
agentcore add credential --name slack --type oauth --discovery-url <url> --client-id <id> --client-secret <secret>
# Additional agents
agentcore add agent --name SecondAgent --language Python --framework strands --model-provider Bedrock
# BYO agent
agentcore add agent --name MyAgent --type byo --code-location ./app/MyAgent --entrypoint main.py --language Python --framework custom --model-provider Bedrock
# Evaluators
agentcore add evaluator --name QA --level SESSION --model us.anthropic.claude-sonnet-4-5-20250929-v1:0 --instructions "Evaluate quality. Context: {context}" --rating-scale 1-5-quality
# Online evaluation
agentcore add online-eval --name ProdMonitor --agent MyAgent --evaluator QA --sampling-rate 10Evaluate
agentcore run eval --runtime MyAgent --evaluator QA --days 1
agentcore run eval --runtime MyAgent --evaluator Builtin.Faithfulness --days 1
agentcore evals history --agent MyAgent
agentcore logs evals --agent MyAgent --since 1hCleanup
agentcore remove all --dry-run # preview
agentcore remove all # reset config
agentcore deploy # deploy empty state to tear downSDK Approach (Alternative)
pip install bedrock-agentcore
agentcore configure --entrypoint main.py
agentcore launch --local # test locally
agentcore launch # deploy to cloudAgentCore Entrypoint Patterns
Strands Agent (Recommended)
from strands import Agent
from strands_tools import http_request, calculator
from bedrock_agentcore.runtime import BedrockAgentCoreApp
agent = Agent(
model="us.amazon.nova-lite-v1:0",
system_prompt="You are a helpful assistant.",
tools=[http_request, calculator],
)
app = BedrockAgentCoreApp()
@app.entrypoint
def invoke(payload):
user_message = payload.get("prompt", "Hello")
response = agent(user_message)
return response.message["content"][0]["text"]
if __name__ == "__main__":
app.run()LangChain / LangGraph Agent
from langchain_aws import ChatBedrock
from langchain.agents import AgentExecutor, create_tool_calling_agent
from bedrock_agentcore.runtime import BedrockAgentCoreApp
llm = ChatBedrock(model_id="us.anthropic.claude-sonnet-4-20250514-v1:0")
# Set up your agent chain/graph here
# agent_executor = AgentExecutor(agent=agent, tools=tools)
app = BedrockAgentCoreApp()
@app.entrypoint
def invoke(payload):
user_message = payload.get("prompt", "Hello")
result = agent_executor.invoke({"input": user_message})
return result["output"]
if __name__ == "__main__":
app.run()With AgentCore Memory
from strands import Agent
from bedrock_agentcore.runtime import BedrockAgentCoreApp
from bedrock_agentcore.memory import MemoryClient
agent = Agent(model="us.amazon.nova-lite-v1:0", system_prompt="...")
memory = MemoryClient()
app = BedrockAgentCoreApp()
@app.entrypoint
def invoke(payload):
user_message = payload.get("prompt", "Hello")
session_id = payload.get("session_id", "default")
# Retrieve relevant memories
context = memory.retrieve(query=user_message, session_id=session_id)
# Invoke agent with memory context
response = agent(f"Context: {context}\n\nUser: {user_message}")
result = response.message["content"][0]["text"]
# Store the interaction
memory.store(session_id=session_id, content=f"User: {user_message}\nAssistant: {result}")
return result
if __name__ == "__main__":
app.run()A2A Protocol Agent
from strands import Agent
from bedrock_agentcore.runtime import BedrockAgentCoreApp
agent = Agent(model="us.amazon.nova-lite-v1:0", system_prompt="...")
app = BedrockAgentCoreApp()
# A2A uses port 9000 and JSON-RPC protocol
# Scaffold with: agentcore create --protocol A2A
@app.entrypoint
def invoke(payload):
user_message = payload.get("prompt", "Hello")
response = agent(user_message)
return response.message["content"][0]["text"]
if __name__ == "__main__":
app.run()Key Notes
- Entrypoint file must be
main.py(or configured in agentcore.json) - The
@app.entrypointdecorator registers your handler with AgentCore Runtime app.run()starts the runtime server — do NOT add Flask/FastAPI/uvicornpayloadcontains the request data; usepayload.get("prompt")for the user message- Return a string from the entrypoint function
- For streaming, AgentCore handles it at the transport layer — no code changes needed
EKS to AgentCore Feature Mapping
Compute & Deployment
| EKS Concept | AgentCore Equivalent |
|---|---|
| Kubernetes Deployment / Pod | AgentCore Runtime (CodeZip or Container) |
| Horizontal Pod Autoscaler (HPA) | Automatic — consumption-based scaling, no config needed |
| Node groups / Fargate profiles | Not needed — serverless microVM per session |
| Dockerfile + ECR | CodeZip (no container needed) or Container build type |
| Helm charts / Kustomize | agentcore.json + aws-targets.json |
| kubectl apply / ArgoCD sync | agentcore deploy |
Networking & Routing
| EKS Concept | AgentCore Equivalent |
|---|---|
| Kubernetes Service / Ingress | AgentCore Runtime endpoint (HTTP API + WebSocket) |
| VPC CNI / Pod security groups | networkMode: PUBLIC or VPC in agentcore.json |
| Service mesh (Istio, App Mesh) mTLS | microVM isolation — each session has dedicated CPU, memory, filesystem |
| Service mesh traffic routing | AgentCore Runtime handles routing natively |
| Service mesh service-to-service auth | AgentCore Gateway + Policy |
| Network Policies | AgentCore Policy — Cedar or natural language rules |
Configuration & Secrets
| EKS Concept | AgentCore Equivalent |
|---|---|
| Kubernetes Secrets | agentcore add credential (OAuth or API key) |
| ConfigMaps / Environment vars | agentcore.json configuration |
| IRSA (IAM Roles for Service Accounts) | AgentCore Identity — CDK creates execution roles automatically |
Observability
| EKS Concept | AgentCore Equivalent |
|---|---|
| Prometheus + Grafana | AgentCore Observability + CloudWatch (built-in) |
| Fluentd / CloudWatch Agent | Built-in CloudWatch logging (agentcore logs) |
| Custom OpenTelemetry | Built-in OTEL-compatible tracing (agentcore traces) |
| Envoy telemetry | Built-in distributed tracing — no sidecar proxies |
State & Memory
| EKS Concept | AgentCore Equivalent |
|---|---|
| Redis / DynamoDB (session state) | AgentCore Memory (SEMANTIC, SUMMARIZATION, USER_PREFERENCE) |
| PersistentVolumeClaims (PVCs) | AgentCore persistent filesystems (Preview) |
Related skills
FAQ
Which build type should I choose for AgentCore?
CodeZip is the default and recommended build type unless the agent needs CUDA/GPU or custom native libraries, in which case use Container.
Is AgentCore Memory available during local dev?
No. AgentCore Memory is not available during local dev (agentcore dev); you must deploy first to test memory.