# AWS: Invoke a Lambda Function

Invokes an AWS Lambda function with a custom JSON payload and returns the function's response status code, body, and timing details.


> **Availability:** See the [Incident Workflow Actions Overview table](/workflow-actions) for the plans this workflow is available on.

## Description

Invoke an AWS Lambda function with a custom payload.

## Instructions

1. If you have not done so, follow the instructions to [Create an Incident Workflow](/ai-automation/automation/incident-workflows#create-an-incident-workflow).
2. When the instructions prompt you to [add actions](/ai-automation/automation/incident-workflows#add-actions), select **this action**.
3. Enter the following **Inputs** and click **Save**.
4. Continue following instructions to **Publish** the Workflow.
5. When the action runs, you will see the **Outputs** listed below.

## Inputs

> **Field References:** Fields with the **\{+\}** icon accept [Field References](/ai-automation/automation/incident-workflows#field-references), which can be useful for referencing incident data or outputs created in prior workflow steps. To add Field References, click **\{+\}**, or enter `{{`, and select relevant fields. Refer to the [Field References](/ai-automation/automation/incident-workflows#field-references) article for more information.

<br />

| Name            | Description                                                                                                                                             |
| :-------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Integration     | Select a [Workflow Integration](/ai-automation/automation/incident-workflows/workflow-integrations)  or click **New AWS Connection** to establish a new one. |
| Function name   | Enter the name of the Lambda function to invoke.                                                                                                        |
| Payload         | Specify the payload in JSON to send to the Lambda function. Ex: `{“key”: ”value”, ...}`                                                                 |
| Invocation type | Select an invocation type, **Event**, **RequestResponse** or **DryRun**. If left blank, defaults to **RequestResponse** (synchronous).                  |
| Region          | The region in which the function is defined. If left blank, uses the default region configured for the integration.                                     |

## Outputs

| Name                            | Description                                                                                          |
| :------------------------------ | :--------------------------------------------------------------------------------------------------- |
| Response Status Code            | The status code of the response.                                                                     |
| Successful Status Code Response | Boolean value that signifies if the call made within the action was successful or not (e.g., `2XX`). |
| Response Time Milliseconds      | The time in milliseconds taken for the request to be sent and the response to be received.           |
| Result                          | Value that shows if the action was successful or not. Either "Success" or "Failed."                  |
| Result Summary                  | Brief description of what the action did or if it failed.                                            |
| Error                           | Brief description that is populated if the action failed.                                            |
| Response Body                   | The body attached to the response.                                                                   |
| JSON Response Body              | The response body parsed into a JSON object, if a JSON response body is returned.                    |
