Agentic AI DevOps: Amazon BedRock AgentCore
Recap of the previous session
- Amazon Bedrock and Bedrock AgentCore
- Ways to Build an Agent
- Ways to Call an LLM
- Ways to Run an Agent
In this session
- The AgentCore Deployment Architecture
- Building and Deploying the Agent
- Access and Permissions
- Testing and Observability
In one sentence: the same operations agent and its MCP server run as one container on AgentCore, a chat window on Kubernetes calls it, and Amazon Bedrock provides the LLM.
1. What AgentCore gives you
Amazon Bedrock AgentCore is a managed platform for running agents. AgentCore Runtime is the part that runs your agent as a container.
| AWS handles | You still handle |
|---|---|
| The servers and runtime your container runs on | Writing the agent code |
| Logs and basic metrics for the agent | Building the image and deploying it |
| An API to call your agent | Permissions, and who can reach the agent |
AgentCore is one choice. The same agent image can also run on EC2 or Kubernetes.
Agent and LLM are still two things. The agent is your application: the prompt, the memory, the agent loop, the MCP client and the code that calls the LLM. Bedrock only serves the LLM. In spite of the similar names, Bedrock and AgentCore are separate services: your agent does not run “inside” Bedrock.
2. The architecture

Architecture of the edshop Ops Agent: the browser reaches a chatbot on EKS, which invokes the agent and MCP server in one AgentCore container, which calls Amazon Bedrock and the Kubernetes API
The cluster runs the edshop shopping application (web, catalog, cart and payment). The operations agent answers questions about it in plain language.
How one question travels
- You open the chat window in your browser.
- An Application Load Balancer (ALB), created from a Kubernetes Ingress, receives the request.
- The chatbot pod (Streamlit) on your EKS cluster takes your question.
- The chatbot invokes the agent on AgentCore through the AWS API.
- The agent calls the LLM on Amazon Bedrock. The response comes back to the agent, which may call the LLM more than once.
- When the LLM chooses a tool, the agent calls the MCP server in the same container.
- The MCP server reads the Kubernetes API. It has read access only.
The final answer returns to you through the chatbot.
What runs where
| Component | Where it runs | Port |
|---|---|---|
| Chatbot | A pod on EKS | 8501 |
| Agent (LangChain) | AgentCore container | 8080 |
MCP server (list_namespaces, list_deployments) |
The same AgentCore container, reachable only inside it | 8002 |
| LLM (Claude Sonnet) | Amazon Bedrock | AWS API |
3. One image or two: where the MCP server runs
Putting the agent and the MCP server into one image is a choice, not a rule.
| Design | What it means | Network work |
|---|---|---|
| MCP server inside the agent container (the slide above) | One image holds both. A start script starts the MCP server, then the agent | The least. The cluster’s API endpoint must be public |
| Agent on AgentCore, MCP server on EKS | The MCP server is its own Deployment, and the agent calls it over the network | More: private subnets, VPC endpoints and an internal load balancer |
| Everything on Kubernetes | The agent is a normal Deployment. No AgentCore | Normal Kubernetes networking. You set up centralised logs and agent metrics yourself |
An agent can also use MCP servers that run elsewhere, including outside AWS. You then have to arrange access and networking for each one.
Public network mode keeps this design simple. A private (VPC) setup is possible, but there is more networking to build.
4. Building and deploying
Building an agent needs AI concepts. Putting it into service also needs AWS, Kubernetes, IAM and networking knowledge.
| Step | What happens |
|---|---|
| 1. Cluster | An EKS cluster with the shop application |
| 2. Code | The MCP server, the agent and the chatbot |
| 3. Images | One image for the agent with its MCP server, one for the chatbot |
| 4. Registry | Two Amazon ECR repositories, then push both images |
| 5. Access | IAM roles and Kubernetes permissions (section 5) |
| 6. Agent | Create an agent runtime from the image, role, network mode and settings. Wait until it is Ready |
| 7. Chatbot | Deploy it on EKS with the agent’s ARN and a login password |
| 8. Test | Call the agent, then try the chat window |
A script is fine for learning. In a real project, CI/CD pipelines build and push images and deploy them.
ARM and AMD: build for the machine that runs it
| Image | Runs on | Build it for |
|---|---|---|
| Agent | AgentCore Runtime | ARM64 (the architecture of AWS Graviton) |
| Chatbot | Your EKS nodes | The nodes’ architecture, AMD64 in this cluster |
An image built for the wrong architecture will not run. Check your nodes before you build.
The chat window
- The chatbot calls the agent with the AWS SDK (boto3), using the agent runtime’s ARN.
- A password protects the page. It is stored in a Kubernetes Secret. AWS Secrets Manager also works, but needs extra code and permissions.
- Its Service is ClusterIP, so it is private. To test, use port forwarding.
- For public access, add an Ingress. The AWS Load Balancer Controller creates the ALB, and a DNS record (for example in Route 53) points your domain name to it.
5. Access and permissions
There are two IAM roles, one for each caller.
| Who needs access | To do what | How it gets it |
|---|---|---|
| Chatbot pod | Invoke this one agent | Service account linked to an IAM role with EKS Pod Identity |
| Agent container | Call the LLM on Bedrock and find the cluster | The execution role of the agent runtime |
| Agent’s role | Read namespaces and deployments | An EKS access entry puts the role in a Kubernetes group that has a read-only ClusterRole |
The idea is the same as giving any application access to Amazon S3: attach an IAM role with only the permissions it needs.
Giving an IAM role to a pod
| Method | In short |
|---|---|
| IRSA (IAM Roles for Service Accounts) | The earlier method. Create a role and a service account, link them, and use that service account in the pod |
| EKS Pod Identity (used here) | The newer method. An agent add-on runs on every node. You associate a role with a service account |
DaemonSet or Deployment? The Pod Identity agent is a DaemonSet, which runs one copy on every node. Use it for node-level agents such as the Fluent Bit log collector. Applications such as cart or payment are Deployments, where you choose the number of replicas. To control how replicas spread across nodes, use scheduling rules such as affinity, not a DaemonSet.
6. Test one layer at a time
If the chat window shows an error, bypass it and call the agent directly with the AWS SDK.
| Result of the direct call | Where to look |
|---|---|
| The agent answers | The chatbot side: its permission, its settings or its code |
| The agent fails too | The agent side: its logs, its role, the LLM or the MCP tools |
Then check these:
- The ARN, in both places. The chat role’s permission and the chatbot’s own setting must name the agent that is running now. Recreating an agent gives it a new ARN.
- The agent’s logs. No new entry means your request never reached the agent.
- The chatbot’s logs. The page may hide the error, but the pod log shows it in full.
- After changing permissions, restart the pod and test again.
Giving a role access to everything is not a fix. Keep permissions narrow.
Sample questions for the agent: “Can you list the available namespaces?” and “Is the payment service healthy?”
7. Observability
| What you can see | Examples |
|---|---|
| Logs in Amazon CloudWatch | Start-up messages, requests, tool calls, errors |
| Agent runtime metrics | Sessions, invocations, errors, response time |
| Model metrics in Bedrock | Model calls, tokens used, throttling |
- Logs and basic metrics come with the runtime. Detailed traces (spans) need extra setup.
- Model metrics are counted for the model, so they can include calls from your other applications.
- On your own infrastructure, you collect and chart all of this yourself.
Summary
Key takeaways
- AgentCore runs your agent. Bedrock serves the LLM.
- The agent and the MCP server can share one image, or the MCP server can run on its own.
- The agent image must be ARM64.
- Give the chatbot and the agent their own IAM roles.
- When something breaks, test each layer on its own, and check the ARN.
Quick revision
| Term | Meaning |
|---|---|
| AgentCore Runtime | Managed runtime that runs your agent container |
| Agent runtime ARN | The identifier used to call your agent |
| Execution role | The IAM role the agent runs with |
| ECR | AWS registry for container images |
| EKS Pod Identity | Links an IAM role to a pod’s service account |
| EKS access entry | Maps an IAM role to Kubernetes permissions |
| ALB and Ingress | Public entry to an application in the cluster |
| ARM64 / AMD64 | Processor architectures an image is built for |
