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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

The practical path is Amazon Bedrock AgentCore Runtime plus the open-source bedrock-agentcore-starter-toolkit. You wrap an agent in a BedrockAgentCoreApp, test it locally over HTTP, configure a deployment, and deploy it with the agentcore CLI. When the agent must execute generated Python, JavaScript, or TypeScript, add AgentCore Code Interpreter and choose its network mode and IAM role deliberately. Runtime sessions isolate execution and can preserve conversational context; Code Interpreter sessions provide a managed microVM for code and file operations.

What you are building

There are two AWS capabilities to distinguish:

  • AgentCore Runtime is the managed host for your agent application. It is framework-agnostic, supports multiple open-source frameworks and models, and gives each runtime session an isolated execution environment. Reusing a session ID lets a workflow retain context across invocations.
  • AgentCore Code Interpreter is the managed execution tool for agent-generated code and files. It runs Python, JavaScript, or TypeScript in a dedicated microVM with isolated CPU, memory, and filesystem resources.

Runtime alone is sufficient when the agent only calls its model and ordinary tools. Add Code Interpreter when it must calculate with untrusted input, transform files, run data-science code, or execute other arbitrary snippets without putting that code in your main application process.

The starter toolkit supplies the command-line workflow. The minimal lifecycle is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Create a Python 3.10 or newer virtual environment.
  2. Install bedrock-agentcore, strands-agents, and bedrock-agentcore-starter-toolkit.
  3. Expose your agent through a BedrockAgentCoreApp entrypoint.
  4. Run and call the app locally on port 8080.
  5. Run agentcore configure, then agentcore deploy.
  6. Check provisioning with agentcore status and invoke the deployed runtime.

Prerequisites and isolation choices

Software and AWS access

  • Python 3.10 or later.
  • An AWS account and credentials configured for the region in which you will deploy.
  • Permission to create or use the IAM, S3, ECR, CodeBuild, CloudWatch, AgentCore Runtime, and (if selected) Code Interpreter resources that your deployment requires.
  • A model and framework supported by the agent code you intend to run.

The toolkit defaults to the us-west-2 region during configuration. You can select another region with the configure command’s -r option. Region availability and model access are separate AWS concerns, so verify both before deployment.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

Decide what “sandbox” means for your workload

A Runtime session isolates the agent process, but it is not automatically a general-purpose code-execution sandbox. For generated code, use Code Interpreter and select one of its network modes:

Network mode Reach Use when
Sandbox Limited access to AWS services Untrusted code needs selected AWS capabilities but should not have public internet access.
Public Public internet access The code genuinely needs external sites or package endpoints and that exposure is acceptable.
VPC Private resources through your VPC, while remaining isolated from the public internet The agent must work with internal services, databases, or private endpoints.

Network mode does not replace authorization. Attach a dedicated, least-privilege IAM execution role and grant only the AWS actions the code needs.

Step 1: Create an isolated Python project

Keep the agent and its dependencies in a dedicated virtual environment. The following commands create a project directory, activate the environment, upgrade packaging tools, and install the packages used by the AWS quickstart.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
mkdir my-agent
cd my-agent
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install bedrock-agentcore strands-agents bedrock-agentcore-starter-toolkit

On Windows PowerShell, activate the environment with .venvScriptsActivate.ps1. Keep the environment active for every local test and toolkit command so the CLI and the Python imports resolve to the same installation.

Step 2: Wrap the agent in a BedrockAgentCoreApp

The runtime needs a clear entrypoint. Create my_agent.py with an application object, an agent object, and a function decorated with @app.entrypoint. The function reads a prompt from the incoming payload, calls the agent, and returns a JSON-serializable value.

from bedrock_agentcore.runtime import BedrockAgentCoreApp
from strands import Agent

app = BedrockAgentCoreApp()
agent = Agent()

@app.entrypoint
def invoke(payload):
    prompt = payload.get("prompt", "You are a helpful assistant.")
    result = agent(prompt)
    return {"result": str(result)}

if __name__ == "__main__":
    app.run()

The exact agent construction can be more elaborate: you may supply a model, tools, system instructions, or framework-specific middleware. The important adapter contract is that the entrypoint accepts the decoded request, performs the work, and returns data that can be serialized as JSON. Keep credentials out of source files; use the AWS credential chain and IAM roles instead.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Step 3: Run and test locally

Start the application from the project directory:

python my_agent.py

The quickstart exposes an HTTP endpoint on port 8080. In a second terminal, send a JSON request to /invocations:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -X POST http://127.0.0.1:8080/invocations 
  -H "Content-Type: application/json" 
  -d '{"prompt":"Explain why least-privilege IAM matters."}'

Confirm that the process starts cleanly, the endpoint accepts the payload, and the response is valid JSON before involving AWS deployment resources. Local testing catches import errors, malformed payload handling, and non-serializable return values at the cheapest point.

Step 4: Configure the AgentCore deployment

From the same activated environment, point the toolkit at the entrypoint:

agentcore configure -e my_agent.py

The command writes .bedrock_agentcore.yaml and prompts for memory settings. Memory is optional. If each invocation should be stateless, disable it explicitly:

agentcore configure -e my_agent.py --disable-memory

Choose a region during the prompt or pass one directly:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
agentcore configure -e my_agent.py -r us-east-1

Use memory only when the application design needs conversation or workflow state. A memory setting is not a substitute for choosing stable session IDs: session identity determines which invocations share runtime context.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Step 5: Deploy the runtime

Deploy the configured application with:

agentcore deploy

The toolkit can package direct code deployment or build a container through AWS CodeBuild. Depending on your configuration, it creates or uses IAM roles, S3 and ECR resources, memory resources, and CloudWatch resources. Deployment output includes the runtime ARN and a log location; save both with the version of your source and configuration.

Do not assume deployment success means the agent is ready to serve traffic. Provisioning can continue after the command returns, and missing permissions or model access can surface only when the runtime starts.

Step 6: Check status and invoke the deployed agent

Check the resource state:

agentcore status

When provisioning is complete, invoke it through the toolkit:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
agentcore invoke '{"prompt": "Tell me a joke"}'

For application-to-application calls, use the AWS SDK operation invoke_agent_runtime. A caller supplies the runtime ARN, a runtime session ID, the payload, and a qualifier. Keep the session ID stable for a conversational thread; use a different ID for each user or independent job when contexts must not mix.

Runtime sessions and context isolation

A runtime session is the unit of isolated execution and conversational continuity. Repeated invocations with the same session can preserve context, while separate IDs isolate users, tenants, or jobs. Treat the ID as an application-level boundary, not merely a request correlation number.

  • Generate a new, unpredictable session ID when starting an unrelated task.
  • Persist the ID with the conversation or job record if later requests must see prior context.
  • Never reuse one global ID for all users.
  • Define what happens when a session expires or is replaced; callers should be able to restart without assuming prior in-memory state still exists.

AWS also documents InvokeAgentRuntimeCommand for deterministic shell commands in the same runtime session. That is useful for controlled operational actions, but it does not turn arbitrary shell access into a safe design by itself; authorization, input validation, and network policy still apply.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Adding the managed Code Interpreter sandbox

When to add it

Use Code Interpreter when the agent must execute generated code or manipulate files. Typical examples include calculating over a user-uploaded dataset, converting a document, producing a chart, or running a repeatable Python transformation. Keep ordinary business logic in the agent application when code execution is not required; the additional session, IAM, and network surface is unnecessary in that case.

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

Create or select the interpreter resource

Use the managed aws.codeinterpreter.v1 resource, or create a custom Code Interpreter when you need a deliberate network mode and execution role. Start a session before executing code. The session provides state and file persistence while it is active.

Execute code with the Python client

The direct Python client follows a start, invoke, stream, and stop pattern:

from bedrock_agentcore.tools.code_interpreter_client import CodeInterpreter

code_client = CodeInterpreter("<Region>")
code_client.start()
try:
    response = code_client.invoke("executeCode", {
        "language": "python",
        "code": 'print("Hello World!!!")'
    })
    for event in response["stream"]:
        print(event)
finally:
    code_client.stop()

The finally block matters. Stopping the session releases temporary resources and makes lifecycle behavior explicit even when code execution raises an exception.

Use the boto3 operations directly

With boto3, the equivalent lifecycle is explicit: call start_code_interpreter_session, then invoke_code_interpreter, and finally stop_code_interpreter_session. The invoke request identifies the language and code body. The response is streamed, so consume every event and surface execution errors to the calling workflow rather than silently treating an incomplete stream as success.

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.

The API also exposes command execution and file-management operations. Restrict those operations to the smallest set your agent needs, and validate filenames, paths, and command arguments before passing model-generated values to them.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Session duration, state, and cleanup

Code Interpreter state is temporary. Variables and files persist during the active session, not as a promise that they will survive session termination. AWS documents a default timeout of 900 seconds (15 minutes) and configurable session timeouts up to eight hours. Select a duration that matches the job rather than keeping sessions open indefinitely.

  • Stop a session when the task completes, including error paths.
  • Persist durable outputs to an approved storage service before stopping if the user needs them later.
  • Design long jobs to checkpoint progress because a timeout or infrastructure interruption can end the session.
  • Do not use a previous session’s filesystem as an implicit data store.

Runtime session continuity and Code Interpreter session continuity are related but not identical. Decide whether the agent’s conversation, the interpreter’s files, or both need to persist, then map each requirement to the corresponding session identifier and lifecycle.

IAM and network hardening

Use a dedicated execution role

Create a role for the runtime or interpreter rather than granting broad permissions to a developer identity. Grant only the actions required to create, start, invoke, and stop Code Interpreter sessions, plus the specific AWS services the executed code must access. Separate deployment permissions from runtime permissions so a compromised agent cannot provision unrelated infrastructure.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Scope resource ARNs where the service supports resource-level permissions.
  • Allow read-only access when writes are not required.
  • Keep secrets in managed secret stores and expose only the secret a task needs.
  • Review CloudTrail and CloudWatch records for unexpected calls.

Select the narrowest network mode

Start with Sandbox for code that needs limited AWS-service access and no public internet. Choose VPC when private resources are required. Enable Public only when an explicit requirement justifies internet exposure, and pair it with outbound controls, package allowlists, and input handling that assumes external content is untrusted.

Assume model output is untrusted input

Prompt instructions are not a security boundary. Treat generated code, shell commands, paths, URLs, and package names as attacker-controlled values. Validate them, constrain the available tools, cap execution time and output size, and refuse operations outside the task’s allowlist.

Runtime-only versus Runtime plus Code Interpreter

Decision axis Runtime only Runtime plus Code Interpreter
Arbitrary code execution Not provided by default; the agent uses its declared tools and application code. Supported through managed execution of Python, JavaScript, or TypeScript.
Network reach Determined by the runtime deployment and its surrounding AWS networking. Explicit Code Interpreter choice: Sandbox, Public, or VPC.
IAM scope Runtime role and tool permissions. Runtime permissions plus a least-privilege interpreter execution role.
State Runtime session can preserve agent context when the session ID is reused. Interpreter variables and files persist only during its active session; timeout is 900 seconds by default and configurable up to eight hours.
Framework compatibility Framework-agnostic runtime host supporting multiple open-source frameworks and models. Same host, with an additional managed execution tool.
Operational overhead Configure, deploy, invoke, and monitor the runtime. All runtime work plus interpreter lifecycle, network, IAM, file cleanup, and execution-stream handling.

Observability and production operations

Enable AgentCore observability and CloudWatch logging before production troubleshooting. Record the runtime ARN, deployment region, configuration file revision, model identifier, and session ID with each request so an operator can connect an application error to the corresponding runtime and interpreter events.

Useful operational signals include:

  • Runtime provisioning state and deployment failures.
  • Invocation latency, timeout rate, and stream termination errors.
  • Interpreter session starts, stops, and forced terminations.
  • IAM access-denied events and unexpected service calls.
  • Network failures that distinguish DNS or egress problems from application exceptions.
  • Input and output sizes, especially for file operations.

Keep logs free of credentials and sensitive user files. Apply retention and access controls appropriate to the data handled by the agent.

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

Troubleshooting checklist

The local server does not start

  • Confirm the virtual environment is active.
  • Run python -m pip show bedrock-agentcore strands-agents and verify the packages are installed in that environment.
  • Check that the file contains if __name__ == "__main__": app.run().
  • Resolve Python import errors before testing the HTTP endpoint.

The local invocation returns an invalid response

  • Send a JSON object with a prompt field and the Content-Type: application/json header.
  • Return strings, numbers, arrays, or objects that can be serialized as JSON.
  • Inspect the agent result conversion; framework response objects may need to be converted to text or a plain dictionary.

Configuration or deployment is denied

  • Check the selected region and whether the required Bedrock model is available and enabled there.
  • Review the IAM error for the exact missing action rather than adding administrator access.
  • Confirm that the deployment role can use the required S3, ECR, CodeBuild, CloudWatch, memory, and runtime resources.
  • Run agentcore status and inspect the log location printed by deployment.

Code execution cannot reach a service

  • Verify the interpreter’s network mode matches the requirement: Sandbox for limited AWS access, VPC for private resources, or Public only for deliberate internet access.
  • Check the interpreter execution role’s specific service action and resource permissions.
  • For VPC mode, verify routing, security groups, DNS, and private endpoints.

State or files disappear

Confirm that the same intended session ID is being reused and that the interpreter session has not timed out or been stopped. Move any output that must survive the session into durable, authorized storage before cleanup.

A safe reference workflow

  1. Develop the agent in a Python 3.10+ virtual environment and keep dependencies pinned for repeatable builds.
  2. Expose one small BedrockAgentCoreApp entrypoint and test it locally through /invocations.
  3. Configure memory deliberately; disable it when the design is stateless.
  4. Deploy with the starter toolkit, record the runtime ARN and logs, and verify status.
  5. Use stable, isolated runtime session IDs for the context boundaries your application requires.
  6. Add Code Interpreter only for a demonstrated code-or-file requirement.
  7. Choose Sandbox or VPC by default for untrusted code, grant a dedicated least-privilege role, and enable Public networking only when necessary.
  8. Stop interpreter sessions explicitly, persist required outputs, and monitor CloudWatch and IAM events.

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.