Encore vs

CloudFormation has you describe AWS infrastructure in YAML or JSON templates. Encore provisions infrastructure automatically in your AWS or GCP account from your application code. Ship quickly, without maintaining thousands of lines of templates.

“What used to take days or weeks of back-and-forth between developers and infra teams is now automated and completed in minutes.”
Josef Sima, Engineering Director at Groupon
2–3xfaster development speed
90%shorter time to market
See case study
// POWERING DEVELOPMENT AT
GrouponPave BankBookshop.orgCoinbasePalletGradient Labs

Feature Comparison

See how Encore and AWS CloudFormation differ across key capabilities.

EncoreAWS CloudFormation
ConfigurationApplication codeYAML/JSON templates
Cloud SupportAWS and GCPAWS only
DeploymentPush code, infra auto-provisionedWrite templates, run stacks
Local DevelopmentAutomatic (DBs, queues included)No built-in solution
ObservabilityBuilt-in tracing & metricsRequires CloudWatch setup
Learning CurveUse existing language skillsLearn template syntax
Template SizeMinimal codeCan grow to 1000s of lines
Preview EnvironmentsAutomatic per PRManual stack creation
API DevelopmentType-safe, auto-documentedNot included

How They Work

AWS CloudFormation

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. CloudFormation handles infrastructure deployment and nothing else, so local development and observability are left to other tools.

Encore

Encore provisions infrastructure from your application code. You define databases, Pub/Sub, and other resources in your application code. When you deploy, Encore creates the corresponding AWS or GCP resources automatically.

There are no separate template files to maintain, and your infrastructure stays in sync with your code because it is defined by your code. Encore also provides local development, distributed tracing, and API documentation as a complete backend development platform.

Infrastructure Ownership

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 →

Local Development

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 →

Automatic Infrastructure

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 in your application code, and Encore creates RDS with proper IAM policies, security groups, and connection management using sensible defaults. When you need more control, those defaults are yours to configure.

import { SQLDatabase } from "encore.dev/storage/sqldb";

const db = new SQLDatabase("users", {
  migrations: "./migrations",
});

// Encore provisions RDS with IAM, security groups,
// and connection pooling automatically

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

Built-in Observability

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 →

AI-Assisted Development

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 in 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.

Because the infrastructure comes from Encore's defaults rather than hand-written templates, you can let an AI agent build features and trust the result is provisioned correctly. Built-in guardrails, auto-documentation, and observability keep what it produces readable and maintainable as it grows.

Learn about AI-assisted development →

Migrating from CloudFormation

You don't have to replace your templates all at once. CloudFormation can keep managing infrastructure outside your application while Encore takes over the resources your backend uses, one at a time.

The IaC migration guide covers how infrastructure-as-code concepts map to Encore, what usually stays in your existing tooling, and how to plan an incremental migration.

Read the IaC migration guide
CloudFormationEncore
Resources in a templateDeclarations in application code
StackEnvironment
ParametersPer-environment infrastructure config
Secrets Manager referencesEncore secrets
DependsOnDerived from resource usage
Hand-written IAM rolesDerived from resource usage

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 CloudFormation.

Encore uses infrastructure-from-code where you define resources in your application code, 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 in your application 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.

Start building with Encore

Deploy to your own AWS or GCP account, with infrastructure provisioned automatically.