
AWS Lambda is the serverless compute service from Amazon Web Services (AWS). It runs function code in response to HTTP requests, schedules, queue messages, and events from other AWS services, scales the underlying compute automatically, and bills for each request and for the time that each invocation runs. That model removes server management, but it also ties functions to Lambda's runtime model, AWS event sources, and AWS identity controls, and Lambda's cost rises in step with invocation volume.
Fission is an open-source serverless function framework that runs on Kubernetes. It lets you write short-lived functions in Python, Go, Node.js, and other languages, then invoke them over HTTP, on a schedule, or from a message queue without managing a separate server or deployment for each function. Unlike Lambda, Fission does not hide the cluster: it adds Lambda-style functions to a Kubernetes cluster that you already operate and pay for. In exchange for operating Fission and its cluster yourself, you keep functions on your own infrastructure, avoid per-invocation pricing, and choose your cluster's region and network.
This article explains how to deploy Fission as an alternative to AWS Lambda. It covers the Fission installation with Helm, Python environments and functions, HTTP routes through a load balancer, time and message queue triggers, the poolmgr and newdeploy executors, and migration from AWS Lambda.
Fission installs as a set of components in your cluster, and each Lambda concept maps onto a Fission resource, setting, or component. You manage most of them with the fission command-line interface (CLI). The table below pairs each Lambda concept with its closest Fission equivalent so that you can plan a migration before running any commands. Some pairs match directly, but others differ in behavior, so read the description column first.
Message queue triggers require KEDA, which you install separately and enable in Fission.
Before you begin:
LoadBalancer services.sudo privileges to run the commands. For macOS or ARM-based workstations, see the note in Install the Fission CLI.Fission ships its custom resource definitions (CRDs) outside the Helm release, so the CRDs and the chart install as separate steps and must reference the same version.
Create the namespace that holds the Fission control plane.
Create the custom resource definitions.
Check the official Fission GitHub repository for the latest release.
Add the Fission chart repository.
Refresh the repository index.
Install the fission-all chart pinned to the same version as the CRDs.
In the above command:
routerServiceType=LoadBalancer: Publishes the Fission router on a public load balancer address.internalAuth.enabled=false: Disables the token authentication that Fission components use for requests between each other. Keep internal authentication enabled in production clusters, where other workloads share the cluster network.persistence.size=40Gi: Sets the volume size of the storage service, which holds uploaded function packages.Check the official fission-all Helm chart for the latest release.
Set persistence.size to at least the minimum volume size supported by your default storage class. The chart requests an 8 GiB volume for the storage service by default, and if the storage class requires a larger minimum size, such as 40 GiB, the persistent volume claim never binds, and the storagesvc pod remains in Pending. Package uploads and builds depend on that service.
Verify that every Fission pod reaches a running state.
The output shows every pod with a Running status.
The Fission CLI manages functions, environments, packages, and triggers in your cluster. It reaches the cluster through your kubeconfig context, so it works with any cluster that your kubectl can access.
Download the Fission CLI binary.
Check the Fission releases page for the latest release, and use the same version for the CLI, the CRDs, and the chart.
The command above downloads the linux-amd64 build. Download the build that matches your operating system and architecture, for example, fission-v1.27.0-darwin-arm64 for Apple Silicon Macs, fission-v1.27.0-darwin-amd64 for Intel Macs, or fission-v1.27.0-linux-arm64 for ARM-based Linux machines. A build for the wrong platform fails with an exec format error when you run it.
Make the binary executable.
Move it into your path.
Verify that the CLI reaches the cluster.
The output reports the installed version of both the client and the server. The two versions match, which confirms that the CLI reads your kubeconfig and can reach the Fission control plane.
An environment supplies the language runtime image that your functions execute inside. Fission maintains a pool of warm pods per environment, so the first invocation does not wait for a container to start.
Create a Python environment.
The command reports a default pool size of 3.
Verify that the environment pods are running.
The output shows all 3 pods with a Running status.
List the environment.
The output lists the python environment with its runtime image and a pool size of 3.
A function pairs your handler code with an environment. The Python environment calls a function named main in the file you supply, with no arguments, and returns whatever the function returns as the response body.
Create the handler file.
Add the following code.
Save and close the file.
Create the function against the Python environment.
Fission creates a package that holds your code, then registers the function that references it.
Forward the internal router port to your workstation so that you can invoke the function before it has a public route.
Invoke the function directly.
The function returns Hello from Fission.
Stop the port forward.
An HTTP trigger registers a route with the Fission router, which the load balancer publishes on a public address. This is the closest equivalent of putting API Gateway in front of a Lambda function.
Create the HTTP trigger.
Retrieve the external address assigned to the router.
The EXTERNAL-IP column holds the load balancer address.
Call the route. Replace LOAD_BALANCER_IP with the EXTERNAL-IP value that you retrieved earlier.
The function returns Hello from Fission through the public route.
An executor decides how a function's pods are created, kept warm, and released. Fission ships three: poolmgr, newdeploy, and container, which runs your own image. The first two differ most when traffic stops. poolmgr, the default, maintains a pool of warm pods for each environment, so the first request starts quickly, but the pool retains idle capacity even if no traffic arrives. newdeploy creates a dedicated deployment for each function and accepts a minScale of 0, which releases every pod when the function goes idle but makes the next request pay a cold start.
Switch the function to the newdeploy executor with scale to zero enabled.
Verify that Fission created the dedicated deployment.
The output lists a deployment named newdeploy-hello, the dedicated deployment for the function, and a deployment named poolmgr-python, which holds the environment's warm pool.
Call the route to confirm that the function still responds. Replace LOAD_BALANCER_IP with the EXTERNAL-IP value that you retrieved earlier.
The function returns Hello from Fission.
Wait at least five minutes without sending any requests to the function, then check the deployment again.
The newdeploy deployment reports 0/0, which means that Fission's idle cleanup released the function's pod and its memory back to the cluster. The poolmgr deployment stays at 3/3, because the two executors handle idle capacity differently.
Call the route once more to trigger a cold start. Replace LOAD_BALANCER_IP with the EXTERNAL-IP value that you retrieved earlier.
Fission creates a pod on demand, specializes it with your code, and returns the response. The cold start takes a few seconds longer than the warm responses you saw earlier.
A time trigger invokes a function on a cron schedule, replacing an EventBridge Scheduler rule that points to a Lambda function. The trigger runs inside the cluster and needs no external scheduler.
Create a trigger that fires every minute.
The command prints the current server time and the next invocation time.
List the trigger.
The output lists hello-timer with the @every 1m schedule, the hello function, and a READY value of True.
Wait for the next scheduled run.
The first invocation fires one full interval after the trigger starts, so a one-minute schedule produces no entry before then.
View the timer logs to verify the invocation.
The output shows the timer making a request to the hello function. Run the command again after another minute if no request appears yet.
A time trigger invokes its function on every tick, so a function using the newdeploy executor never stays idle long enough to scale to zero. Delete the time trigger before you test scale-to-zero behavior on the same function.
A message queue trigger consumes messages from a broker and invokes a function for each one, which replaces an SQS or Kinesis event source mapping. Fission delegates the scaling decision to KEDA, so install KEDA and a broker before you create the trigger.
KEDA watches the queue and scales the connector deployment that reads messages and calls your function.
Add the KEDA chart repository.
Refresh the repository index.
Install KEDA into its own namespace.
Check the KEDA compatibility page to see which KEDA release to use against which Fission release.
Verify that the KEDA pods are running.
The output shows every pod with a Running status.
Verify that KEDA registered its metrics API with the cluster.
The AVAILABLE column reports True, which confirms that KEDA can serve scaling metrics to the cluster.
Redis provides the list that holds incoming messages. A single instance is enough to demonstrate the trigger.
Create the manifest file.
Add the following configuration.
Save and close the file.
Apply the manifest.
Verify that the Redis pod is running.
Run the command again if the pod still reports ContainerCreating, because the first start pulls the Redis image.
The trigger binds a Redis list to your function and defines the response list that receives each function result.
Create the message queue trigger.
The KEDA Redis scaler requires both listName and listLength in its metadata. The --topic flag names the queue for Fission, but the KEDA Redis scaler reads the list name from its own metadata and reports READY: False without it. Set both to the same value.
Verify that KEDA accepted the trigger.
A READY value of True confirms that KEDA connected to Redis and polls the list, so run the command again if the value has not changed yet.
Push a message onto the request list.
The command returns (integer) 1, which is the new length of the list, and then removes the temporary client pod.
Wait about a minute, then read the response list.
The response list contains Hello from Fission, which confirms that the message reached the function and that the result returned through the queue.
Fission provides a health command and a set of list commands that report the state of every object you created. Run them after the deployment is complete to confirm the cluster is in the expected state.
Check the health of the Fission services.
The command reports the executor, router, storage service, and webhook, and marks each one as running.
List the environments.
The output lists the python environment.
List the functions.
The output lists the hello function with the newdeploy executor.
List the HTTP triggers.
The output lists hello-route with the GET method and the /hello path.
List the time triggers.
The output lists hello-timer with the @every 1m schedule.
List the message queue triggers.
The output lists redis-trigger with the request-topic and response-topic lists.
Read the function logs.
The command prints the runtime log from the function pod, including the server startup and the specialize call that loaded your code.
Check the function and environment pods.
The output lists the poolmgr-python pool pods and a newdeploy-hello pod for the function, each with a Running status. A redis-trigger pod also appears for about five minutes after the queue receives a message, because KEDA scales the connector up to process the message and back to zero once the list stays empty.
This section outlines the strategy for migrating functions from AWS Lambda to Fission. It focuses on the concepts and the tools involved, so the approach stays applicable as both platforms release new versions. Refer to the current AWS Lambda and Fission documentation for exact commands and options when you plan your migration.
The trigger assessment determines how much of the migration is mechanical and how much requires new architecture. API Gateway routes map onto Fission HTTP triggers that serve the same paths and methods, and EventBridge Scheduler schedules map onto Fission time triggers. EventBridge's six-field cron format ends with a year, while Fission's six-field format starts with seconds, so drop the year, add a leading seconds field such as 0, or switch to an @every interval. Run fission timetrigger showschedule to test each converted expression, because Fission fires triggers on the server's clock.
SQS and Kinesis event source mappings map to Fission message queue triggers, which KEDA connects to. Fission's KEDA connectors read from SQS and Kinesis directly, so a function can keep consuming from AWS, or you can move the traffic to a broker that you run, such as Kafka or RabbitMQ. Functions that S3 events, DynamoDB Streams, or EventBridge patterns invoke have no direct Fission trigger, so each one needs a replacement event path, such as an object storage webhook or a database change stream that publishes to your broker.
Handler migration adapts each function to how the Fission environment invokes code. Lambda calls a handler with the signature lambda_handler(event, context), while the Fission Python environment calls its entrypoint with no arguments and returns the value as the response body. Rename the handler to main(), replace the event argument with request.get_json() to read the request body through the Flask request object, and replace context.aws_request_id with the X-Fission-Request-ID header. Print request.headers in a test function to confirm that your Fission version passes that header to the function.
Lambda layers ship shared dependencies alongside a function, while Fission builds dependencies into the package itself through a builder image that you attach to the environment. Attach a builder such as ghcr.io/fission/python-builder with fission env update --builder, include a requirements.txt file and a build script with the source, and create the package with fission package create. The builder installs the dependencies inside the cluster, so the package that reaches the runtime already contains everything that the function imports. Compiled runtimes such as Go follow the same pattern, so you supply source code and the builder compiles it. Fission loads the compiled function as a Go plugin, which must use exactly the same Go toolchain as the runtime, so set the go directive in go.mod to the Go version of the environment and builder images.
Lambda reads configuration from environment variables and permissions from an Identity and Access Management (IAM) execution role, and Fission replaces both with Kubernetes objects. Store configuration in ConfigMaps and Secrets, and attach them with the --configmap and --secret flags on fission function create. Fission mounts each value as a file at /configs/NAMESPACE/NAME/KEY or /secrets/NAMESPACE/NAME/KEY, so change a function that reads os.environ to read those files, or set environment variables through a PodSpec in a spec file. Kubernetes role-based access control (RBAC) rules replace the execution role for access to the cluster API, and access to external cloud APIs needs its own credentials, which you store as Secrets.
The following items require attention during the migration:
poolmgr executor maintains a warm pool for fast cold starts but incurs idle capacity, while the newdeploy executor can scale to zero but incurs a cold start on the next request. Each function uses one executor, so choose the trade-off for each function.canaryDeployment.enabled, shifts that weight automatically.helm upgrade does not touch them, so pin the chart version and apply the matching CRDs in the same step whenever you upgrade. The Fission upgrade guide also warns that upgrades cause some downtime.You have successfully deployed Fission on a Kubernetes cluster as an alternative to AWS Lambda. You deployed a Python function, exposed it over HTTP, added time and message-queue triggers, and compared the poolmgr and newdeploy executors. For more information, visit the official Fission documentation.
0 Comments
Be the first to comment and share your perspective with the community.