Deployment Methods
Developers choosing between CLI, console, direct code, or infrastructure-as-code for deploying agents. If you just want the fastest path to a running agent, start with the CLI.
AgentCore supports four deployment methods. This page helps you choose the one that fits your stack, team workflow, and operational requirements.
Comparison
| Method | Local vs. CI/CD tooling | Container control | Declarative lifecycle | Canonical source |
|---|---|---|---|---|
| CLI | Local dev loop with hot-reload; single-command deploy | Managed by CLI scaffolding | CLI-generated CDK stack; ejectable | CLI Python tutorial |
| Console | No local tooling required; browser-based | Managed by the service | Console-driven; no template files | AgentCore console |
| Direct code | Full CI/CD integration; bring your own build | Full container ownership; custom base image | Programmatic via API or SDK | Direct code deployment |
| Infrastructure-as-Code | CI/CD pipeline with change review; GitOps-compatible | Defined in template; reproducible | Full declarative lifecycle via CloudFormation, CDK, or Terraform | See IaC references below |
When to use each
CLI — The recommended default for most developers. Fastest path from zero to deployed endpoint. Use it when you want to iterate locally, manage configuration in version control, and avoid writing CloudFormation or Dockerfiles manually. Also available for TypeScript: CLI TypeScript tutorial.
Console — Best for first-time builders, demos, and situations where you don't need a local development environment. The UI guides you through creating a harness with a model, system prompt, and tools.
Direct code — Choose this when you need full container control: custom base images, specific system-level dependencies, or integration with an existing CI/CD pipeline. You own the Dockerfile and push an ARM64 image to ECR yourself. See Get started without the AgentCore CLI for the full Dockerfile, contract, and ECR deployment walkthrough.
Infrastructure-as-Code — Choose this when you need declarative, reviewable, reproducible deployments. Fits GitOps workflows and teams that require change approval gates before any infrastructure mutation.
Infrastructure-as-Code references
AgentCore resources are supported across the major IaC tools:
CloudFormation
- AWS::BedrockAgentCore resource types — full namespace reference (Runtime, Gateway, Harness, Memory, etc.)
- AWS::BedrockAgentCore::Runtime — Runtime resource properties and configuration
- AWS::BedrockAgentCore::Gateway — Gateway resource properties and configuration
AWS CDK
- aws-cdk-lib.aws_bedrockagentcore module — L1 and L2 constructs (Runtime, Gateway, Memory, Evaluation — all stable)
- aws_bedrock_agentcore_alpha module — Experimental Policy constructs (only PolicyEngine remains in alpha; all other constructs have graduated to stable)
Terraform
- aws_bedrockagentcore_agent_runtime — Terraform AWS provider resource for AgentCore Runtime
Next steps
Everything produced by a Get Started tutorial is a prototype until you have applied the controls in Preparing for production. Do not use a prototype endpoint to serve real user traffic.