> For the complete documentation index, see [llms.txt](https://docs.digitalapi.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalapi.ai/api-gateway/plugin-reference/plugins-serverless.md).

# Serverless plugins

Plugins in this category execute code on the request path: Lua snippets, AWS Lambda invocations, Azure Function calls, Cloudflare Workers. Use them sparingly; they add latency and operational complexity compared to fixed-policy plugins. The catalogue ships 4 Serverless plugins.

{% hint style="info" %}
**In this category:** [`aws-lambda`](#aws-lambda), [`azure-functions`](#azure-functions), [`openfunction`](#openfunction), [`openwhisk`](#openwhisk)
{% endhint %}

### `aws-lambda`

The `aws-lambda` Plugin is used for integrating AILIX with [AWS Lambda](https://aws.amazon.com/lambda/) and [Amazon API Gateway](https://aws.amazon.com/api-gateway/) as a dynamic upstream to proxy all requests for a particular URI to the AWS Cloud.

{% hint style="info" %}
**Priority** `-1899` · **Category** Serverless · **Required** `function_uri`
{% endhint %}

<details>

<summary>Configuration and details</summary>

When enabled, the Plugin terminates the ongoing request to the configured URI and initiates a new request to the AWS Lambda Gateway URI on behalf of the client with configured authorization details, request headers, body and parameters (all three passed from the original request). It returns the response with headers, status code and the body to the client that initiated the request with AILIX.

This Plugin supports authorization via AWS API key and AWS IAM secrets. The Plugin implements [AWS Signature Version 4 signing](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html) for IAM secrets.

| Name                          | Type    | Required | Default       | Valid values                                                                                                                                                  | Description                                                                                                                                |
| ----------------------------- | ------- | -------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| function\_uri                 | string  | True     |               |                                                                                                                                                               | AWS API Gateway endpoint which triggers the lambda serverless function.                                                                    |
| authorization                 | object  | False    |               |                                                                                                                                                               | Authorization credentials to access the cloud function.                                                                                    |
| authorization.apikey          | string  | False    |               |                                                                                                                                                               | Generated API Key to authorize requests to the AWS Gateway endpoint.                                                                       |
| authorization.iam             | object  | False    |               |                                                                                                                                                               | Used for AWS IAM role based authorization performed via AWS v4 request signing. See [IAM authorization schema](#iam-authorization-schema). |
| authorization.iam.accesskey   | string  | True     |               | Generated access key ID from AWS IAM console.                                                                                                                 |                                                                                                                                            |
| authorization.iam.secretkey   | string  | True     |               | Generated access key secret from AWS IAM console.                                                                                                             |                                                                                                                                            |
| authorization.iam.aws\_region | string  | False    | "us-east-1"   | AWS region where the request is being sent.                                                                                                                   |                                                                                                                                            |
| authorization.iam.service     | string  | False    | "execute-api" | The service that is receiving the request. For Amazon API gateway APIs, it should be set to `execute-api`. For Lambda function, it should be set to `lambda`. |                                                                                                                                            |
| timeout                       | integer | False    | 3000          | \[100,...]                                                                                                                                                    | Proxy request timeout in milliseconds.                                                                                                     |
| ssl\_verify                   | boolean | False    | true          | true/false                                                                                                                                                    | When set to `true` performs SSL verification.                                                                                              |
| keepalive                     | boolean | False    | true          | true/false                                                                                                                                                    | When set to `true` keeps the connection alive for reuse.                                                                                   |
| keepalive\_pool               | integer | False    | 5             | \[1,...]                                                                                                                                                      | Maximum number of requests that can be sent on this connection before closing it.                                                          |
| keepalive\_timeout            | integer | False    | 60000         | \[1000,...]                                                                                                                                                   | Time is ms for connection to remain idle without closing.                                                                                  |

</details>

### `azure-functions`

The `azure-functions` Plugin is used to integrate AILIX with [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) as a dynamic upstream to proxy all requests for a particular URI to the Microsoft Azure Cloud.

{% hint style="info" %}
**Priority** `-1900` · **Category** Serverless · **Required** `function_uri`
{% endhint %}

<details>

<summary>Configuration and details</summary>

When enabled, the Plugin terminates the ongoing request to the configured URI and initiates a new request to Azure Functions on behalf of the client with configured authorization details, request headers, body and parameters (all three passed from the original request). It returns back the response with headers, status code and the body to the client that initiated the request with AILIX.

| Name                   | Type    | Required | Default | Valid values | Description                                                                                                                          |
| ---------------------- | ------- | -------- | ------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| function\_uri          | string  | True     |         |              | Azure FunctionS endpoint which triggers the serverless function. For example, `http://test-ailix.azurewebsites.net/api/HttpTrigger`. |
| authorization          | object  | False    |         |              | Authorization credentials to access Azure Functions.                                                                                 |
| authorization.apikey   | string  | False    |         |              | Generated API key to authorize requests.                                                                                             |
| authorization.clientid | string  | False    |         |              | Azure AD client ID to authorize requests.                                                                                            |
| timeout                | integer | False    | 3000    | \[100,...]   | Proxy request timeout in milliseconds.                                                                                               |
| ssl\_verify            | boolean | False    | true    | true/false   | When set to `true` performs SSL verification.                                                                                        |
| keepalive              | boolean | False    | true    | true/false   | When set to `true` keeps the connection alive for reuse.                                                                             |
| keepalive\_pool        | integer | False    | 5       | \[1,...]     | Maximum number of requests that can be sent on this connection before closing it.                                                    |
| keepalive\_timeout     | integer | False    | 60000   | \[1000,...]  | Time is ms for connection to remain idle without closing.                                                                            |

</details>

### `openfunction`

The `openfunction` Plugin is used to integrate AILIX with [CNCF OpenFunction](https://openfunction.dev/) serverless platform.

{% hint style="info" %}
**Priority** `-1902` · **Category** Serverless · **Required** `function_uri`
{% endhint %}

<details>

<summary>Configuration and details</summary>

This Plugin can be configured on a Route and requests will be sent to the configured OpenFunction API endpoint as the upstream.

| Name                         | Type    | Required | Default  | Valid values   | Description                                                                       |
| ---------------------------- | ------- | -------- | -------- | -------------- | --------------------------------------------------------------------------------- |
| function\_uri                | string  | True     |          |                | function uri. For example, `https://localhost:30858/default/function-sample`.     |
| ssl\_verify                  | boolean | False    | true     |                | When set to `true` verifies the SSL certificate.                                  |
| authorization                | object  | False    |          |                | Authorization credentials to access functions of OpenFunction.                    |
| authorization.service\_token | string  | False    |          |                | The token format is 'xx:xx' which supports basic auth for function entry points.  |
| timeout                      | integer | False    | 3000 ms  | \[100, ...] ms | OpenFunction action and HTTP call timeout in ms.                                  |
| keepalive                    | boolean | False    | true     |                | When set to `true` keeps the connection alive for reuse.                          |
| keepalive\_timeout           | integer | False    | 60000 ms | \[1000,...] ms | Time is ms for connection to remain idle without closing.                         |
| keepalive\_pool              | integer | False    | 5        | \[1,...]       | Maximum number of requests that can be sent on this connection before closing it. |

</details>

### `openwhisk`

The `openwhisk` Plugin is used to integrate AILIX with Apache OpenWhisk serverless platform.

{% hint style="info" %}
**Priority** `-1901` · **Category** Serverless · **Required** `api_host`, `service_token`, `namespace`, `action`
{% endhint %}

<details>

<summary>Configuration and details</summary>

This Plugin can be configured on a Route and requests will be send to the configured OpenWhisk API endpoint as the upstream.

| Name               | Type    | Required | Default | Valid values  | Description                                                                                                |
| ------------------ | ------- | -------- | ------- | ------------- | ---------------------------------------------------------------------------------------------------------- |
| api\_host          | string  | True     |         |               | OpenWhisk API host address. For example, `https://localhost:3233`.                                         |
| ssl\_verify        | boolean | False    | true    |               | When set to `true` verifies the SSL certificate.                                                           |
| service\_token     | string  | True     |         |               | OpenWhisk service token. The format is `xxx:xxx` and it is passed through basic auth when calling the API. |
| namespace          | string  | True     |         |               | OpenWhisk namespace. For example `guest`.                                                                  |
| action             | string  | True     |         |               | OpenWhisk action. For example `hello`.                                                                     |
| result             | boolean | False    | true    |               | When set to `true` gets the action metadata (executes the function and gets response).                     |
| timeout            | integer | False    | 60000ms | \[1, 60000]ms | OpenWhisk action and HTTP call timeout in ms.                                                              |
| keepalive          | boolean | False    | true    |               | When set to `true` keeps the connection alive for reuse.                                                   |
| keepalive\_timeout | integer | False    | 60000ms | \[1000,...]ms | Time is ms for connection to remain idle without closing.                                                  |
| keepalive\_pool    | integer | False    | 5       | \[1,...]      | Maximum number of requests that can be sent on this connection before closing it.                          |

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digitalapi.ai/api-gateway/plugin-reference/plugins-serverless.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
