Encore vs

AWS CDK defines AWS infrastructure using TypeScript and generates CloudFormation. Encore provisions infrastructure automatically from your application code. Both deploy to your cloud account, but with very different developer experiences.

Trusted in production by

GrouponPave BankBookshop.orgQuiqup

How They Work

AWS CDK

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

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.

Infrastructure Ownership

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 →

Local Development

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 →

Automatic Infrastructure

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 automatically

Databases, Pub/Sub, Cron Jobs, Object Storage, and more. See all primitives →

Built-in Observability

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 →

AI-Assisted Development

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 →

Feature Comparison

See how Encore and AWS CDK differ across key capabilities.

Infrastructure
EncoreYour AWS or GCP account
AWS CDKYour AWS account only
Deployment
EncorePush code, infra auto-provisioned
AWS CDKWrite CDK code, run cdk deploy
Infrastructure Definition
EncoreDerived from application code
AWS CDKSeparate TypeScript/Python files
Learning Curve
EncoreMinimal (use TypeScript/Go)
AWS CDKSteep (requires AWS expertise)
Local Development
EncoreAutomatic (DBs, queues included)
AWS CDKManual (LocalStack/SAM CLI)
Observability
EncoreBuilt-in tracing & metrics
AWS CDKRequires manual CloudWatch setup
IAM Policies
EncoreAutomatic least-privilege
AWS CDKManual configuration
Preview Environments
EncoreAutomatic per PR
AWS CDKManual stack management
Multi-Cloud
EncoreAWS and GCP
AWS CDKAWS only

Top rated on G2

See how we stack up in the market.

Read G2 reviews →
G2 User LoveG2 High Performer Summer 2025G2 High Performer Fall 2025G2 High Performer Winter 2026

Frequently asked questions

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.

Cloud DevOps,
Automated.

Take DevOps off your plate and unlock safe AI-assisted development without any additional hiring.