---
title: "Runtime Adapters"
description: "Runtime Adapters allow you to run your Hono application on various serverless and runtime environments. Each adapter acts as a bridge, translating the unique requests and responses of a specific pl..."
last_updated: "2026-07-02T09:15:05.225215+00:00"
canonical_url: "https://www.doc0.app/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/guide/advanced-features/runtime-adapters"
---

Runtime Adapters allow you to run your Hono application on various serverless and runtime environments. Each adapter acts as a bridge, translating the unique requests and responses of a specific platform into a format that Hono understands.

By using these adapters, you can write your application logic once and deploy it to different environments like AWS Lambda, Cloudflare Workers, Bun, or Deno with minimal configuration changes.

## Supported Platforms

We provide official adapters for the following platforms. Each can be accessed via their specific import path.

| Platform | Import Path | Key Features |
| :--- | :--- | :--- |
| AWS Lambda | `hono/aws-lambda` | Event handling, Streaming |
| Bun | `hono/bun` | Static serving, WebSocket, SSG |
| Cloudflare Workers | `hono/cloudflare-workers` | Static serving, WebSocket |
| Deno | `hono/deno` | Static serving, WebSocket, SSG |

> [!NOTE]
> To use an adapter, import the necessary functions directly from the platform-specific sub-path of the `hono` package.

## Integration Workflow

While specific requirements vary by platform, the general setup follows this pattern:

1. **Initialize your application** using the standard `new Hono()` constructor.
2. **Import the relevant handler** or utility from the corresponding `hono/adapter/...` path.
3. **Register the handler** as the entry point for your deployment platform.

### Example: AWS Lambda
To handle requests in an AWS Lambda environment, use the `handle` function to translate the Lambda event into a Hono request:

```typescript
import { Hono } from 'hono'
import { handle } from 'hono/aws-lambda'

const app = new Hono()

app.get('/', (c) => c.text('Hello AWS Lambda!'))

export const handler = handle(app)
```

> [!TIP]
> Use `streamHandle` instead of `handle` if your application requires response streaming support in AWS Lambda.

## Core Concepts

Understanding these common adapter components will help you build portable applications:

*   **`handle` / `serveStatic`**: These act as the primary entry points. They translate incoming platform-specific events (like API Gateway events or raw HTTP requests) into standard Web `Request` and `Response` objects.
*   **`getConnInfo`**: A helper function provided by all major adapters to retrieve connection metadata, such as client IP addresses, which are handled differently across runtimes.
*   **`upgradeWebSocket`**: A utility used to transition an HTTP request into a WebSocket connection, available for runtimes that support persistent connections.

## Advanced Features

Certain runtimes provide capabilities beyond basic request handling:

*   **Static Site Generation (SSG)**: Available for `bun` and `deno` via `toSSG`, allowing you to export your application routes as static files for deployment to CDNs.
*   **Static File Serving**: Available for `bun`, `deno`, and `cloudflare-workers` via the `serveStatic` utility, which enables efficient delivery of assets.

> [!WARNING]
> Always verify the specific platform documentation regarding request body sizes, execution timeouts, and memory limits, as these constraints are imposed by the cloud provider or runtime, not by Hono.

## Request Flow
The following diagram illustrates how an adapter facilitates communication between a client and your application:

```mermaid
graph LR
    A[Client Request] --> B{Runtime Adapter}
    B --> C[Hono Application]
    C --> B
    B --> D[Platform Response]
```

## Related

- [Installation and Setup](https://www.doc0.app/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/guide/getting-started/installation-and-setup)


## Sitemap

See the full [sitemap](https://www.doc0.app/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/llms.txt) for all pages in this wiki.
