Lesson 2 of 6 Agentic AI Workflows

Deploying and Operating Agents with Amazon Bedrock AgentCore

This lesson explains Amazon Bedrock AgentCore, the services for deploying and operating agents built with any framework and any model, securely and at scale.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe how AgentCore Runtime isolates sessions.
  • Distinguish AgentCore Gateway, Identity and Memory.
  • Identify the built-in tools, observability and governance services.
  • Choose between Bedrock Agents and AgentCore.

AgentCore Runtime

AgentCore Runtime hosts agents and tools serverlessly. Each user session runs in its own isolated microVM with separate compute, memory and file system, which is sanitised when the session ends, so one user's data cannot leak into another's session. Sessions can run for up to 8 hours, which suits long, asynchronous tasks. Runtime is framework-agnostic: agents built with Strands Agents, LangGraph, CrewAI or custom code are packaged as containers (or code) and deployed. It supports HTTP, Model Context Protocol (MCP) and Agent2Agent (A2A) protocols, and billing is based on actual CPU and memory consumption.

True or false

AgentCore Runtime

Exam skills 3.1.6 · 3.2.11

Check how AgentCore Runtime hosts agents.

Log in to try this activity Interactive activities are free with an account.

Gateway, Identity and Memory

AgentCore Gateway turns existing APIs (OpenAPI), Lambda functions and services into MCP-compatible tools, with semantic search to help agents find the right tool among many. AgentCore Identity handles inbound authentication of users calling an agent and outbound credentials, such as OAuth tokens or API keys stored in a token vault, so agents can act on behalf of users in third-party systems without hard-coded secrets. AgentCore Memory stores short-term conversation events and extracts long-term memories (facts, preferences, summaries).

The following diagram compares the choices of two teams building agents, one with a simple FAQ agent and one with an existing LangGraph agent.

The two teams' choices. Team A's simple FAQ and order-lookup agent fits Bedrock Agents, configured with a knowledge base and Lambda action groups. Team B's existing LangGraph agent, with 30 internal APIs, OAuth access to a SaaS CRM on users' behalf and hour-long tasks, fits AgentCore Runtime with Gateway, Identity and Memory.
The scenario is illustrative.
Sort into groups

Which AgentCore service?

Exam skills 3.1.6 · 3.2.11

Decide which Amazon Bedrock AgentCore service meets each need.

Log in to try this activity Interactive activities are free with an account.

Tools, observability and governance

AgentCore provides managed tools and operational services that agents commonly need. Built-in tools include a Code Interpreter, which runs code an agent writes in an isolated sandbox for calculations and data analysis, and a Browser tool, which lets an agent interact with websites. AgentCore Observability emits OpenTelemetry traces, metrics and logs for sessions, model calls and tool calls, viewable in CloudWatch.

For governance, AgentCore Policy enforces rules on tool calls passing through AgentCore Gateway, such as which tools an agent may call with which parameters, and AgentCore Evaluations scores agent quality with built-in and custom evaluators. The following table summarises the services.

ServiceProvides
RuntimeServerless, session-isolated hosting for agents and tools (up to 8 hours)
GatewayAPIs and Lambda functions as MCP tools
IdentityInbound auth and outbound credentials for agents
MemoryShort-term events and long-term memory strategies
Code Interpreter, BrowserBuilt-in sandboxed tools
ObservabilityTraces and metrics in CloudWatch
Policy, EvaluationsRules on tool calls; quality scoring
Worked example

Bedrock Agents or AgentCore

Two teams compare options. Team A needs a simple FAQ-plus-order-lookup agent quickly, with no framework preference. Team B has a LangGraph multi-step research agent that uses 30 internal APIs, must act on users' behalf in a SaaS CRM with OAuth and runs tasks lasting up to an hour.

TeamChoiceReason
ABedrock AgentsManaged configuration, knowledge base and Lambda action groups
BAgentCore Runtime + Gateway + Identity + MemoryExisting framework, many tools as MCP, OAuth on behalf of users, long sessions

Rewriting Team B's LangGraph agent as a Bedrock agent would discard working code, and hosting it on self-managed containers would leave session isolation and credential handling to build.

Check yourself

Which AgentCore component manages OAuth tokens and API keys for agents acting for users?

Show answer

AgentCore Identity.

Exam Tips

Remember for the exam

  • Agents built with any framework, session isolation, long tasks: AgentCore Runtime.
  • Expose APIs and Lambda functions as MCP tools: AgentCore Gateway.
  • OAuth tokens and API keys for agents acting for users: AgentCore Identity.
  • Short- and long-term agent memory: AgentCore Memory.
  • Traces of agent sessions and tool calls: AgentCore Observability.