Different approaches to building your backend.
Serverless Framework deploys individual functions to AWS Lambda (or other cloud functions). You define your functions and events in serverless.yml, then run serverless deploy.
Each function is a separate Lambda that scales independently. You configure API Gateway, DynamoDB, and other AWS services through YAML. Functions are stateless and may experience cold starts.
Encore provisions persistent services in your cloud account based on your application code. You define APIs, databases, and other resources as TypeScript or Go objects. When you deploy, Encore creates the corresponding AWS or GCP infrastructure.
Services run continuously without cold starts. Infrastructure is defined in code, not YAML. Everything runs in your own AWS or GCP account with native cloud services.
See how Encore and Serverless Framework differ across key capabilities.

Serverless Framework is function-based. Each endpoint is a separate Lambda function that scales to zero when not in use. This is cost-efficient for sporadic traffic but introduces cold starts and makes it harder to share state between functions.
Encore runs persistent services that stay warm. No cold starts, and you can structure your code as traditional services with shared state and connections. This is better for consistent traffic and complex business logic.
Both deploy to your AWS account. Encore manages the infrastructure automatically; Serverless requires manual configuration of each AWS service.
Learn more about infrastructure ownership →Serverless Framework uses the serverless-offline plugin to emulate Lambda locally. For DynamoDB, you need serverless-dynamodb-local. Each AWS service needs its own local emulation plugin.
Encore runs encore run and automatically provisions local PostgreSQL, Pub/Sub emulation, and cron scheduling. A local dashboard shows distributed tracing and architecture diagrams.
Encore's local environment mirrors production automatically. No plugins or additional configuration required.
Learn more about local development →Serverless Framework uses YAML configuration files. You define functions, events, and resources in serverless.yml. Complex applications can have hundreds of lines of YAML that's separate from your application code.
Encore uses infrastructure-from-code. Declare a database as a TypeScript object, and Encore creates RDS or Cloud SQL when you deploy. No YAML, no CloudFormation templates.
import { SQLDatabase } from "encore.dev/storage/sqldb";
import { api } from "encore.dev/api";
const db = new SQLDatabase("users", {
migrations: "./migrations",
});
export const getUser = api(
{ method: "GET", path: "/users/:id" },
async ({ id }: { id: string }) => {
return db.queryRow`SELECT * FROM users WHERE id = ${id}`;
}
);
// No YAML needed - Encore provisions everythingServerless Framework apps use CloudWatch for logs and metrics. For distributed tracing across Lambda functions, you'd integrate X-Ray or third-party tools like Datadog or Lumigo, adding instrumentation code to each function.
Encore includes distributed tracing, metrics, and structured logging out of the box. Every request is traced across services automatically. No instrumentation code or additional configuration needed.
This works locally too. Run your app and get full tracing in the local development dashboard.
See observability docs →With Serverless Framework, infrastructure lives in YAML files separate from your code. AI agents like Cursor and Claude Code can generate functions, but they often produce incorrect YAML configurations that are hard to review and debug.
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."

Common questions about Encore vs Serverless Framework.
Encore runs persistent services with automatic infrastructure provisioning and built-in observability. Serverless Framework deploys individual Lambda functions with YAML configuration, cold starts, and requires manual setup for observability and IAM.
No, Encore runs persistent services on AWS Fargate or GCP Cloud Run, completely eliminating cold starts. Serverless Framework deploys to Lambda functions that scale to zero, causing cold starts on each invocation after idle periods.
Encore is significantly better for backend APIs because it provides persistent services with no cold starts, built-in distributed tracing, automatic IAM, and no YAML configuration. Serverless Framework requires extensive YAML and manual configuration.
Encore provides no cold starts, automatic IAM policies, built-in observability with distributed tracing, type-safe APIs, and no YAML configuration. Serverless Framework has cold starts, requires manual IAM and observability setup, and needs extensive YAML configuration.
Encore provides automatic local development with databases, Pub/Sub, and distributed tracing included with a single command. Serverless Framework requires tools like SAM CLI or serverless-offline, and local Lambda emulation often doesn't match production behavior.
Encore is designed specifically for microservices with automatic service discovery, type-safe API calls, distributed tracing across services, and auto-generated architecture diagrams. Serverless Framework isolates each function, making service communication complex.