Practice Exams:

Amazon AWS AIP-C01: Bedrock Agents and Tool Use

Amazon Bedrock Agents Classic can turn a foundation model into an orchestrator that can interpret a user request, decide which action or knowledge source is relevant, gather missing information, call tools, and return a final response. The architecture is powerful because the agent can bridge natural language and business APIs. The risk is that model reasoning now influences real systems, which makes tool design, identity, validation, user confirmation, and observability first-class engineering concerns.

On this page
  1. Design action groups around business capabilities
  2. Use Lambda for controlled fulfillment
  3. Return execution control to applications
  4. Require confirmation for high-impact actions
  5. Keep IAM narrow
  6. Use Guardrails as a separate control layer
  7. Design error and retry behavior
  8. Test the conversation and action together
  9. Trace tool behavior in production

These action-group instructions describe Amazon Bedrock Agents Classic, which entered maintenance mode and closed to new customers on July 30, 2026. Existing customers can continue using Classic, but AWS recommends Amazon Bedrock AgentCore for new agents; AgentCore tool interfaces are different from the action groups described here. Bedrock Agents Classic supports action groups backed by Lambda functions or return-of-control patterns in which the application handles the action itself. AWS also supports user confirmation before invoking action-group functions, which can reduce the risk of a prompt-injection or reasoning error causing an unexpected high-impact action. Confirmation does not replace authorization or input validation in the application. A refund, account change, or external message still needs independently checked business rules and replay-safe execution. The model’s choice of action starts a controlled transaction; it should never be the final security decision.

Design action groups around business capabilities

An action group should expose clear business operations such as create ticket, get order status, schedule appointment, or update account preference. AWS tool agents are easier to secure when the model chooses among narrow capabilities rather than a generic API that can perform many unrelated operations. Keep names and descriptions precise because the agent uses them during orchestration.

When an agent needs to update a service record, treat its action group as a controlled API rather than an extension of the prompt. The tool contract should describe valid inputs, an authorized caller, possible error states and a way to identify an already-completed request. Test a read-only inquiry, a permitted update, a policy rejection and a timeout after the backend may have committed. Use narrow credentials and retain the trace connecting the user’s request to the stored result. The safest agent can explain when it must not act.

Action-group schemas should be treated as contracts. Whether the agent uses OpenAPI-style descriptions or function details, parameter names and descriptions should be unambiguous enough that the model can fill them consistently. Renaming a field, changing allowed values, or broadening an action can change orchestration behavior even when the Lambda code still runs successfully.

Tool catalogs should stay small enough for reliable selection. When dozens of overlapping actions are exposed at once, the model has more opportunity to choose the wrong operation or populate the wrong schema. Consolidate related low-level calls behind one business-level service where that produces a clearer contract.

Use Lambda for controlled fulfillment

A Lambda-backed action group lets the agent pass elicited parameters to code that validates and performs the operation. The Lambda function should treat every model-supplied value as untrusted input. Use schema validation, authorization, idempotency, and downstream error handling before changing business state.

Action results should be concise and structured. A Lambda function that returns an entire backend record or long error stack can waste context and introduce untrusted text into the next reasoning step. Return the fields the agent needs, plus stable error codes and business status that can be explained to the user.

Use return of control when the application should own execution

Bedrock can return the intended action and parameters to the developer application instead of invoking Lambda directly. This pattern is useful when the application already has a workflow engine, approval layer, transaction service, or custom authorization context. Tool control is stronger when the agent proposes work while trusted application code decides whether and how to execute it.

Return-of-control patterns are useful when the application needs transaction management or a richer approval flow than the agent runtime provides directly. The developer can receive the invocation inputs, perform its own authorization, apply domain rules, execute the operation, and return the result to the agent in a later InvokeAgent call.

Return-control architectures can also simplify audit because the application can record the proposed action, approval, execution, and result in one domain-specific transaction log before handing the outcome back to the agent. Keep a small regression set for each important action group so tool descriptions, parameter schemas, and agent instructions can evolve without silently changing which action is selected.

Require confirmation for high-impact actions

Bedrock action groups can request user confirmation before invocation. This can reduce the chance that malicious prompt content or an orchestration mistake triggers a sensitive transaction. Confirmation should show meaningful details such as target, amount, record, or expected effect rather than a generic “continue?” prompt.

User confirmation should be reserved for consequential operations so it remains meaningful. If every harmless lookup requires confirmation, users will learn to approve reflexively. If only money movement, account deletion, external messaging, or another high-impact action pauses for confirmation, the user can understand that the prompt represents a genuine decision point.

Enforce high-impact actions outside the model

High-impact actions should also have server-side policy checks after model selection. For example, a refund tool can verify account ownership, maximum amount, order state, and actor permission independently from the model’s reasoning. The agent can decide that a refund is relevant; the service decides whether this refund is allowed.

Session state should be designed intentionally. Temporary conversation context can help a multi-step workflow, but high-impact identifiers and authorization decisions should be revalidated before execution rather than trusted indefinitely because they appeared earlier in the session.

Keep IAM narrow

The agent service role, Lambda role, and downstream service permissions should each be scoped to the resources and actions they need. Do not grant a tool broad account permissions merely because the agent can only describe one intended use. The model instruction is not an authorization boundary; IAM and application code are.

Differentiate missing data from missing authority

Agents should distinguish missing information from missing authority. The model can ask the user for an order number, but it should not ask the user to provide a secret or privileged credential the application ought to obtain through IAM. Keep conversational elicitation focused on business parameters, not infrastructure authentication.

Review action-group IAM, confirmation requirements, and tool descriptions after every material workflow change so the agent’s capability remains aligned with business risk.

Use Guardrails as a separate control layer

Amazon Bedrock Guardrails can be associated with agents to evaluate supported inputs and outputs. Bedrock Guardrails can help with content, denied topics, sensitive information, and other policies, but they do not replace tool-level authorization. Use safety policy and action control together.

Guardrails should be tested with tool scenarios, not only plain chat. A blocked input can prevent a malicious request from reaching the model, but tool descriptions, retrieved text, or downstream output may still contain dangerous instructions. Security testing should trace the entire path from input through action result.

Design error and retry behavior

Tools fail because of permissions, validation, throttling, dependency outages, and stale state. The agent should distinguish a retryable failure from a business rejection and should never claim success without confirmed execution. High-impact writes should use idempotency keys or stable operation identifiers where duplicate retries could create damage.

Test the conversation and action together

An agent can select the correct tool but populate the wrong parameters, or complete a correct transaction but explain it badly to the user. Agent testing should cover intent recognition, tool selection, parameter elicitation, authorization, side effects, error handling, and final response. Include adversarial prompts that try to make the agent use a tool outside its intended scope.

Agent versions and aliases should be part of release control. A changed instruction or action group can affect live behavior without changing the client code. Keep production pointed to a known version and promote deliberately after tests rather than editing the only active configuration in place.

Trace tool behavior in production

Record request or session identifiers, selected action, parameters after safe redaction, execution status, latency, downstream errors, and business outcome. GenAI observability becomes much more useful when a model response can be connected to the exact tool call that produced the external effect.

Monitoring should separate orchestration quality from backend reliability. Track whether the agent selected the right action, whether required parameters were available, whether the action executor succeeded, and whether the resulting business state matched the intent. Those are different failure classes with different owners.

The mature Bedrock agent design uses the model where interpretation adds value and deterministic code where business invariants matter. Narrow action groups, scoped IAM, confirmation, return-of-control, structured results, and traceability make tool use an engineered capability rather than a leap of faith.

Use traces during development and incident review to understand why the agent selected a tool or asked for a parameter. Trace access itself should be restricted because reasoning context can include sensitive prompts, retrieved data, and tool details.

The goal of Bedrock Agents is not maximal autonomy. A mature implementation chooses the smallest amount of model-driven orchestration that improves the user experience while leaving authorization, transactions, and irreversible decisions in deterministic systems. Tool permissions should be reviewed whenever an action group expands. Adding one new API operation can change the blast radius of the same agent identity, even if the conversational instructions remain unchanged.

Related Posts

• AWS Machine Learning Engineer Associate: MLA-C02 Beta and Study Guide

• Top 15 Must-Read Books on Machine Learning to Supercharge Your Skills

• The Vital Role of Machine Learning for Data Scientists

• Ultimate Study Guide to Ace the AWS AI Practitioner Exam (AIF-C01)

• Unlocking Tomorrow’s Potential: A Master’s Degree in Artificial Intelligence in 2025

• End-to-End Success Guide for the AWS Certified Machine Learning – Associate Exam

• Amazon AWS AIP-C01: Why GenAI Testing Needs Adversarial Cases

• Amazon AWS AIP-C01: Event-Driven GenAI: Where Serverless Fits

• Amazon AWS AIP-C01: CI/CD for Prompts, Models, and AI Logic

• Production ML on AWS