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.
| Benefit | Description |
|---|---|
| No infrastructure management | The platform handles servers, OS, and runtime lifecycle |
| Automatic scaling | Functions scale to match incoming traffic with no manual configuration |
| Deploy in seconds | Push code and receive a live HTTPS endpoint immediately |
| Pay-per-use | Resources are consumed only during active execution |
| Language flexibility | Multiple runtimes available — Python, Node.js, C#, PHP, Go |
Supported Runtimes
Python
| Runtime Type | Available Versions |
|---|---|
| HTTP | Python 3.9, 3.10, 3.11, 3.12, 3.13, 3.14 |
| FastAPI | Python 3.11 |
| Flask | Python 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 Type | Available Versions | Entry File | Module Format |
|---|---|---|---|
| HTTP | Node 20, 22, 24 | index.mjs | ESM (export const handler) |
| Express | Node 18, 20 | index.js | Express framework |
HTTP runtimes are recommended for new deployments. Express runtimes are available for migrating existing Express.js applications.
Other Languages
| Language | Version |
|---|---|
| C# / .NET | 7.0 [Http] |
| PHP | 8.2 [Http] |
| Go | 1.21 [Http] |
GPU Runtimes
GPU runtimes are optimized for AI inference, deep learning, and data science workloads.
| Framework | Version | Available As |
|---|---|---|
| PyTorch | 2.1.2 | FastAPI, Flask |
| TensorFlow | 2.19.0 | FastAPI, 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.
- Log in to MyAccount and click Functions in the left sidebar under the Compute section.
- Click Get Started.
- 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).
- Click Create Function.
- Select CPU hardware.
- Select the runtime template (e.g., Python 3.11 [Http]).
- Enter the function name.
- Write your code in the Code tab.
- Click the requirements.txt tab and add any required packages.
- Click Function Configuration and add any required environment variables.
- Click Create.
Dedicated Replica
CPU functions support dedicated replicas. When enabled, pre-initialized instances remain available to reduce cold-start latency.
- Enable Dedicated Replicas during function creation.
- Select the number of replicas (up to 5).
- Click Create.
To update replicas after creation, click System Configuration and update the replica count.
Node.js
- Click Create Function.
- Select the runtime template (e.g., Node 22 [Http] or Node 20 [Express]).
- Enter the function name and write your code in the Code tab.
- Click the package.json tab and add any required packages.
- Click Function Configuration and add any required environment variables.
- Click Create.
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
- Click Create Function.
- Select the runtime template (Csharp/.NET 7.0 [Http]).
- Enter the function name and write your code in the Code tab.
- Click the Function.csproj tab and add any required packages.
- Click Function Configuration and add any required environment variables.
- Click Create.
GPU Hardware
- Click Create Function.
- Select GPU hardware.
- Select the runtime template (e.g., Python PyTorch 2.1.2 [FastAPI]).
- 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.
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.
- Click Click to upload in the code section.
- Select your zip file.
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
| Model | Best For |
|---|---|
| Runtime Templates | Most use cases — deploy directly using a language-specific runtime |
| ZIP File Upload | Larger projects, local development, nested directory structures |
| Custom Container | Existing containerized workloads, custom frameworks, specialized runtimes |
Function Information
Each deployed function exposes the following operational metadata.
| Field | Description |
|---|---|
| URL | Public HTTPS endpoint used to invoke the function |
| Version | Deployment revision number — increments with each update |
| Memory | Configured memory allocation available to the runtime |
| Execution Timeout | Maximum execution duration before termination |
| Invocation Count | Total 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
- Click on the function name from the Functions list.
- Navigate to the Code tab.
- Edit the code as required, or upload a new zip file by clicking Click to upload.
- Click Save to apply the changes.
System Configuration
In this section, you can update the memory, timeout, or replica settings for a particular function.
- Click System Configuration on the function detail page.
- Update the memory, timeout, or number of replicas as required.
- Click Save to apply the changes.
Function Lifecycle
FaaS functions transition through the following states:
| State | Description |
|---|---|
| Deploying | The platform is preparing the runtime environment and installing dependencies. Duration depends on the number of requirements and code complexity. |
| Running | The function is successfully deployed and the HTTPS endpoint is active and ready to receive requests. |
| Failed | The 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. |