Skip to main content

Function as a Service (FaaS)

Overview

Function as a Service (FaaS) is E2E Cloud's serverless execution platform that enables developers to build, deploy, and scale applications without managing infrastructure.

With FaaS, you focus entirely on writing business logic while the platform automatically handles infrastructure provisioning, container lifecycle management, scaling and concurrency, runtime management, networking and routing, and logging and monitoring.

Functions are deployed in seconds and invoked through HTTPS endpoints, making FaaS suitable for APIs, webhooks, automation workflows, event processing, AI inference, microservices, and backend applications.

Why FaaS?

Traditional application deployment requires managing servers, operating systems, runtime environments, scaling policies, and deployment pipelines. FaaS removes this operational burden and allows teams to focus exclusively on application development.

BenefitDescription
No infrastructure managementThe platform handles servers, OS, and runtime lifecycle
Automatic scalingFunctions scale to match incoming traffic with no manual configuration
Deploy in secondsPush code and receive a live HTTPS endpoint immediately
Pay-per-useResources are consumed only during active execution
Language flexibilityMultiple runtimes available — Python, Node.js, C#, PHP, Go

Supported Runtimes

Python

Runtime TypeAvailable Versions
HTTPPython 3.9, 3.10, 3.11, 3.12, 3.13, 3.14
FastAPIPython 3.11
FlaskPython 3.11

The HTTP runtime provides a lightweight function-based model (handler(event, context)). FastAPI and Flask runtimes run full framework applications and are recommended for applications that need routing, middleware, or OpenAPI documentation.

Node.js

Runtime TypeAvailable VersionsEntry FileModule Format
HTTPNode 20, 22, 24index.mjsESM (export const handler)
ExpressNode 18, 20index.jsExpress framework

HTTP runtimes are recommended for new deployments. Express runtimes are available for migrating existing Express.js applications.

Other Languages

LanguageVersion
C# / .NET7.0 [Http]
PHP8.2 [Http]
Go1.21 [Http]

GPU Runtimes

GPU runtimes are optimized for AI inference, deep learning, and data science workloads.

FrameworkVersionAvailable As
PyTorch2.1.2FastAPI, Flask
TensorFlow2.19.0FastAPI, Flask

Custom Container Image

Deploy any application using your own Docker image. The image must be compatible with --platform=linux/amd64. See Custom Container Image for setup instructions.


Hardware Options

CPU Functions

General-purpose execution environment. Suitable for:

  • REST APIs and webhooks
  • Automation and background processing
  • Microservices and internal platform APIs
  • Lightweight data processing

Supports optional dedicated replicas (up to 5) to reduce cold-start latency.

GPU Functions

Accelerated execution environment. Suitable for:

  • AI model inference
  • Deep learning workloads
  • Computer vision and image processing
  • LLM serving
  • Data science pipelines

Available with PyTorch and TensorFlow runtimes, or custom containers.


Activate FaaS

Before creating a function, you must activate the FaaS platform.

  1. Log in to MyAccount and click Functions in the left sidebar under the Compute section.
  2. Click Get Started.
  3. Click Activate FaaS and confirm.

Once activated, you can create functions using either CPU or GPU hardware.


How to Create Functions

Python

This is the recommended template for Python users.

  • Python HTTP runtimes are built on Debian Linux and support native C modules such as SQL, Kafka, Pandas, and image manipulation libraries.
  • Available versions: 3.9, 3.10, 3.11, 3.12, 3.13, 3.14 (HTTP); 3.11 (FastAPI and Flask).
  1. Click Create Function.
  2. Select CPU hardware.
  3. Select the runtime template (e.g., Python 3.11 [Http]).
  4. Enter the function name.
  5. Write your code in the Code tab.
  6. Click the requirements.txt tab and add any required packages.
  7. Click Function Configuration and add any required environment variables.
  8. Click Create.

Dedicated Replica

CPU functions support dedicated replicas. When enabled, pre-initialized instances remain available to reduce cold-start latency.

  1. Enable Dedicated Replicas during function creation.
  2. Select the number of replicas (up to 5).
  3. Click Create.

To update replicas after creation, click System Configuration and update the replica count.

Node.js

  1. Click Create Function.
  2. Select the runtime template (e.g., Node 22 [Http] or Node 20 [Express]).
  3. Enter the function name and write your code in the Code tab.
  4. Click the package.json tab and add any required packages.
  5. Click Function Configuration and add any required environment variables.
  6. Click Create.
info

For HTTP runtimes (Node 20/22/24), the entry file is index.mjs and uses ESM syntax:

export const handler = async (event, context) => {
return {
statusCode: 200,
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ message: "Hello World!" })
};
};

C# / .NET

  1. Click Create Function.
  2. Select the runtime template (Csharp/.NET 7.0 [Http]).
  3. Enter the function name and write your code in the Code tab.
  4. Click the Function.csproj tab and add any required packages.
  5. Click Function Configuration and add any required environment variables.
  6. Click Create.

GPU Hardware

  1. Click Create Function.
  2. Select GPU hardware.
  3. Select the runtime template (e.g., Python PyTorch 2.1.2 [FastAPI]).
  4. Enter the function name and write your code in the Code tab.

Custom Container Image

If you select Custom Container Image, provide a public Docker image URL and create your function.

To use your own image, set the desired public base image in the BASE_IMAGE argument in your Dockerfile.

note

Your image must be compatible with --platform=linux/amd64. Ensure the base image supports this architecture, or the container may fail to start.

# Set your desired public base image here
ARG BASE_IMAGE=e2efaasplatform/react-sample

FROM --platform=linux/amd64 ${BASE_IMAGE}

# These ensure the container runs securely as a non-root user
USER 1001

# Add your custom instructions below this line (optional)

Upload Code via Zip File

Instead of writing code in the editor, you can upload a zip file.

  1. Click Click to upload in the code section.
  2. Select your zip file.
File Structure

The zip file must contain only one directory and must follow the zip file guidelines. Download sample zip files from the Zip Guidelines section.


Deployment Models

ModelBest For
Runtime TemplatesMost use cases — deploy directly using a language-specific runtime
ZIP File UploadLarger projects, local development, nested directory structures
Custom ContainerExisting containerized workloads, custom frameworks, specialized runtimes

Function Information

Each deployed function exposes the following operational metadata.

FieldDescription
URLPublic HTTPS endpoint used to invoke the function
VersionDeployment revision number — increments with each update
MemoryConfigured memory allocation available to the runtime
Execution TimeoutMaximum execution duration before termination
Invocation CountTotal number of requests processed by the function

Click on the Logs tab on the function detail page to view runtime and application logs.


Edit Function

  1. Click on the function name from the Functions list.
  2. Navigate to the Code tab.
  3. Edit the code as required, or upload a new zip file by clicking Click to upload.
  4. Click Save to apply the changes.

System Configuration

In this section, you can update the memory, timeout, or replica settings for a particular function.

  1. Click System Configuration on the function detail page.
  2. Update the memory, timeout, or number of replicas as required.
  3. Click Save to apply the changes.

Function Lifecycle

FaaS functions transition through the following states:

StateDescription
DeployingThe platform is preparing the runtime environment and installing dependencies. Duration depends on the number of requirements and code complexity.
RunningThe function is successfully deployed and the HTTPS endpoint is active and ready to receive requests.
FailedThe deployment or execution process encountered an error. Common causes: missing dependencies, invalid package configuration, incorrect environment variables, resource limit violations. Check the Logs tab for details.

Function Troubleshooting

Error: "Function is in failed state"

Description: This error signals the absence or misconfiguration of a crucial external dependency or library.

Resolution Steps:

  1. Verify the accurate installation of all essential dependencies within your function's environment.
  2. Inspect the values specified in the external package installation files for accuracy.
  3. Check if the environment variables are stated and fetched correctly in the code.

Error: "Can't reach the service function-name"

Description: This error is triggered when a function surpasses its designated execution time or resource limits.

Resolution Steps:

  1. Review and adjust the timeout and memory configurations for your function.
  2. Optimize your code to reduce processing time.

If you are still facing issues, reach out to our support team at cloud-support@e2enetworks.com.


Deactivate FaaS

To deactivate FaaS, you must first delete all functions.

  1. Delete all existing functions.
  2. Click Deactivate FaaS Plan.
  3. Click Deactivate to confirm.
Last updated on June 3, 2026.