CloudFormation is AWS's native Infrastructure as Code tool. You write YAML or JSON templates that describe your resources (EC2 instances, RDS databases, Lambda functions, etc.) and CloudFormation provisions them in your AWS account.
Templates can grow to thousands of lines as your infrastructure scales. You need to understand resource dependencies, intrinsic functions, and CloudFormation-specific syntax. There's no local development or observability, just infrastructure deployment.
Encore provisions infrastructure from 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 template files to maintain. Your infrastructure stays in sync with your code. Encore also provides local development, distributed tracing, and API documentation as a complete backend development platform.
Both Encore and CloudFormation deploy to your own AWS account. You own your infrastructure, can see it in the AWS Console, and have full compliance control.
The difference is how you define it. CloudFormation requires verbose YAML/JSON templates that describe every resource explicitly. Encore infers infrastructure from your code: declare a database object, and Encore provisions RDS.
Encore also supports GCP, giving you multi-cloud flexibility. CloudFormation is AWS-only.
Learn more about infrastructure ownership →CloudFormation has no local development solution. To test your infrastructure, you either deploy to AWS (slow and costly) or use third-party tools like LocalStack to emulate AWS services.
Encore runs encore run and automatically provisions local PostgreSQL, Pub/Sub emulation, and cron scheduling. A local dashboard shows distributed tracing and architecture diagrams.
Development happens locally with full infrastructure, then deploys to AWS or GCP when ready.
Learn more about local development →CloudFormation requires you to write detailed templates for every resource. A simple database might be 50+ lines of YAML. Add IAM roles, security groups, and parameters, and templates quickly grow to thousands of lines.
Encore provisions infrastructure from your code. Declare a database as a TypeScript object, and Encore creates RDS with proper IAM policies, security groups, and connection management, all automatically.
import { SQLDatabase } from "encore.dev/storage/sqldb";
const db = new SQLDatabase("users", {
migrations: "./migrations",
});
// Encore provisions RDS with IAM, security groups,
// and connection pooling automaticallyDatabases, Pub/Sub, Cron Jobs, Object Storage, and more. See all primitives →
CloudFormation doesn't include observability. It only handles infrastructure deployment. You need to set up CloudWatch dashboards, alarms, and logging separately, often adding more template complexity.
Encore includes distributed tracing, metrics, and structured logging out of the box. Every request is traced across services automatically. No instrumentation code or additional templates needed.
This works locally too. Run your app and get full tracing in the local development dashboard.
See observability docs →With CloudFormation, infrastructure lives in separate YAML/JSON templates disconnected from your application code. AI agents like Cursor and Claude Code lack context about how templates relate to your code, leading to drift, hallucinations, 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 CloudFormation differ across key capabilities.

Common questions about Encore vs AWS CloudFormation.
Encore uses infrastructure-from-code where you define resources as TypeScript or Go objects, and infrastructure is automatically provisioned. CloudFormation uses declarative YAML/JSON templates that can grow to thousands of lines. Encore also provides built-in observability, local development, and multi-cloud support, while CloudFormation is AWS-only with no built-in development tools.
Encore is significantly easier to learn because you define infrastructure using familiar TypeScript or Go code. CloudFormation requires learning a separate template language with verbose YAML/JSON syntax, understanding resource dependencies, and managing complex nested stacks. Encore handles these complexities automatically.
Yes, Encore deploys directly to your own AWS account (or GCP). You get the same infrastructure ownership as CloudFormation, but with automatic provisioning, built-in observability, and a better developer experience. You can see your resources in the AWS Console and use any AWS service.
Encore provides automatic local development with databases, Pub/Sub, and distributed tracing included with a single command. CloudFormation has no local development solution, so you typically need to deploy to AWS or use separate tools like LocalStack to emulate AWS services locally.
Encore provides a complete backend development platform with type-safe APIs, automatic infrastructure provisioning, built-in observability, and local development, all from your application code. CloudFormation only handles infrastructure deployment and requires separate tools for development, testing, observability, and API management.
Encore is designed specifically for microservices with automatic service discovery, type-safe API calls, distributed tracing across services, and auto-generated architecture diagrams. CloudFormation requires manual configuration for each of these features and doesn't provide any built-in observability or development tooling.