---
title: c AWS Lambda
description: Available connectors
documentId: ipaas-aws-lambda
locale: en-US
---

The [**AWS Lambda**](https://camel.apache.org/components/4.8.x/aws2-lambda-component.html) component supports AWS Lambda functions: `create`, `get`, `list`, `delete`, and `invoke`.

**URI Syntax**: `aws2-lambda:function`

### Main fields

*Path parameters*

| **Name** | **Description** | **Default** | **Type** |
|----------|---------------|------------|----------|
|`function` (producer)| (required) Lambda function name. | — | String


*Query parameters*

| **Name** | **Description** | **Default** | **Type** |
|----------|---------------|------------|----------|
| `accessKey` (security)| AWS access key for authentication.| — | String |
| `secretKey` (security)| AWS secret key for authentication.  | — | String |
| `operation` (producer) | The Lambda operation to execute. Possible values: `listFunctions`, `getFunction`, `createFunction`, `deleteFunction`, `invokeFunction`, etc. | `invokeFunction` | `Lambda2Operations`|


### Example

<Steps>
    <Step>
    The flow starts with a POST request to the `/hello` endpoint.
    </Step>
    <Step> 
    Then, it logs before execution.
    </Step>
    <Step>
    Invokes a Lambda function called `sensedia-integration-camel-poc-lambda`:

    - AWS validates credentials using `accessKey` and `secretKey`.
    - Then, executes the `invokeFunction` operation (default).
    - The request body is sent as payload to the Lambda function.
    </Step>
    <Step>
     Logs the result after execution.
    </Step>
</Steps>


```yaml
- from:
        uri: rest:post:/hello
        steps:
            - to:
                    uri: log:myLogger
            - to:
                    uri: aws2-lambda:sensedia-integration-camel-poc-lambda
                    parameters:
                        accessKey: my-access-key
                        secretKey: my-secret-key
                        operation: invokeFunction
            - to:
                    uri: log:myLogger
``` 

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/component_aws_lambda_e14a8b3793.png) 


#### cURL

```
curl --location --request POST 'https://sensedia-integration-camel-poc.f6g7h8i9j0.integrations-tst.sensedia-eng.com/hello' \
--header 'Content-Type: application/json' \
--data-raw '{
        "name": "bala garoto",
        "price": 1.40
}'
```

#### Result

```
sensedia-integration-camel-poc-00001-deployment-57895cdbccxvkxw integration 2024-04-03 12:22:56,238 INFO  [myLogger] (executor-thread-1) Exchange[ExchangePattern: InOut, BodyType: String, Body: {"statusCode": 200, "body": "\"Hello from Lambda!\""}]
```
