AWS CDK lets you define AWS infrastructure using TypeScript, Python, or other languages. You write infrastructure code in separate files, then run cdk deploy to generate CloudFormation templates and provision resources.
This requires understanding AWS services, CloudFormation concepts, and IAM policies. Your infrastructure definitions live separately from your application code, and you manage the relationship between them manually.
Encore provisions infrastructure in your cloud account based on your application code. You define databases, Pub/Sub, and other resources as TypeScript or Go objects. When you deploy, Encore creates the corresponding AWS or GCP resources automatically.
No separate infrastructure code needed. IAM policies are generated automatically with least-privilege access. Resources run in your own AWS or GCP account with full visibility and control.
Both Encore and AWS CDK deploy to your own cloud account, so you own your infrastructure. The difference is in how you define and manage it.
With AWS CDK, you write explicit infrastructure definitions and manage CloudFormation stacks. This gives you fine-grained control but requires significant AWS expertise and ongoing maintenance.
With Encore, infrastructure is derived from your application code. You get the same ownership and access to AWS Console, VPC peering, and native services, but without writing or maintaining separate infrastructure code.
Learn more about infrastructure ownership →AWS CDK has no built-in local development solution. You need to use tools like LocalStack or AWS SAM CLI separately, and these don't fully replicate all AWS services or behaviors.
Encore runs encore run and automatically provisions local PostgreSQL, Pub/Sub emulation, and cron scheduling. A local dashboard shows distributed tracing and architecture diagrams.
This means faster iteration cycles and confidence that local behavior matches production.
Learn more about local development →AWS CDK requires you to explicitly define every resource. Need a database? Write CDK constructs for RDS, security groups, and IAM roles. Need a queue? Define SQS queues and policies. The infrastructure code often exceeds your application code.
Encore provisions infrastructure from your code. Declare a database as a TypeScript object, and Encore creates RDS or Cloud SQL when you deploy. IAM policies are generated automatically with least-privilege access.
import { SQLDatabase } from "encore.dev/storage/sqldb";
const db = new SQLDatabase("users", {
migrations: "./migrations",
});
// Encore provisions RDS/Cloud SQL automaticallyDatabases, Pub/Sub, Cron Jobs, Object Storage, and more. See all primitives →
AWS CDK provides no built-in observability. You need to manually configure CloudWatch, set up X-Ray for tracing, and add instrumentation code throughout your application.
Encore includes distributed tracing, metrics, and structured logging out of the box. Every request is traced across services automatically. No instrumentation code needed.
This works locally too. Run your app and get full tracing in the local development dashboard.
See observability docs →With AWS CDK, infrastructure lives in separate files from your application code. AI agents like Cursor and Claude Code lack context about how CDK constructs relate to your application, leading to inconsistencies and configs that are hard to review.
Encore defines infrastructure as TypeScript objects alongside your application code. AI agents see everything in one context: your APIs, databases, queues, and how they connect. This makes AI-generated code accurate, reviewable, and safe to deploy.
Built-in guardrails, auto-documentation, and observability ensure your systems stay maintainable, even when AI writes most of the code.
Learn about AI-assisted development →See how teams are shipping faster with Encore.
"Encore is our foundation for all new development. Since adopting it, we've seen a 2-3x increase in development speed."

"Encore is an unfair advantage. At Pave we've moved 2x faster than we did at Monzo."

"We've reduced time spent on DevOps by 95%, and we're now on track to save $60K annually."

See how Encore and AWS CDK differ across key capabilities.

Common questions about Encore vs AWS CDK.
Encore provisions infrastructure automatically from your application code with built-in observability and local development. AWS CDK requires you to manually define infrastructure in separate TypeScript files that generate CloudFormation templates, with no built-in observability or local development solution.
Encore is purpose-built for backend development with infrastructure defined alongside your application code, automatic IAM policies, and built-in distributed tracing. AWS CDK is an infrastructure-as-code tool that requires deep AWS knowledge and separate infrastructure definitions. For TypeScript or Go backends, Encore provides a significantly better developer experience.
No, AWS CDK is AWS-only and generates CloudFormation templates that only work with AWS services. Encore supports both AWS and GCP, giving you flexibility to choose the best cloud provider for your needs or deploy to multiple clouds.
Encore provides automatic local development with databases, Pub/Sub, and distributed tracing included with a single command. AWS CDK has no built-in local development solution, so you need to use tools like LocalStack or SAM CLI separately, and these don't fully replicate all AWS services.
Encore eliminates the need to write separate infrastructure code, provides automatic IAM policies, includes built-in observability with distributed tracing, and offers a seamless local development experience. AWS CDK requires deep AWS expertise, manual IAM configuration, and external observability setup.
Encore has a much gentler learning curve because infrastructure is derived from your application code automatically. AWS CDK requires understanding AWS services, CloudFormation concepts, IAM policies, and infrastructure-as-code patterns, which is a steep learning curve for teams without dedicated DevOps expertise.