Oct 26, 202610 min read

Serverless Framework Alternatives in 2026

Options for teams reconsidering serverless.yml after the V.4 license change, from AWS SAM and SST to defining the infrastructure in application code.

The Serverless Framework made AWS Lambda approachable by turning a short serverless.yml into a CloudFormation stack with functions, API Gateway routes and event sources. For years it was the default way to ship Lambda, and many teams still have dozens of services built on it.

Two things have changed since then. Serverless Framework V.4 requires a paid subscription for organizations over $2M in revenue, and apps that grew around it hit Lambda limits that a YAML file cannot fix, from 15-minute timeouts to connection limits on Postgres.

Reasons teams look for Serverless Framework alternatives:

  • V.4, announced in late 2023, requires a paid subscription for organizations with more than $2M in annual revenue, and the CLI now requires a login or license key, a change that drew pushback from developers.
  • Pricing is in credits per Service Instance, meaning each serverless.yml deployed to a stage, region and account, so many services across many stages add up, and V.3 is no longer maintained as of December 31, 2024.
  • Everything is shaped as Lambda functions, which have a 15-minute maximum timeout and per-environment cold starts, so long-running work and steady traffic fit less well than in a container.
  • Local development relies on plugins such as serverless-offline or on Dev Mode against deployed resources, and queues, buckets and databases are still raw CloudFormation in the resources section.

Serverless Framework alternatives at a glance

AlternativeApproachBest fit
EncoreAPIs, Pub/Sub, cron jobs and databases declared in application code, run locally and provisioned as containers in your AWS or GCP accountTeams that want their whole AWS backend, including functions, queues and databases, defined and tested locally in TypeScript or Go
AWS SAMAWS's CloudFormation extension for serverless apps, with a free CLITeams that want the closest replacement for serverless.yml and stay on Lambda
SSTTypeScript config with components built on Pulumi and Terraform providers, and live Lambda developmentTypeScript teams that want a faster serverless dev loop on AWS
AWS CDKAWS's infrastructure-as-code framework in TypeScript, Python, Java, C# or GoTeams that want full control of every AWS resource in a general-purpose language
TerraformHashiCorp's HCL-based infrastructure as code, with Lambda modules from the registryTeams that already manage the rest of their infrastructure in Terraform
OpenTofuOpen-source fork of Terraform under the Linux Foundation, compatible with the same modulesTeams that want Terraform's model under an open-source license
Compare features across all six alternatives
CapabilityEncoreAWS SAMSSTAWS CDKTerraformOpenTofu
ConfigurationApplication codetemplate.yamlsst.config.tsTypeScript, Python, Java, C# or GoHCLHCL
ComputeContainers on ECS Fargate, EKS, Cloud Run or GKELambdaLambda and ECS containersAnything on AWSAnythingAnything
Deploy engineEncore provisions from the codeCloudFormationPulumi engine with Terraform providersCloudFormationTerraform stateOpenTofu state
Queues / Pub/SubDeclared in code, SNS/SQS or GCP Pub/SubSQS and SNS in the templateQueue and SNS componentsSQS and SNS constructsSQS and SNS resourcesSQS and SNS resources
Cron jobsDeclared in codeSchedule eventsCron componentEventBridge rulesEventBridge resourcesEventBridge resources
Local developmentencore run starts services, Postgres and Pub/Sub locallysam local runs functions in containerssst dev proxies functions to your machineUnit tests and cdk synthPlan onlyPlan only
CloudsAWS and GCPAWSAWS mainly, other providers through componentsAWSAnyAny
LicenseOpen sourceOpen sourceOpen sourceOpen sourceBusiness Source LicenseMPL 2.0

Encore: infrastructure from application code, deployed as containers

Encore

Encore combines the application code and the infrastructure that serverless.yml describes separately, so the endpoints, topics, cron jobs and databases are declared in TypeScript or Go where they are used. encore run starts them locally with your services, and a deploy provisions them in your own AWS or GCP account.

Application code passes through Encore and infrastructure guardrails to resources provisioned in your own AWS or GCP account.
Encore provisions the infrastructure your application needs in your own AWS or GCP account.

A common Serverless Framework service is an HTTP function that drops a message on SNS, with a second function subscribed through an SQS queue. In Encore the publishing side is an API endpoint and a Pub/Sub topic in one service:

import { api } from "encore.dev/api"; import { Topic } from "encore.dev/pubsub"; export interface InvoicePaid { invoiceId: string; customerId: string; } // SNS/SQS on AWS, Pub/Sub on GCP, a local broker under encore run. export const invoicePaid = new Topic<InvoicePaid>("invoice-paid", { deliveryGuarantee: "at-least-once", }); export const paid = api( { expose: true, method: "POST", path: "/billing/invoices/:invoiceId/paid" }, async (req: InvoicePaid): Promise<{ queued: boolean }> => { await invoicePaid.publish(req); return { queued: true }; }, );

The consumer is a subscription in a separate service, where concurrency and retries are set in code instead of in the event source mapping and the queue's redrive policy:

import { Subscription } from "encore.dev/pubsub"; import { invoicePaid } from "../billing/billing"; // A separate service that deploys and scales on its own. Retries back off, // and messages that keep failing land in a dead-letter queue. const _ = new Subscription(invoicePaid, "send-receipt", { handler: async ({ invoiceId, customerId }) => { // Keyed on invoiceId so a redelivery does not send a second receipt. console.log("sending receipt", invoiceId, "to", customerId); }, maxConcurrency: 20, retryPolicy: { minBackoff: "1s", maxBackoff: "1m", maxRetries: 10 }, });
The topic, the queue, the subscription and the IAM between them come from these two files, with no template to keep in sync.

Under encore run, a request to POST /billing/invoices/inv_2/paid returns {"queued":true} and the subscriber in the other service logs the receipt, so the whole flow is tested on your machine rather than against a deployed stage. Scheduled functions become cron jobs that call an endpoint on a schedule, and they run in the cloud environments rather than locally, where you call the endpoint by hand. Since the topic and its consumer are ordinary code, an AI coding agent can add a new event and its handler in one change and run both locally.

Key features

  • Services run as containers on ECS Fargate or EKS in AWS, as the AWS infrastructure docs describe, or on Cloud Run or GKE in GCP, so there is no 15-minute ceiling and no per-invocation cold start.
  • Pub/Sub becomes SNS/SQS with dead-letter queues, Postgres databases become RDS, and buckets become S3.
  • Encore provisions an IAM role for each service.
  • Existing SNS topics, S3 buckets and RDS databases can be imported, so new services can work with resources a Serverless stack already created.

Good to know

Encore does not deploy Lambda functions, so it is a different runtime model rather than a new syntax for the same stack, and moving a service means porting the handlers to Encore endpoints and subscriptions. Teams usually start with one new service and leave existing Serverless Framework stacks running in the same account, and the migration guide for infrastructure-as-code users covers that path.

Get started
brew install encoredev/tap/encore &&
encore app create
Copy

Run in your terminal to get started locally.

AWS SAM: the closest replacement for serverless.yml

AWS SAM

AWS SAM is AWS's open-source framework for serverless apps, a CloudFormation transform where a template.yaml describes functions, APIs and event sources in a format close to serverless.yml.

Transform: AWS::Serverless-2016-10-31 Resources: SendReceipt: Type: AWS::Serverless::Function Properties: CodeUri: . Runtime: nodejs24.x Handler: receipt.handler Events: InvoicePaid: Type: SQS Properties: Queue: !GetAtt InvoiceQueue.Arn InvoiceQueue: Type: AWS::SQS::Queue

Key features

  • The SAM CLI is free, and sam local invoke and sam local start-api run functions in local containers.
  • sam deploy --guided walks through the first deploy and saves the settings.
  • Any CloudFormation resource can sit in the same template.

Good to know

SAM keeps the Lambda-first model and the CloudFormation deploys, so it solves the license question rather than the architecture one. Local runs cover the function code, while queues, databases and other resources are either mocked or reached in a deployed stack.

SST: TypeScript config with live Lambda development

SST

SST defines resources in sst.config.ts through components for functions, APIs, queues, buckets, Postgres and frontend sites. Since v3 it deploys through Pulumi with Terraform providers instead of CloudFormation.

Key features

  • sst dev deploys a stub function and proxies invocations to your machine, so code changes reload without a deploy.
  • Components wrap common patterns, such as a queue with a subscriber or an API with routes.
  • ECS containers are supported alongside Lambda, which helps with workloads that outgrow functions.

Good to know

SST is a common move for TypeScript teams on the Serverless Framework, but the infrastructure is still described separately from the application code, and the queues and databases used during sst dev are real resources in your account. The SST alternatives guide covers it in more depth.

AWS CDK: full control in a general-purpose language

AWS CDK

AWS CDK defines AWS resources as constructs in TypeScript, Python, Java, C# or Go and synthesizes them to CloudFormation, so a Serverless Framework stack can be rewritten as constructs for its functions, queues and API Gateway.

Key features

  • Every AWS service is available, from low-level L1 constructs to higher-level patterns.
  • Loops, functions and types from the host language replace YAML variables and plugins.
  • cdk diff shows the changes before a deploy.

Good to know

CDK removes the license question and the plugin layer, but you take on writing and reviewing every resource, including IAM, and there is no local runtime for the stack. The AWS CDK alternatives and AWS CDK vs Terraform guides compare it further.

Terraform: one tool for Lambda and everything else

Terraform

Terraform manages Lambda functions alongside the rest of a company's infrastructure in HCL, and community modules such as terraform-aws-modules/lambda/aws handle packaging the code and creating the function, role and log group.

Key features

  • One workflow and state for Lambda, networking, databases and non-AWS providers.
  • terraform plan shows changes before they are applied.
  • A large registry of modules and providers.

Good to know

Terraform is a good fit when the platform team already runs it, but it was not built for application code, so packaging, versioning and local testing of functions are handled outside it, and Terraform has been under the Business Source License since 2023. The Terraform alternatives guide covers the options.

OpenTofu: Terraform under an open-source license

OpenTofu

OpenTofu is the open-source fork of Terraform maintained under the Linux Foundation, and it works with the same HCL, providers and Lambda modules.

Key features

  • MPL 2.0 license and community governance.
  • Compatible with existing Terraform configurations and state.
  • Additions such as client-side state encryption.

Good to know

OpenTofu answers the license concern on the Terraform side the way SAM does on the Serverless side, while the workflow stays the same, so Lambda packaging and local testing still sit outside the tool.

How to choose

  • Encore if you are moving past Lambda-only services and want APIs, queues, cron jobs and databases defined in application code, running locally and deployed as containers in your own AWS or GCP account.
  • AWS SAM for the closest replacement that keeps the same Lambda and CloudFormation model.
  • SST for TypeScript teams that want to stay serverless with a faster dev loop.
  • AWS CDK for full control over every AWS resource in a general-purpose language.
  • Terraform or OpenTofu if the rest of your infrastructure already lives in HCL.

The license change only affects V.4 and later, so there is time to move service by service, starting with the ones that have outgrown Lambda's limits. The quickstart walks through a first Encore service.

Frequently asked questions

What is the best alternative to the Serverless Framework?

Encore if you want APIs, Pub/Sub, cron jobs and databases defined in application code, running locally and provisioned in your own AWS or GCP account as containers rather than Lambda functions. AWS SAM is the closest drop-in for serverless.yml, SST suits TypeScript teams that want live Lambda development, AWS CDK gives full control in code, and Terraform or OpenTofu fit teams that already manage the rest of their infrastructure with HCL.

Is the Serverless Framework still free?

Serverless Framework V.4 is free for individuals and organizations under $2M in annual revenue. Organizations that earned over $2M in their last fiscal year need a paid subscription, priced in credits per Service Instance, meaning one serverless.yml deployed to one stage, region and AWS account for more than 10 days in a month. V.3 stays open source but is no longer maintained as of December 31, 2024.

SST vs Serverless Framework: what is the difference?

The Serverless Framework describes functions and events in serverless.yml and deploys them through CloudFormation. SST defines resources in sst.config.ts with TypeScript components built on Pulumi and Terraform providers, and sst dev proxies Lambda invocations to your machine so code changes reload without a deploy.

AWS SAM vs Serverless Framework: which should I use?

AWS SAM is AWS's own open-source framework, a CloudFormation extension with a free CLI that can run functions locally in containers with sam local. The Serverless Framework has a larger plugin ecosystem and its own Dev Mode, but V.4 requires a login or license key and a subscription for larger organizations. Teams that only target AWS Lambda often find SAM the most direct replacement.

How do I replace a Serverless Framework SNS or SQS function with Encore?

Declare a Topic with new Topic from encore.dev/pubsub, publish to it from an api endpoint, and handle messages in a Subscription with maxConcurrency and a retryPolicy. encore run runs the topic and subscriber locally, and a deploy to AWS provisions SNS and SQS with a dead-letter queue in your account.

Deploy to your cloud on AWS and Google Cloud
without managing infrastructure

Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.

~/orders — claude
Claude Code
Claude Code v2.1.180Opus 5.5~/orders