- Newest
- Most votes
- Most comments
To deploy and invoke an agent on AgentCore Runtime without the CLI, here's what you need:
Required AWS Resources
1. IAM Roles and Policies
You need an execution role for the AgentCore Runtime itself. This role must have:
- ECR pull permissions to retrieve your container image
- Any permissions your agent needs to access AWS services (like invoking Bedrock models)
For invocation, the calling principal (Lambda, ECS task role, etc.) needs the bedrock-agentcore:InvokeAgentRuntime permission scoped to your specific runtime ARN. Avoid using wildcard resource statements in production.
If you're implementing cross-account access or user delegation, you'll also need resource-based policies on the runtime resource itself, which control which principals can invoke it.
2. Container Requirements
Yes, your container must follow a specific interface. It must:
- Expose a
/invocationsPOST endpoint for agent interactions - Expose a
/pingGET endpoint for health checks - Be built for ARM64 architecture (linux/arm64 platform)
- Be packaged as a Docker container and pushed to Amazon ECR
The container should listen on a specific port (typically configured in your deployment), and the runtime will override your container's ENTRYPOINT and CMD to manage its lifecycle.
3. Networking Prerequisites
A VPC is not required for basic deployment. AgentCore Runtime can work with a default public endpoint where both inbound and outbound traffic traverses the internet.
However, if your agent needs to access private resources (like databases in a VPC), you can configure VPC connectivity by specifying subnets and security groups during deployment. For enhanced security, you can also use AWS PrivateLink to establish private connectivity and apply resource-based policies with VPC condition keys to restrict access.
4. Deployment Process
While there isn't a pre-built Terraform or CloudFormation template in the sources, the deployment involves:
- Building and pushing your ARM64 container image to ECR
- Using the AWS CLI or SDK to create the AgentCore Runtime, specifying your container URI and execution role ARN
- Optionally configuring VPC settings, environment variables, and resource-based policies
The deployment can be done programmatically using boto3 or the AWS CLI with commands like create-runtime (the exact API calls would be in the AgentCore control plane API documentation).
Security Best Practices
- Scope all IAM permissions to specific runtime ARNs, not wildcards
- Use resource-based policies to control which principals can invoke your runtime
- If using VPC deployment, use IAM condition keys like
bedrock-agentcore:subnetsandbedrock-agentcore:securityGroupsto enforce approved network configurations - Enable CloudTrail logging for auditing
- Follow the principle of least privilege for all roles
This approach gives you full control over infrastructure-as-code tooling while meeting AgentCore Runtime's requirements.
Sources
Get started without the AgentCore CLI - Amazon Bedrock AgentCore
Secure multi-tenant AI agents with Amazon Bedrock AgentCore resource-based policies | AWS Security Blog
Network connectivity patterns for agents deployed on Amazon Bedrock AgentCore Runtime | Networking & Content Delivery
Security best practices for AgentCore Runtime - Amazon Bedrock AgentCore
Relevant content
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 7 months ago
