Bedrock AgentCore Policy: Cedar rules for agent tool calls

AgentCore Policy is a built-in AgentCore service that checks each tool call through a Gateway against Cedar or Dogwood rules, with default-deny and decision logs in CloudWatch. It only evaluates traffic routed through a Gateway, so the gaps must be closed in the design.

On this page

Does AgentCore Policy meet the tool-call control requirement?

AgentCore Policy is a built-in capability of Amazon Bedrock AgentCore that evaluates each tool call routed through a Gateway before the tool runs. No separate paid edition is named for it, so confirm feature availability in your region and account before you rely on it for approval. The control holds only when three conditions are true. First, every agent path to a tool must go through an AgentCore Gateway, because the engine can only check requests it receives. Second, a policy engine must be attached to that Gateway, and each policy applies to every gateway associated with the engine when its scope matches the request. Third, the rules must run under default-deny semantics, which the engine enforces automatically, so a tool call that no permit covers is refused.

Pricing does not add a gate to this control. AWS states that AgentCore uses consumption-based pricing with no upfront commitments or minimum fees, so cost follows usage. Ask AWS or your account team which metered components apply to gateway traffic and policy evaluation, and ask for a quote that shows how your expected tool-call volume drives each one. What AWS does not do for you is write rules that match your tools, test them, and prove coverage. Confirm that no gateway in your organization accepts unauthenticated callers by checking the bedrock-agentcore:GatewayAuthorizerType IAM condition key in an organization-level policy, and decide whether your rules key on AgentCore::OAuthUser from the JWT sub claim or on AgentCore::IamEntity from the caller's IAM ARN.

Before approval, test each deny path with a caller that should be refused, and confirm that the engine is attached to every gateway in scope. Check that Cedar rules validate against each tool schema, and treat the automated reasoning findings on overly permissive, overly restrictive or unsatisfiable rules as a review aid that your team still signs off. Confirm that decision logs reach Amazon CloudWatch metrics and logs and that retention and access meet your audit needs (AgentCore Policy documentation). If you need temporal conditions such as a prior approval or a running total, confirm how Dogwood conditions are written and supported in your setup. Finally, list every route by which an agent can reach a tool without passing through a gateway, such as direct MCP server or API access, because this control does not cover those calls.

Which AgentCore Policy capabilities are built in and what each needs

This table lists each AgentCore Policy capability, its status, and what it depends on before you can rely on it. Read the status column as what AWS documents, and treat each row as an item to confirm for your account and region. The AWS documentation reviewed here names no separate edition or tier for these features, so ask AWS to confirm licensing, regional availability and logging charges before approval.

CapabilityStatusWhat it depends on
Cedar rules evaluated on every tool call through a GatewayBuilt in as AgentCore PolicyA policy engine associated with the gateway. Rules apply to every associated gateway when scope matches.
Natural-language rule generation, with flags for permissive, restrictive or unsatisfiable rulesBuilt in; human review still neededValidation against the tool schema. Generated rules still need reviewer approval before you rely on them.
Default-deny and forbid-wins evaluationBuilt inNo separate setup. The policy engine enforces it automatically for requests that match a policy's scope.
Cedar principals from OAuth JWT claims or IAM ARNsDepends on inbound authenticationYour inbound authentication setup determines which principal types callers present. Covered on the AgentCore authentication page.
Dogwood temporal and guardrail-score conditionsDescribed in AWS docs; confirm availabilityDogwood is open source and Cedar-compatible. Confirm where it runs in AgentCore and whether it is enabled in your region.
Decision logs in CloudWatch metrics and logsBuilt in; confirm log settings and chargesLog group settings, retention and CloudWatch charges. Confirm each with AWS for your account.
Blocking gateways with no inbound authorizationAvailable through IAM configurationIAM condition key bedrock-agentcore:GatewayAuthorizerType, set through your organization's AWS management structure.
Registry approval workflowSeparate serviceAgentCore Registry governs catalog publication. It does not enforce tool calls at runtime.

How AgentCore Policy evaluates each tool call before it runs

AgentCore Policy decides whether each tool call may run, and the policy engine makes that decision before the tool is reached. Three parts make this work. AgentCore Gateway turns APIs, Lambda functions and existing MCP servers into tools that agents can call. The policy engine stores deterministic policies and is associated with one or more gateways. When an agent calls a tool, the engine evaluates the request and allows or denies it before tool access happens. Reviewers should confirm that every path to a backend tool runs through an associated gateway, since the engine can only evaluate traffic that reaches it. Use the core concepts guide to map these terms to your own gateways before the review starts.

Rules match on who is calling and what the call contains. For a user signing in through OAuth, the principal is AgentCore::OAuthUser, built from the JWT sub claim, and claims such as role or scope can be carried as tags that rules read. For a caller authenticated with IAM, the principal is AgentCore::IamEntity, built from the caller's IAM ARN. Rules can also read tool input parameters. An illustrative policy might permit a read tool for any signed-in user but deny a write tool when a target parameter falls outside an approved list. Scope matters as well: each policy applies to every gateway associated with the engine when its scope matches the request. Before rollout, test a token from each role your identity provider issues and confirm the rules fire as the security team expects.

Enforcement is decided by the engine, and the logs are the audit trail. The engine applies default-deny and forbid-wins semantics automatically, so a request that no permit covers is refused, and a matching forbid overrides any permit. Every enforcement decision is logged through Amazon CloudWatch metrics and logs, which is the record that security and compliance teams use to audit agent behavior. Ask AWS or your account team which log fields record the principal, the tool called, the parameters and the decision, and confirm the retention period and who can read those logs in your account. Caller authentication and execution isolation are covered on the sibling pages, so this review should focus on whether the policies themselves match your approved tool use. The policy documentation lists the current behavior.

Every tool call passes the policy engine before it runs

The diagram starts with an authenticated agent caller, whose tool call reaches an AgentCore Gateway. The gateway intercepts the request and hands it to the policy engine attached to that gateway, which evaluates the rules before any tool runs. Default deny applies, and a forbid rule wins over a permit. An allowed request reaches the tool, which can be a Lambda function, an API or an existing MCP server. A denied request returns a refusal to the agent without reaching the tool. Both branches send every decision to CloudWatch metrics and logs, so check that audit coverage on both paths. The Registry approval workflow sits outside the runtime path and does not check individual tool calls.

Each tool call passes the policy engine, and both branches log to CloudWatch.

Decisions to make before writing Cedar rules

Six choices shape how AgentCore Policy evaluates tool calls, and each one sets what your rules can key on and who must review them later. Settle them before the first Cedar rule is written, because a later change to identity, scope or schemas affects every policy attached to the engine. Record each answer in change control so reviewers can trace which rules applied to which callers and gateways.

Identity model for principals

Cedar principals come from one of two sources: AgentCore::OAuthUser, built from the JWT sub claim with claims such as role or scope as tags, or AgentCore::IamEntity, built from the caller's IAM ARN. Choose the identity model first, because rules can only key on what that model carries. For audit, reviewers can trace a decision only to the identity form the rule used. For change control, switching models means rewriting and re-reviewing every rule. For rollout, test each caller type before enforcement.

Policy core concepts

Rule scope across gateways

Each policy applies to every gateway associated with its engine when the scope matches the request, so one engine can govern several gateways. Decide between one engine per gateway and a shared engine before anyone writes a rule. A shared engine means one edit can change tool access on every attached gateway. For audit, confirm that each decision identifies its gateway, since one rule can apply to many. For change control, route engine edits through the same approval path as gateway changes. For rollout, stage a new rule on one gateway before attaching it to the others.

Policy in AgentCore

Tool input parameters to check

Rules can check the input parameters of a tool call, for example a file path or an account identifier. Natural-language authoring validates candidate policies against the tool schema, so that schema becomes the contract your rules depend on. Freeze the schema for each tool before writing rules. For audit, a renamed or retyped parameter makes earlier decisions hard to interpret. For change control, every schema change should trigger a rule review. For rollout, agree with each tool owner how and when schema changes reach the gateway.

Dogwood temporal rules

Dogwood, an open-source policy language compatible with Cedar, adds conditions on earlier actions in the same session, such as requiring a prior approval or capping a running total. Each condition adds session state that reviewers must trace. Decide whether approvals and totals need session logic at all. A stateless Cedar rule is simpler to review. For audit, reconstructing a decision means replaying session history. For change control, a session rule needs tests that cover ordering and reset. For rollout, confirm how session state is scoped and expires in your deployment.

Review of generated rules

Plain-English authoring validates candidate policies against the tool schema and uses automated reasoning to flag rules that are overly permissive, overly restrictive or can never be satisfied. Those flags assist a reviewer, and they are no substitute for one. Require a named person to read the generated Cedar before attachment. For audit, store the English request next to the Cedar text it produced. For change control, treat every regenerated rule as a new change. For rollout, confirm whether the engine can evaluate a candidate without enforcing it before you depend on that step.

Decision log location and access

AWS says every Policy enforcement decision is logged through Amazon CloudWatch metrics and logs. Decide where those logs live, how long they are kept and who can read them before go-live. Confirm the log group, the retention period and the IAM roles allowed to query or export the logs, including any readers outside the security team. For audit, these logs are the main record of agent tool access. For change control, restrict who can alter log settings. For rollout, verify that a test denial appears in the logs before you rely on them.

How the policy answer changes by caller type and tool source

When a person signs in through an OAuth identity provider and calls tools through an AgentCore Gateway, Policy builds the principal as AgentCore::OAuthUser from the JWT sub claim. Claims such as role or scope become tags that rules can test, so the policy is only as reliable as the tokens behind it. AgentCore Identity works with existing providers such as Amazon Cognito, Okta, Microsoft Entra ID and Auth0, so the claim design lives in your identity provider and the policy inherits it. Review the principal definitions before mapping claims to rules.

  • Claim names: Confirm the claim names your identity provider emits into the access token and which of them Gateway passes through as tags.
  • Group and role values: Check who controls the role or scope values. If users can change their own group membership, a rule keyed on that value does not restrict them.
  • Token lifetime and revocation: Ask how quickly a removed user loses access, because a valid token keeps satisfying the same tags until it expires.
  • Tool input conditions: Confirm which request fields the rules read, since conditions on tool input can narrow a permitted tool to specific arguments.

Before approval, have the identity team export a sample access token and map every claim the policy reads to the identity provider setting that populates it.

Where AgentCore Policy does not reach and how teams cover each gap

Policy evaluates only the tool calls that reach a gateway with a policy engine attached. The cards cover the gaps around that coverage: traffic that skips gateways, gateway authorization, rule intent, registry approvals, decision logs and open-source Dogwood behavior, with the usual cover for each.

Traffic that bypasses a gateway

Policy checks run only on requests that pass through an AgentCore Gateway. Any tool endpoint that agents can reach without the gateway sits outside policy entirely. Teams usually cover this with network and IAM design that makes the gateway the only route to each downstream tool, including limits on direct network paths and on the IAM permissions that call those services. Build a gateway-only inventory of every tool and MCP server that agents can reach, and compare it against the gateways that have a policy engine associated. Repeat the comparison whenever a new tool is added.

Policy overview

Gateways without inbound authorization

A gateway created with no inbound authorization (authorizerType NONE) gives Cedar principals no OAuth user or IAM identity to match. Deny gateway creation with authorizerType NONE across the organization by using the bedrock-agentcore:GatewayAuthorizerType IAM condition key, which AWS recommends for this purpose. Apply the condition in the policies that control who can create gateways, then test that a create request without inbound authorization is refused. Because the condition governs creation, review the inbound authorization settings of gateways that already exist as a separate step.

Inbound authorization setup

Generated rules that validate

Natural-language authoring checks a candidate policy against the tool schema and uses automated reasoning to flag rules that are overly permissive, overly restrictive or can never be satisfied. A rule can pass those checks and still allow or block the wrong tool call. Validation cannot show whether a rule matches what the team meant. Cover this with a named reviewer who reads each Cedar rule against the requests it governs, and with tests that send allowed and denied tool calls through the policy engine before the rule is attached to a gateway. Keep the test cases in source control so they run again after every change.

Registry approval and runtime policy

The AgentCore Registry provides a governed workflow for publishing, reviewing and approving agents, MCP servers, tools and skills, including resources hosted on premises or in other clouds. Approval controls what gets published. It does not determine which resources a policy engine guards at runtime. Check that every approved resource is the one attached to the policy engine and gateway in production. Confirm that the tool names used in policy match approved registry entries, run this check on a schedule and after each new publication, and record who signs off on the mapping.

Decision logs depend on configuration

AWS states that every Policy enforcement decision is logged through Amazon CloudWatch metrics and logs. Those logs are only as useful as the CloudWatch setup behind them. Confirm the log destination for each policy engine, set retention to match your audit requirements, and limit read and delete access to the security and compliance team. Schedule access reviews of those log groups and confirm that someone monitors them. Retention and encryption details are covered on the compliance page.

Dogwood open source maintenance

Dogwood is an open-source policy language compatible with Cedar. It adds temporal conditions over earlier actions in a session, such as requiring a prior approval or capping a running total, and conditions on guardrail scores. Confirm which Dogwood behavior AgentCore runs before your rules depend on it. Ask AWS which Dogwood features are available in the service, and test whether a rule that uses them behaves the same way in the open-source project. Assign an owner to track changes on both sides, and rerun your rule tests whenever either side updates.

Order of work to put tool-call rules into production

Tool-call rules only protect you when they sit on the right gateways, match the identities your callers actually carry, and send their decisions to a place someone reads. The six steps below run in this order, and each ends with a check that a named owner signs off before the next step starts. Owner roles are suggestions to map to your own governance model.

  1. Inventory gateways and confirm inbound authorization

    Security engineering and the platform team list every AgentCore Gateway, the MCP servers and APIs each one exposes, and the Lambda functions or existing services turned into tools. For each gateway, confirm that inbound authorization is configured and that none runs with authorizerType NONE. Ask the platform team whether the bedrock-agentcore:GatewayAuthorizerType IAM condition key already blocks gateways without inbound authorization across the organization. Sign-off: the security owner for the gateway inventory. Done when every gateway appears with its authorizer type and a named owner.

  2. Define principals and claims for rules

    The identity owner decides which principal type each caller uses. AgentCore::OAuthUser is built from the JWT sub claim, with claims such as role or scope carried as tags. AgentCore::IamEntity is built from the caller's IAM ARN. Map the claims your identity provider issues, confirm that the group, role and scope values are stable, and record who may change them. Rules can also test tool input parameters, so list the fields that matter for each tool. Reference: Policy in AgentCore: core concepts. Sign-off: the identity owner and the application owner. Done when a written claim map covers every gateway in scope.

  3. Write default-deny rules for high-impact tools

    Start with tools that write, delete, move money or expose personal data. Write Cedar rules that permit only the named principals, actions and inputs those tools need. The engine applies default-deny and forbid-wins semantics, so an explicit forbid overrides any permit. Generated rules from plain English are drafts only: the engine checks them against the tool schema and flags overly permissive, overly restrictive or unsatisfiable rules, but a reviewer still reads every line against the approved access matrix. If a rule needs an earlier approval in the same session, confirm that Dogwood conditions fit before relying on them. Sign-off: the application owner and a security reviewer. Done when each rule traces to an approved request.

  4. Attach the engine and test outcomes

    The platform team attaches each policy engine to the gateways in scope. A policy applies to every gateway associated with its engine when the request matches its scope, so check for shared gateways before attaching. For each rule, test an allowed caller with valid inputs, a caller missing the expected claim, an out-of-range input and a call to a tool the policy does not cover. Compare each result with the expected outcome in the test plan, and repeat the tests after any tool schema change. Sign-off: the security tester and the platform owner. Done when every rule has recorded allow and deny results for each gateway it covers.

  5. Confirm decision logs and set denial alerts

    Every Policy enforcement decision is logged through Amazon CloudWatch metrics and logs. Confirm with the security operations team which log group or metric the team reads, and confirm that it receives decisions from every gateway in scope. Confirm that retention in that destination meets your record requirements. Then set alerts on denials, with thresholds and response steps agreed with the operations team. Sign-off: the security operations lead. Done when a test denial appears in the destination and triggers the agreed alert.

  6. Approve new tools in the Registry

    Register agents, MCP servers, tools and skills in AgentCore Registry and require its governed review and approval workflow before any new resource is published. The Registry also covers resources hosted on premises or in other clouds. Decide who reviews, who approves, and which new resources need a policy review before they can reach a gateway. Sign-off: the change approval board or the Registry security owner. Done when a new tool cannot reach a gateway without a recorded approval and a matching policy review.

What a security reviewer asks to see for tool-call controls

This table lists the artifacts a security reviewer can request to check whether AgentCore Policy controls tool calls as configured. Each row names the evidence, what it shows, and the system that holds it, so the reviewer can ask the owner for a current export. These artifacts support a review but do not constitute an audit report, and they show configuration only as of the time they were pulled.

EvidenceWhat it showsWhere it comes from
Gateway inventoryEach gateway with its attached policy engine and inbound authorization setting. Flag any gateway without an engine or with authorizerType NONE.AgentCore configuration in the account
Cedar and Dogwood rule filesThe rule text in force, with commit history showing who changed each rule, when, and through which review.Team source control and the policy engine's stored policies
Allow and deny test resultsPer-tool results showing which calls the policy allows and which it denies, including default-deny cases for tools without a matching permit.Team test records
Sample decision log entriesEntries showing the principal and tool fields for allowed and denied calls. Confirm the exact field names with AWS before relying on them.Amazon CloudWatch logs for policy decisions
IAM block on unauthenticated gatewaysThe statement that denies gateway creation when authorizerType is NONE, and the roles and accounts it is attached to.IAM in the management account
Registry approval recordsApproval records for each agent, tool, MCP server and skill, showing who reviewed it and when it was approved.AgentCore Registry approval workflow

Questions buyers ask about AgentCore Policy cost, effort and self-service

How much does AgentCore Policy cost to run?

AWS states that AgentCore uses consumption-based pricing with no upfront commitments or minimum fees, so Policy costs follow metered usage. Confirm in the AWS pricing for your region which meters apply to policy evaluations and which apply to CloudWatch log ingestion and storage, because AWS logs every enforcement decision through CloudWatch metrics and logs. The main cost drivers are the volume of tool calls that pass through gateways with an engine attached, the volume of log data written, and how long logs are retained. Other AgentCore services in the design, such as Gateway or Runtime, carry their own meters, so list them in your cost model. AWS bills consumption. DeployOpen is paid separately for any engagement, and its quote follows from a written scope because it does not publish a price list. Ask the team that owns the budget for the meter list and the volume assumptions behind it.

How much effort does an AgentCore Policy rollout take?

Effort scales with the size of the tool surface and the number of rules, so it varies by environment. The main drivers are the number of gateways and the tools each one exposes, because every policy applies to each gateway associated with its engine when the scope matches. Tool schemas matter as well: natural-language authoring validates candidate rules against the tool schema, so vague or inconsistent schemas tend to add review work. The number of rules and how much they overlap affects both authoring and testing. Each generated rule needs human review before it governs a gateway, so review effort grows with the rule count. Start by counting gateways, tools, identity claims and approval owners, since those counts set most of the work. No duration is given here. Ask the delivery team for a plan tied to that inventory and to your change process.

Can our own team set up AgentCore Policy without outside help?

Yes, a team that already runs AgentCore Gateway can create policy engines, write Cedar rules and attach engines to gateways without outside help. What the team cannot hand off is ownership of the outcome. Three duties stay in-house: reviewing every rule, including rules generated from plain English; reviewing decision logs in CloudWatch on a schedule that a named person is accountable for; and keeping a current gateway inventory. The inventory should include a check for any gateway with no inbound authorization. AWS recommends using the bedrock-agentcore:GatewayAuthorizerType IAM condition key to deny creating gateways with authorizerType NONE across an organization, so confirm that control is in place. Outside help fits a fixed-scope review. DeployOpen tests AI agent setups for prompt injection, tool and file permissions, data exposure, credential handling, and SSO and admin settings, then delivers a findings report with fixes and a retest. Scope is agreed in writing before work starts.

What should a quote request for AgentCore Policy work include?

A useful quote request names the systems and owners so the scope can be written and agreed before work starts. Include these four items:

  • The gateway and tool list: each gateway, the tools it exposes (APIs, Lambda functions or existing MCP servers), and the engine each gateway attaches to.
  • The identity provider and claims: the provider in use (for example Amazon Cognito, Okta, Microsoft Entra ID or Auth0), the JWT claims that carry role or scope, and any IAM callers.
  • The log destination: the CloudWatch log groups, the retention expectation, who reads them, and any export into a SIEM.
  • The approval owners: who signs off on each rule, who approves exceptions, and who approves Registry publishing if that workflow is in use.

Also ask for deliverables, timelines and the test plan in writing. DeployOpen does not publish a price list, so the quote follows from that written scope.

Does AgentCore Policy cover sandboxing or HIPAA compliance?

No. AgentCore Policy checks each tool call at the gateway before the tool runs, and that is its scope. It does not isolate agent code execution, and it does not establish HIPAA eligibility or audit scope. Those questions are covered on the sandboxing and compliance pages in this series, and reviewers should read them alongside this one. Policy decision logs are useful audit input because each enforcement decision is recorded through CloudWatch metrics and logs. A log shows what the engine decided and says nothing on its own about program compliance. Ask AWS for the current compliance program listings for AgentCore, and ask your compliance team which controls the logs support. DeployOpen prepares systems, controls and evidence for compliance assessments. Independent auditors and certification bodies issue the reports and attestations, so an engagement with DeployOpen does not replace either.

What happens when two Cedar policies conflict?

Under the engine's semantics, forbid wins, so a matching forbid denies the call even when a permit also matches. Default-deny also applies: a tool call that no permit covers is denied. AWS says the engine enforces both automatically, but reviewers should test the outcome directly. Build a small test set with at least one request that a permit allows and a forbid overrides, one request that a scope mismatch leaves untouched, and one request that a permit on a different tool should not reach. Remember that each policy applies to every gateway associated with the engine when its scope matches, so a rule written for one gateway may act on another. Dogwood adds temporal conditions, such as a prior approval earlier in the same session, which add cases to the test set. Read the policy core concepts page before you write the tests.

How DeployOpen tests tool-call controls before agents go live

DeployOpen reviews the AgentCore Policy setup around your gateways as part of an AI agent rollout security review, testing whether the Cedar rules hold up against the tool calls your agents make. The work is delivered as a fixed-scope engagement with a written scope agreed before work starts.

How we scope

  • The written scope names the gateways, policy engines and Cedar rules under review, and the tools each one governs.
  • Scope also covers the identity claims rules depend on, such as JWT sub, role or scope tags, and IAM ARNs.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.

How we build

  • Test scenarios cover default-deny behavior, forbid-wins conflicts and tool calls that match no permit rule.
  • Testers attempt prompt injection that pushes an agent toward tool calls its policy should block.
  • Each test run is traced through the CloudWatch metrics and logs that AgentCore Policy writes for every decision.

How we hand over

  • The findings report lists each permissive or contradictory rule, the Cedar or Dogwood change proposed, and the evidence.
  • A retest confirms that the fixed rules block tool calls that were allowed in the first round.
  • Handover covers the IAM condition key that blocks gateways with no inbound authorization, and the Registry approval workflow.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after go-live.
  • Re-review is recommended when a gateway, tool schema or Cedar rule changes, so the approved rules match what runs.
  • Confirm with AWS which Policy features and Registry workflows your account and region support before the review starts.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.