Skip to main content

Deployment Methods

Who this is for

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​

MethodLocal vs. CI/CD toolingContainer controlDeclarative lifecycleCanonical source
CLILocal dev loop with hot-reload; single-command deployManaged by CLI scaffoldingCLI-generated CDK stack; ejectableCLI Python tutorial
ConsoleNo local tooling required; browser-basedManaged by the serviceConsole-driven; no template filesAgentCore console
Direct codeFull CI/CD integration; bring your own buildFull container ownership; custom base imageProgrammatic via API or SDKDirect code deployment
Infrastructure-as-CodeCI/CD pipeline with change review; GitOps-compatibleDefined in template; reproducibleFull declarative lifecycle via CloudFormation, CDK, or TerraformSee 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 CDK

Terraform


Next steps​

warning

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.