October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk12 min

How to Isolate Amazon Bedrock Agent Tools From Production Credentials and Code

Learn how to keep Amazon Bedrock agent tools inside a narrow execution boundary using separate IAM roles, restricted Lambda or AgentCore runtimes, least-privilege policies, and application-side authorization.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep every Bedrock tool behind a dedicated execution boundary: separate the caller, Bedrock’s service-assumed role, and the runtime or Lambda execution identity; grant each only the permissions it needs; and prevent deployment credentials, unrelated source code, files, and network destinations from entering the runtime. For existing Bedrock Agents Classic action groups, that means a narrowly scoped Bedrock service role plus a separately scoped Lambda execution role and Lambda resource policy. For new implementations, follow the corresponding AgentCore identity and runtime model instead.

What isolation means for a Bedrock agent

Isolation is not a single IAM switch. It is a set of independent boundaries that limit what an agent can call, what code can run, which data the code can reach, and which identity pays for those calls. A useful design treats the model as an untrusted decision-maker that can request a tool, not as a principal that should inherit an administrator’s credentials.

As an Amazon Associate I earn from qualifying purchases.

  • Identity boundary: the identity that invokes an agent is not the identity that Bedrock assumes, and neither is the identity used by a Lambda function or AgentCore runtime.
  • Permission boundary: each identity has only the model, schema, data, API, and runtime permissions required for its task. AWS’s preventative guidance says custom policies should grant only the permissions required to perform a task (AWS preventative security best practice for agents).
  • Code and data boundary: the tool receives only the handler code, libraries, files, secrets, and data sources that its operation needs. Deployment credentials and unrelated repositories stay outside the runtime.
  • Network boundary: outbound destinations are limited to the APIs and services the tool is meant to call.
  • Action boundary: a tool that can change an account, send a message, move money, or alter data performs its own authorization checks and, where required, waits for human approval. A natural-language plan from the model is not authorization.

These layers matter together. A narrowly scoped IAM role cannot compensate for a runtime that contains production credentials, and a sandboxed runtime cannot make an over-broad role safe.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the correct Bedrock implementation path

AWS documentation currently distinguishes the original action-group product from the newer AgentCore direction. The action-group page calls the original product Bedrock Agents Classic, says it is no longer open to new customers, and points readers toward AgentCore for similar capabilities (AWS action groups documentation). Existing customers can continue to use Classic, but a new design should not assume that every Classic role or Lambda detail maps directly to AgentCore.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
Decision point Agents Classic AgentCore
Who should use it? Existing customers maintaining Bedrock agents with action groups. New implementations following AWS’s current direction for similar agent capabilities.
Primary identity layout A Bedrock service role plus a Lambda function resource policy and a separate Lambda execution role. Distinct caller, service-assumed, and execution-environment identities.
Execution boundary Business logic runs in an action-group Lambda function. Business logic runs in a configured AgentCore execution environment.
What must be scoped? Model inference, action-group schemas, optional knowledge-base or guardrail features, Lambda invocation, and the Lambda’s downstream APIs. Runtime and runtime-endpoint access, files, network destinations, tools, credentials, and downstream APIs.
High-impact operations Authorization belongs in the Lambda and any downstream service; add human review where the operation requires it. Authorization and required human review belong in the application or tool implementation, independently of the model’s choice.

The three identities you should keep separate

AWS’s AgentCore security guidance describes three identities in a session: the caller, the role assumed by the service, and the execution-environment identity (AWS security and IAM roles). The same separation is a useful mental model for Classic even though the concrete resources differ.

Caller identity

This is the human, application, or CI workload that starts an agent session or creates a runtime. It should be allowed to invoke only the intended agent or runtime and to perform only the session-management operations it needs. It should not automatically receive the permissions used by a tool to read a database or modify a production resource.

Service-assumed identity

Bedrock or AgentCore assumes this role to perform service-side work. In Classic, it commonly covers foundation-model inference and access to action-group API schemas, with additional statements only when enabled features require them. In AgentCore, the service role is one of the three identities and should not be merged with the runtime’s application identity.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Execution-environment identity

This is the role used by the Lambda handler in Classic or by the AgentCore runtime environment. It should contain only the downstream permissions implemented by that tool: for example, access to one queue, one table, or one internal API operation rather than broad account administration. It is the identity most likely to be abused if a tool has a code or dependency vulnerability, so do not attach deployment or operator permissions to it.

“Use separate IAM roles for these tasks.” — AWS documentation, Security and IAM roles

Agents Classic: isolate an action-group Lambda

The following procedure applies to existing Bedrock Agents Classic deployments. The names and optional statements should be checked against the current AWS console and documentation for the features enabled on your agent.

  1. Inventory exactly what the agent uses

    List the foundation model, action-group API schemas, knowledge bases, guardrails, data stores, and any other Bedrock features attached to the agent. Separate required features from features that were enabled experimentally. The service role should contain statements only for features in active use; AWS identifies model inference and action-group schema access as common permissions and treats knowledge-base and other feature permissions as conditional (AWS service-role guidance).

    What’s actually slowing this PC down?

    Pick the symptom - the matching free tool is one click away.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    Rank #2
    Sale
    Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
    • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
    • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
    • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
    • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
    • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
  2. Create a dedicated Bedrock service role

    Create a role used only by this agent or by a tightly related group of agents. Its trust relationship must allow the Bedrock service to assume it. The documented trust example also uses source-account and source-ARN conditions. During initial creation, AWS examples may use a wildcard for the agent identifier; after the agent exists, replace that wildcard with the specific agent ID so another agent cannot use the same trust relationship (AWS service-role guidance).

    Do not attach administrator, deployment, source-control, or operator policies to this role. Keep optional statements out when the corresponding feature is not enabled. If the agent later gains a knowledge base or another feature, add the smallest documented statement needed for that feature and review the trust and resource scope at the same time.

  3. Give the service role only service-side permissions

    Attach the minimum permissions needed for the model and the configured agent features. The role is not a substitute for the Lambda execution role: it should not be granted the database, ticketing, file-system, or internal-API permissions that belong to the action handler.

  4. Create a separate Lambda execution role

    The action-group function’s execution role should contain the downstream operations implemented by that function and nothing else. If one action reads a reporting table and another sends an approval request, use separate functions or separate narrowly scoped roles when practical. Keep deployment credentials, package-repository tokens, administrator sessions, and unrelated environment variables out of the function configuration.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  5. Add the Lambda resource-based policy

    Classic action-group invocation has two policy boundaries. The Bedrock service role governs what Bedrock can do as a service; the Lambda function’s resource-based policy governs whether Bedrock may invoke that particular function. AWS requires the function policy for an action group and documents optional condition keys for further restriction (AWS Lambda action-group configuration).

    Set the policy’s resource to the relevant function rather than a broad family of functions. Use the documented service principal and, where applicable, condition keys that bind the permission to the intended account, agent, or source ARN. A role policy alone does not authorize the invocation, and a permissive function policy does not grant the handler access to its downstream systems.

  6. Validate the event and response contract

    Bedrock sends action parameters and related metadata in the Lambda event. Parse and validate every field, enforce allowed values and lengths, and reject unexpected actions before calling a downstream service. Return the structured response format required by the action-group contract; do not pass arbitrary model text directly into a privileged API.

    Rank #3
    New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
    • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
    • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
    • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
    • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
    • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
  7. Keep the deployment path separate

    The identity that packages or updates the Lambda may need write access to deployment artifacts and infrastructure. That identity must not be placed in the function’s runtime environment. Use a deployment role or pipeline identity for release operations and a runtime role for business operations, with no shared long-lived access keys.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  8. Test the negative cases

    Invoke the agent with a request that should use the tool, one that should be refused, and one containing an unexpected parameter. Confirm that the Lambda can perform only its intended downstream operation, that an unrelated API call fails with an authorization error, and that the resource-based policy does not allow an unintended function or source.

AgentCore: isolate the execution environment

For AgentCore, apply the same principle with the product’s runtime model rather than copying a Classic Lambda policy. The security guidance recommends separate roles for the caller, the service, and the execution environment, each with only the permissions required (AWS security and IAM roles).

Scope the caller to the intended runtime

Invocation and session-stop permissions should be scoped to the specific Runtime and Runtime endpoint ARNs. Avoid account-wide resource wildcards when the caller needs only one environment. If several environments exist, separate development, staging, and production resources so a caller authorized for one cannot start or stop sessions in another.

Keep service and runtime permissions distinct

The role assumed by the service should not be reused as the runtime’s application role. The runtime role should contain only the APIs, data stores, queues, files, and other resources that the tools actually call. A service-side permission to manage a session is not a reason to grant the application permission to edit production data.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Handle authentication details as version-sensitive

AWS’s security page includes preview-specific instructions for authentication and Signature Version 4. Those instructions refer to using an AWS credential profile or the standard provider chain, temporary-credential session tokens, and an iam:PassRole permission for the caller when creating a session (AWS security and IAM roles). Preview behavior and exact policy examples can change, so verify the current page before copying authentication code or granting iam:PassRole. Scope that permission to the exact role the caller is allowed to pass; never use it as a general delegation mechanism.

Contain the runtime, not just the IAM role

Expose only required files and code

Build a small deployment artifact containing the tool and its necessary dependencies. Do not mount a production source tree, infrastructure repository, local credential directory, or shared build workspace into the runtime. Remove test fixtures and configuration files that contain connection strings or unrelated customer data. If a tool needs a template or schema, ship that specific file rather than the directory that happens to contain it.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Use short-lived, task-specific credentials

Prefer the runtime’s role and temporary credentials supplied by AWS over embedded access keys. Do not copy a developer profile, CI secret, or production administrator token into environment variables, source files, container layers, or logs. Rotate and revoke any credential that has appeared in a tool package or diagnostic output, then inspect the package and build process to prevent recurrence.

Restrict network destinations

Allow outbound connections only to the services required by the tool. A function that writes to one internal API should not have unrestricted internet access simply because a dependency might need it. Where the architecture supports it, use private connectivity and explicit egress controls, and log denied destinations as signals of unexpected behavior.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Publish only the tools the task needs

An agent does not need a catalog of every internal function. Expose separate action groups or runtimes for materially different trust levels, such as read-only reporting and production changes. Keep administrative, migration, and destructive operations out of the general-purpose tool set.

Put authorization at the point of effect

For an operation with an external effect, the tool must re-check the caller, target, scope, and current state immediately before performing it. Add a confirmation or human-review step where organizational policy requires one. The model’s selection of an action is an input to the application, not proof that the action is approved.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Treat prompts, documents, web pages, and tool output as untrusted

Agent workflows often retrieve instructions from documents, websites, tickets, or another tool. Those contents can contain prompt-injection text that attempts to make the model reveal secrets, call a different function, or weaken a control. Do not treat retrieved prose as an IAM grant or as a trusted instruction.

  • Keep authorization checks in application code and downstream services rather than asking the model to enforce them.
  • Pass only the minimum retrieved content needed for the task and label its origin clearly in the application’s data model.
  • Validate tool arguments against an allowlist, type, length, tenant, and resource ownership before making an API call.
  • Never include credentials, secret values, or unrestricted internal configuration in model context.
  • Record the requested action, effective identity, target resource, authorization decision, and result so an operator can reconstruct a suspicious run.

IAM scoping remains necessary even when an agent uses guardrails or other model-safety features. Those controls address different failure modes and do not replace application-side authorization.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verification checklist before production

Check Expected result If it fails
Role separation Caller, service-assumed role, and execution role are distinct; Classic Lambda has its own execution role. Split the policies and remove permissions that belong to another identity.
Trust relationship Only the intended Bedrock service can assume the Classic role, with source conditions and a specific agent ID after creation. Replace broad principals or wildcard agent identifiers and retest assumption.
Feature permissions Model, schema, knowledge-base, guardrail, and other statements match enabled features. Remove unused statements; add only the documented permission required by the feature that is actually enabled.
Lambda invocation The function resource policy names the intended function and permits the intended Bedrock invocation. Check the resource, principal, source conditions, and region; a role policy alone is insufficient.
Runtime contents No deployment keys, developer profiles, unrelated source, or production secrets are present. Rebuild the artifact and rotate exposed credentials.
Network egress Only documented downstream destinations are reachable. Remove broad egress and investigate denied-connection logs.
High-impact action The tool independently authorizes the request and requires review when policy demands it. Move the decision into the application or downstream service; do not rely on the model’s text.
Negative tests Unrelated reads, writes, function invokes, and session operations are denied. Trace the effective policy and resource policy, then reduce the statement to the exact resource and operation.

Common failure modes and fixes

The agent can invoke the model but not the action group

Check both boundaries: the Bedrock service role and the Lambda function’s resource-based policy. Confirm that the function policy names the actual function ARN and that its principal and conditions match the Classic action-group invocation documented by AWS (Lambda action-group configuration).

The Lambda works in development but exposes production data

The runtime role or packaged credentials are broader than the developer intended. Inspect attached policies, environment variables, container layers, and the build workspace. Replace the role with one limited to the exact production operation, remove copied credentials, and rotate anything that was exposed.

A trust policy works for every agent in the account

The trust relationship still contains a wildcard agent identifier. After the agent is created, bind the source ARN to that specific agent as AWS recommends (Create a service role for Bedrock Agents).

A new project is copying Classic instructions

Stop and determine whether the project is an existing Agents Classic customer or an AgentCore implementation. Classic’s Lambda resource-policy pattern is not a substitute for AgentCore’s caller, service, and execution-environment roles. Start from the current AgentCore security documentation and scope runtime and runtime-endpoint permissions to the resources being deployed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A tool follows instructions embedded in a document

Assume prompt injection. Treat the document as data, validate the requested operation in application code, and require the tool’s authorization check before any external effect. Narrow IAM permissions so a successful injection still cannot reach unrelated resources.

A practical operating model

Maintain an inventory for each agent or runtime that names its caller, service role, execution role, tools, downstream resources, files, and network destinations. Review that inventory whenever a model, action group, schema, dependency, or data source changes. Keep development, staging, and production identities and runtimes separate, and make policy changes through the same controlled deployment process as application code.

Use logs to answer four questions for every tool call: who initiated the session, which service and execution identities were effective, what exact resource was targeted, and whether the application authorized the operation. Alert on denied calls to sensitive resources, unexpected destinations, attempts to use deployment-only APIs, and changes to trust or resource-based policies.

For existing Classic agents, the minimum safe pattern is a dedicated Bedrock service role, a dedicated Lambda execution role, a function resource policy restricted to that function, and application-level validation and authorization. For new work, implement the equivalent separation with AgentCore’s three-role model and a constrained execution environment. In both cases, isolation succeeds only when IAM, runtime contents, network access, and tool-side authorization all enforce the same narrow task boundary.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.