| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
One solution to deploy serverless workloads everywhere - Serverless Container Framework (SCF) is a unified development and deployment experience for containers on serverless platforms.
In this initial release, SCF 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.
This repo contains examples and other educational content on SCF. The code for SCF ships within the Serverless Framework.
Serverless Container Framework offers simple YAML to deliver complex architectures via a serverless.containers.yml file. Here is a simple example of a full-stack application.
To see the full list of configuration options, see the Configuration Docs.
namespace: acmeinc
deployment:
type: awsApi@1.0
containers:
# Web (Frontend)
service-web:
src: ./web
routing:
domain: acmeinc.com
pathPattern: /*
compute:
type: awsLambda
# API (Backend)
service-api:
src: ./api
routing:
domain: api.acmeinc.com
pathPattern: /api/*
pathHealthCheck: /health
compute:
type: awsFargateEcs
awsFargateEcs:
memory: 4096
cpu: 1024
environment:
HELLO: world
awsIam:
customPolicy:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- dynamodb:GetItem
Resource:
- "*"npm install -g serverless# 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-tokengit clone https://github.com/serverless/containers.gitcd example-express/service
npm installEnsure you are within the directory containing the serverless.containers.yml file.
cd example-expressStart the local development environment:
serverless devThis 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.
Deploy to AWS:
serverless deployThe initial deployment creates AWS resources (ALB, VPC, etc.) and takes ~5-10 minutes. Subsequent deploys are faster.
Remove your deployment:
# Remove application only
serverless remove
# Remove all AWS resources including VPC
serverless remove --forceCheck out the Documentation for information on getting started, development, deployment, and more.
Here's the concise FAQ in markdown format:
Serverless Framework specializes in AWS Lambda deployments, while Serverless Container Framework (SCF) focuses on container-based deployments. Key SCF advantages:
SCF addresses specific needs:
While tools like Terraform and Pulumi offer container deployment capabilities, SCF provides a more comprehensive developer experience:
Compared to AWS Lambda:
Compared to other container tools:
| Back | FazBrowse Home | New Git URL |