> For the complete documentation index, see [llms.txt](https://docs.ixhello.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ixhello.com/ixhc/connections/amazon/amazon-lambda/amazon-lambda-create-lambda-function.md).

# Amazon Lambda:  Create Lambda Function

### Objective <a href="#toc94634309" id="toc94634309"></a>

This guide will help you to quickly connect to Amazon Lambda and create a sample Lambda functions as a prerequisite to integrate Amazon Lambda to iX Hello.

### Pre-requisites <a href="#toc94634310" id="toc94634310"></a>

* **An active AWS Account**

You should have an active AWS Account. If you do not have it, you can create an AWS account at <https://portal.aws.amazon.com/billing/signup#/start>

*AWS Accounts Include 12 Months of Free Tier Access*

### Steps <a href="#toc94634311" id="toc94634311"></a>

To proceed with these steps, you should have all the pre-requisites satisfied. If you are missing something, please go back and make sure you satisfy all of them.

Once done, you can now proceed with the following process.

### Create Lambda Function <a href="#toc94634312" id="toc94634312"></a>

1. Login to your AWS console in [https://console.aws.amazon.com](https://console.aws.amazon.com/) using your AWS credentials.
2. Search for Lambda in the search bar and click on Lambda Service.

!\[Graphical user interface, application

Description automatically generated]\(/files/88NmhB99xIbnGfXdkRAK)

3. You will be directed to the AWS Lambda dashboard.

<figure><img src="/files/N1BujRahDAFlq3Z9uk3s" alt=""><figcaption></figcaption></figure>

4. Click on Create Function. Fill in the following details:

| Select Author from Scratch   |
| ---------------------------- |
| Function Name: ContactFinder |
| Runtime: Python 3.9          |
| Architecture: x86\_64        |
| Click on Create Function     |

<figure><img src="/files/20jUQ4g0kDLKmKRQ5HU4" alt=""><figcaption></figcaption></figure>

5. You will be now directed to the following screen to change the code and configuration of the Lambda function.

<figure><img src="/files/3v0SQVHjFedDmV90dk9d" alt=""><figcaption></figcaption></figure>

6. Now replace the text in the text editor with following value:
7. The resulting screen will be something like this.

```
import json
 
def lambda_handler(event, context):
    # TODO implement
    if(event["name"] == "kiran"):
        return { 
            'name': 'Kiran', 
            'phone': '9429020115', 
            'country': 'India' 
        }
    if(event["name"] == "rose"):
        return { 
            'name': 'Rose', 
            'phone': '(512) 757-6001', 
            'country': 'USA' 
        }
    if(event["name"] == "sean"):
        return { 
            'name': 'Sean', 
            'phone': '(512) 757-6002', 
            'country': 'UK' 
        }
    if(event["name"] == "Jack"):
        return { 
            'name': 'Jack', 
            'phone': '(512) 757-7001', 
            'country': 'Ca' 
        }
 
    return "Not found"
```

<figure><img src="/files/XS7RzrumN27AsILXfZFB" alt=""><figcaption></figcaption></figure>

8. To ensure that the function is working. Click on Test. Provide a test name and provide following sample value in the test. Click on Create.

{ "name": "rose" }

!\[Graphical user interface, application

Description automatically generated]\(/files/v5clgH1xOBmYyMd78CF1)

9. &#x20;Now Click on Deploy and then Test. The sample response is also shown in below:

<figure><img src="/files/2ZUdXfNRTszt9WdnyeS0" alt=""><figcaption></figcaption></figure>

10. &#x20;Now that you have successfully created AWS-Lambda function, you can use this with iX Hello integration to build custom Apps. Follow the next document to integrate Amazon Lambda with iX Hello.


---

# 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.ixhello.com/ixhc/connections/amazon/amazon-lambda/amazon-lambda-create-lambda-function.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.
