Amazon Bedrock AgentCore is an agentic platform for constructing, deploying, and working efficient brokers securely at scale. Amazon Bedrock AgentCore Runtime is a completely managed service of Bedrock AgentCore, which supplies low latency serverless environments to deploy brokers and instruments. It supplies session isolation, helps a number of agent frameworks together with in style open-source frameworks, and handles multimodal workloads and long-running brokers.
definition is offeredagent iscontainer
want to not fear about Docker experience and container infrastructure when deploying agents.
On this submit, we’ll exhibit easy methods to use direct code deployment (for Python).
Introducing AgentCore Runtime direct code deployment
With the container deployment technique, builders create a Dockerfile, construct ARM-compatible containers, handle ECR repositories, and add containers for code adjustments. This works nicely the place container DevOps pipelines have already been established to automate deployments.
deployment, which can considerably enhance developer time and productiveness. D
We’ll talk about the strengths of every deployment possibility that will help you select the appropriate strategy on your use case.

With direct code deployment, builders create a zipper archive of code and dependencies, add to Amazon S3, and configure the bucket within the agent configuration. When utilizing the AgentCore starter toolkit, the toolkit handles dependency detection, packaging, and add which supplies a much-simplified developer expertise. Direct code deployment can be supported utilizing the API.
Let’s examine the deployment steps at a excessive stage between the 2 strategies:
Container-based deployment
The container-based deployment technique entails the next steps:
Direct code deployment
The direct code deployment technique entails the next steps:
- Package deal your code and dependencies into a zipper archive
- Add it to S3
- Configure the bucket in agent configuration
- Deploy to AgentCore Runtime
How you can use direct code deployment
Let’s illustrate how direct code deployment works with an agent created with Strands Agents SDK and utilizing the AgentCore starter-toolkit to deploy the agent.
Conditions
Earlier than you start, be sure to have the next:
- Any of the variations of Python 3.10 to three.13
- Your most popular bundle supervisor put in. For instance, we use uv bundle supervisor.
- AWS account for creating and deploying brokers
- Amazon Bedrock model access to Anthropic Claude Sonnet 4.0
Step 1: Initialize your challenge
Arrange a brand new Python challenge utilizing the uv bundle supervisor, then navigate into the challenge listing:
Step 2: Add the dependencies for the challenge
Set up the required Bedrock AgentCore libraries and improvement instruments on your challenge. On this instance, dependencies are added utilizing .toml file, alternatively they are often laid out in necessities.txt file:
Step 3: Create an agent.py file
Create the principle agent implementation file that defines your AI agent’s habits:
Step 4: Deploy to AgentCore Runtime
Configure and deploy your agent to the AgentCore Runtime setting:
This may launch an interactive session the place you configure the S3 bucket to add the zip deployment bundle to and select a deployment configuration sort (as proven within the following configuration). To go for direct code deployment, select possibility 1 – Code Zip.
Deployment Configuration
Choose deployment sort:
- Code Zip (beneficial) – Easy, serverless, no Docker required
- Container – For customized runtimes or complicated dependencies
This command creates a zipper deployment bundle, uploads it to the desired S3 bucket, and launches the agent within the AgentCore Runtime setting, making it able to obtain and course of requests.
To check the answer, let’s immediate the agent to see how the climate is:
The primary deployment takes roughly 30 seconds to finish, however subsequent updates to the agent profit from the streamlined direct code deployment course of and may take lower than half the time, supporting quicker iteration cycles throughout improvement.
When to decide on direct code as an alternative of container-based deployment
Let’s take a look at a few of the dimensions and see how the direct code and container-based deployment choices are completely different. This may make it easier to select the choice that’s best for you:
- Deployment course of: Direct code deploys brokers as zip recordsdata with no Docker, ECR, or CodeBuild required. Container-based deployment makes use of Docker and ECR with full Dockerfile management.
- Deployment time: Though there may be not a lot distinction throughout first deployment of an agent, subsequent updates to the agent are considerably quicker with direct code deployment (from a median of 30 seconds for containers to about 10 seconds for direct code deployment).
- Artifact storage: inth 2026
- Customization: Direct code deployment helps customized dependencies by way of ZIP-based packaging, whereas container based mostly relies on a Dockerfile.
- Package deal measurement: Direct code deployment limits the bundle measurement to 250MB whereas container-based packages could be as much as 2GB in measurement.
- Language Assist: Direct code at the moment helps Python 3.10, 3.11, 3.12, and three.13. Container-based deployment helps many languages and runtimes.
Our common steerage is:
Container-based deployment is the appropriate alternative when your bundle exceeds 250MB, you will have current container CI/CD pipelines, otherwise you want extremely specialised dependencies and customized packaging necessities. Select containers should you require multi-language help, customized system dependencies or direct management over artifact storage and versioning in your account.
Direct code deployment is the appropriate alternative when your bundle is beneath 250MB, you employ Python 3.10-3.13 with frequent frameworks like LangGraph, Strands, or CrewAI, and also you want speedy prototyping with quick iteration cycles. Select direct code in case your construct course of is easy with out complicated dependencies, and also you wish to take away the Docker/ECR/CodeBuild setup.
A hybrid strategy works nicely for a lot of groups, use direct code for speedy prototyping and experimentation the place quick iteration and easy setup speed up improvement, then graduate to containers for manufacturing when bundle measurement, multi-language necessities, or specialised construct processes demand it.
Conclusion
Amazon Bedrock AgentCore direct code deployment makes iterative agent improvement cycles even quicker, whereas nonetheless benefiting from enterprise safety and scale of deployments. Builders can now quickly prototype and iterate by deploying their code immediately, with out having to create a container. To get began with Amazon Bedrock AgentCore direct code deployment, go to the AWS documentation.
In regards to the authors
Chaitra Mathur is as a GenAI Specialist Options Architect at AWS. She works with clients throughout industries in constructing scalable generative AI platforms and operationalizing them. All through her profession, she has shared her experience at quite a few conferences and has authored a number of blogs within the Machine Studying and Generative AI domains.
Qingwei Li is a Machine Studying Specialist at Amazon Internet Companies. He obtained his Ph.D. in Operations Analysis after he broke his advisor’s analysis grant account and didn’t ship the Nobel Prize he promised. At the moment he helps clients within the monetary service and insurance coverage trade construct machine studying options on AWS. In his spare time, he likes studying and educating.
Kosti Vasilakakis is a Principal PM at AWS on the Agentic AI group, the place he has led the design and improvement of a number of Bedrock AgentCore providers from the bottom up, together with Runtime, Browser, Code Interpreter, and Id. He beforehand labored on Amazon SageMaker since its early days, launching AI/ML capabilities now utilized by 1000’s of firms worldwide. Earlier in his profession, Kosti was a knowledge scientist. Outdoors of labor, he builds private productiveness automations, performs tennis, and enjoys life together with his spouse and youngsters.

