Introducing Serverless Container Framework

Feb 4, 2025

Introducing the Serverless Container Framework.

Its mission is flexibility. One solution to develop, deploy and migrate between serverless platforms—all without rearchitecting.

In this initial release, Serverless Container Framework focuses on delivering an API architecture that leverages AWS Application Load Balancer for request routing, allowing developers to freely mix and transition between AWS Lambda and AWS ECS Fargate compute options, accompanied by a rich development experience.

Next, we'll add support for many more serverless platforms...

Get started with the examples, documentation, and register for our upcoming webinar on February 18th to learn more.

Now Is the Time for Serverless Containers

Here's why we built the Serverless Container Framework.

AWS Lambda Costs & Limitations – Many of our users need to migrate high-volume AWS Lambda functions to reduce costs, improve performance, or bypass limitations, but existing solutions fall short. The serverless journey has felt incomplete without a clear path forward.

Enterprise-Standard Container Workflows – AWS Lambda’s reliance on zip file packaging has made it difficult to integrate with enterprise workflows, which are largely built around containers. It’s time for serverless to integrate seamlessly into these workflows.

Enhanced Container Performance on AWS Lambda – Recent improvements in AWS Lambda’s container execution often make it faster and more efficient than traditional zip file deployments.

Serverless Evolution of Container Platforms – Modern compute platforms are increasingly adopting serverless principles, but developers need a tool that unifies them without requiring deep expertise in each one. It's time for a great tool that simplifies serverless across multiple platforms.

Register for the Serverless Container Framework webinar

What SCF Delivers

SCF provides three key innovations:

Unified Container Development & Deployment

  • Deploy seamlessly to AWS Lambda and ECS Fargate through a single solution
  • Mix compute types within the same API architecture
  • Switch between platforms instantly without code rewrites or downtime

Rich Local Development Experience

  • True local emulation of both Lambda and Fargate environments
  • Instant hot reloading for rapid development
  • Local testing with live AWS IAM roles

Production Ready Infrastructure

  • Automated VPC, networking, and ALB setup
  • Smart code/config change detection only deploys what's necessary
  • Built-in SSL certificate management
  • Support for multiple custom domains

How It Works

SCF uses a simple YAML configuration file to define your architecture. Here's a basic example:

name: myapp

deployment:
  type: awsApi@1.0

containers:
  api:
    src: ./api
    routing:
      domain: api.example.com
      pathPattern: /api/*
    compute:
      type: awsFargateEcs
  web:
    src: ./web
    routing:
      domain: example.com
      pathPattern: /*
    compute:
      type: awsLambda

Why It's Different

Unlike traditional infrastructure-as-code tools, Serverless Container Framework doesn't just deploy containers – it provides an entire development and deployment workflow for serverless containerized architectures, optimized to work across all serverless platforms.

Our research shows that organizations can save up to 60% on infrastructure costs by using the right compute platform for their workload patterns. SCF makes these transitions seamless.

Getting Started

Prerequisites

  • Node.js 20.x or later
  • AWS Account with administrative access
  • Docker installed and running

Installation & Setup

  1. Install the Serverless Framework CLI globally:
npm i serverless -g
  1. Configure your AWS credentials using one of these methods:
# Option 1: AWS CLI (recommended)
aws configure

# Option 2: Environment variables
export AWS_ACCESS_KEY_ID=your-key-id
export AWS_SECRET_ACCESS_KEY=your-access-key
export AWS_SESSION_TOKEN=your-session-token

Clone Example

  1. Start with an example project by cloning the repository:
git clone https://github.com/serverless/containers.git
  1. Navigate to the example project directory, and install any dependencies:
cd example-express/service
npm install

Development

Ensure you are within the directory containing the serverless.containers.yml file.

cd example-express

Start the local development environment:

serverless dev

This starts a local emulation of AWS Application Load Balancer at http://localhost:3000. This will forward requests to your containers. Logs, requests and more from your containers will be available in the terminal. Your containers will auto-reload or rebuild on code changes.

Deployment

Deploy to AWS:

serverless deploy

The initial deployment creates AWS resources (ALB, VPC, etc.) and takes ~5-10 minutes. Subsequent deploys are faster.

Cleanup

Remove your deployment:# Remove application only

serverless remove
# Remove all AWS resources including VPC
serverless remove --force

Troubleshooting

  • Ensure Docker daemon is running for local development
  • Check AWS credentials are properly configured using aws sts get-caller-identity
  • View detailed logs with serverless dev --debug or serverless deploy --debug

Documentation

Check out the Documentation for information on getting started, development, deployment, and more.

Looking Forward

While the initial release focuses on AWS Lambda and Fargate, support for additional cloud providers is coming soon, making SCF a truly multi-cloud solution for containerized applications.

---

SCF is developed by the team at Serverless Inc., creators of the Serverless Framework.

Subscribe to our newsletter to get the latest product updates, tips, and best practices!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.