> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.aws.lambda.Invoke

- Component: `appmixer.aws.lambda.Invoke`
- Kind: Action
- Version: 1.0.1
- Visibility: Public
- Connector: [appmixer.aws.lambda 2.0.3](https://connectors.appmixer.com/connector/appmixer.aws.lambda/2.0.3.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.aws.lambda/2.0.3/component/appmixer.aws.lambda.Invoke>

Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. To invoke a function asynchronously, set InvocationType to `Event`.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Region (`region`) | text | Your AWS instance region. If not select, us-east-1 will be used as default. |
| FunctionName (`name`) | text | The name of the Lambda function, version, or alias. You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length. |
| InvocationType (`invocationType`) | select | Choose from the following options. - `RequestResponse` (default) – Invoke the function synchronously. Keep the connection open until the function returns a response or times out. The API response includes the function response and additional data. - `Event` – Invoke the function asynchronously. Send events that fail multiple times to the function's dead-letter queue (if one is configured). The API response only includes a status code. - `DryRun` – Validate parameter values and verify that the user or role has permission to invoke the function. |
| ClientContext (`clientContext`) | text | Up to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object. |
| LogType (`logType`) | select | Set to `Tail` to include the execution log in the response. Applies to synchronously invoked functions only. |
| Payload (`payload`) | textarea | The JSON that you want to provide to your Lambda function as input. |
| Qualifier (`qualifier`) | text | Specify a version or alias to invoke a published version of the function. Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: `(\|[a-zA-Z0-9$_-]+)` |

## Output ports

### Port `out`

Variables are loaded dynamically from `/component/appmixer/aws/lambda/Invoke?outPort=out`.

## Full metadata (component.json)

```json
{
  "name": "appmixer.aws.lambda.Invoke",
  "author": "Jiří Hofman <jirka@client.io>",
  "description": "Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or asynchronously. To invoke a function asynchronously, set InvocationType to <code>Event</code>.",
  "private": false,
  "version": "1.0.1",
  "auth": {
    "service": "appmixer:aws:lambda"
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "properties": {
          "region": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "invocationType": {
            "type": "string"
          },
          "clientContext": {
            "type": "string"
          },
          "logType": {
            "type": "string"
          },
          "payload": {
            "type": "string"
          },
          "qualifier": {
            "type": "string"
          }
        },
        "required": [
          "region",
          "name"
        ]
      },
      "inspector": {
        "inputs": {
          "region": {
            "type": "text",
            "label": "Region",
            "index": 0,
            "tooltip": "Your AWS instance region. If not select, us-east-1 will be used as default.",
            "source": {
              "url": "/component/appmixer/aws/lambda/ListRegions?outPort=out"
            }
          },
          "name": {
            "type": "text",
            "label": "FunctionName",
            "index": 1,
            "tooltip": "The name of the Lambda function, version, or alias. You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length."
          },
          "invocationType": {
            "type": "select",
            "label": "InvocationType",
            "index": 2,
            "defaultValue": "RequestResponse",
            "tooltip": "Choose from the following options.<ul><li><code>RequestResponse</code> (default) – Invoke the function synchronously. Keep the connection open until the function returns a response or times out. The API response includes the function response and additional data.</li><li><code>Event</code> – Invoke the function asynchronously. Send events that fail multiple times to the function's dead-letter queue (if one is configured). The API response only includes a status code.</li><li><code>DryRun</code> – Validate parameter values and verify that the user or role has permission to invoke the function.</li></ul>",
            "options": [
              {
                "value": "RequestResponse",
                "content": "RequestResponse"
              },
              {
                "value": "Event",
                "content": "Event"
              },
              {
                "value": "DryRun",
                "content": "DryRun"
              }
            ]
          },
          "clientContext": {
            "type": "text",
            "label": "ClientContext",
            "index": 3,
            "tooltip": "Up to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object."
          },
          "logType": {
            "type": "select",
            "label": "LogType",
            "index": 4,
            "defaultValue": "None",
            "tooltip": "Set to <code>Tail</code> to include the execution log in the response. Applies to synchronously invoked functions only.",
            "options": [
              {
                "value": "None",
                "content": "None"
              },
              {
                "value": "Tail",
                "content": "Tail"
              }
            ]
          },
          "payload": {
            "type": "textarea",
            "label": "Payload",
            "index": 5,
            "tooltip": "The JSON that you want to provide to your Lambda function as input."
          },
          "qualifier": {
            "type": "text",
            "label": "Qualifier",
            "index": 6,
            "tooltip": "Specify a version or alias to invoke a published version of the function.<br/>Length Constraints: Minimum length of 1. Maximum length of 128.<br/>Pattern: <code>(|[a-zA-Z0-9$_-]+)</code>"
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "source": {
        "url": "/component/appmixer/aws/lambda/Invoke?outPort=out",
        "data": {
          "properties": {
            "generateOutputPortOptions": true
          },
          "messages": {
            "in/region": "inputs/in/region",
            "in/invocationType": "inputs/in/invocationType",
            "in/name": "inputs/in/name"
          }
        }
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
