> ## Documentation Index
> Fetch the complete documentation index at: https://docs.formizee.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS Lambda

> Learn how to ingest your first submission using AWS Lambda

### Prerequisites

To get the most out of this guide, you'll need to:

* [Create a Formizee account](https://dashboard.formizee.com)
* [Have a form created](/guides/create-your-first-form)

## 1. Create a AWS Lambda function

Go to [aws.amazon.com](https://aws.amazon.com) and create a new Lambda function using the Node 22.x runtime.

<Frame>
  <img src="https://mintcdn.com/formizee/UMqC5saRDgjM1LWR/assets/quickstart/aws-lambda-1.png?fit=max&auto=format&n=UMqC5saRDgjM1LWR&q=85&s=d5b33ef2da7ca8fb6b036318f2b1b5cc" alt="AWS Dashboard" width="3058" height="1804" data-path="assets/quickstart/aws-lambda-1.png" />
</Frame>

## 2. Edit the handler function

Paste the following code into the browser editor and update the **ENDPOINT\_URL**.

```js index.mjs {1} theme={"system"}
const ENDPOINT_URL = "https://api.formizee.com/v1/f/enp_123456";

export const handler = async(_event) => {
	const res = await fetch(ENDPOINT_URL, {
		method: "POST",
		headers: {
			"Content-Type": "application/json",
		},
		body: JSON.stringify({
			name: "example",
			email: "example@mail.com",
		}),
	});
	const data = await res.json();
	return new Response(JSON.stringify(data), {
		headers: {
			"Content-Type": "application/json",
		},
	});
};
```

## 3. Deploy and ingest submissions

Click on `Deploy` and then `Test` at the left of the screen.

<Frame>
  <img src="https://mintcdn.com/formizee/UMqC5saRDgjM1LWR/assets/quickstart/aws-lambda-2.png?fit=max&auto=format&n=UMqC5saRDgjM1LWR&q=85&s=da2f57e201ca1e5e088646b90418babb" alt="AWS Lambda Editor" width="3058" height="1804" data-path="assets/quickstart/aws-lambda-2.png" />
</Frame>

## 4. Try it yourself

<Card title="Formizee AWS Lambda Example" icon="link" href="https://github.com/formizee/formizee-aws-lambda-example">
  See the full source code
</Card>
