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

# code_execution_lambda

> Step function: code_execution_lambda

Invokes an AWS Lambda function, returning its response when invoked synchronously.

## Input

<Tabs>
  <Tab title="v1">
    <table>
      <colgroup>
        <col width="210" />

        <col width="400" />

        <col width="90" />

        <col width="90" />
      </colgroup>

      <thead>
        <tr>
          <th>Field</th>
          <th>Description</th>
          <th>Type</th>
          <th>Required</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>[`args`](#args)</td>
          <td>Key/value pairs combined into the JSON payload sent to the Lambda function</td>
          <td>object\[]</td>
          <td>No</td>
        </tr>

        <tr>
          <td>`dataKey`</td>
          <td>Path to the field in the Lambda response to extract as data.</td>
          <td>string</td>
          <td>No</td>
        </tr>

        <tr>
          <td>`endpoint`</td>
          <td>Custom Lambda service endpoint URL to call instead of the default.</td>
          <td>string</td>
          <td>No</td>
        </tr>

        <tr>
          <td>`invocationType`</td>
          <td>How the Lambda is invoked. `RequestResponse` waits synchronously for the Lambda response, `Event` fires asynchronously and returns no response body, and `DryRun` validates parameters and permissions without invoking the function.<br />Allowed: `RequestResponse`, `Event`, `DryRun`</td>
          <td>enum</td>
          <td>No</td>
        </tr>

        <tr>
          <td>`lambdaName`</td>
          <td>Name or ARN of the Lambda function to invoke.</td>
          <td>string</td>
          <td>Yes</td>
        </tr>

        <tr>
          <td>`qualifier`</td>
          <td>Function version or alias to invoke.</td>
          <td>string</td>
          <td>No</td>
        </tr>

        <tr>
          <td>`region`</td>
          <td>AWS region the Lambda function runs in.</td>
          <td>string</td>
          <td>No</td>
        </tr>
      </tbody>
    </table>

    <AccordionGroup>
      <Accordion title="args">
        Key/value pairs combined into the JSON payload sent to the Lambda function

        <table>
          <colgroup>
            <col width="210" />

            <col width="400" />

            <col width="90" />

            <col width="90" />
          </colgroup>

          <thead>
            <tr>
              <th>Field</th>
              <th>Description</th>
              <th>Type</th>
              <th>Required</th>
            </tr>
          </thead>

          <tbody>
            <tr>
              <td>`condition`</td>
              <td>A JEXL expression that includes the field only when it evaluates true.</td>
              <td>string</td>
              <td>No</td>
            </tr>

            <tr>
              <td>`name`</td>
              <td>Payload field name.</td>
              <td>string</td>
              <td>Yes</td>
            </tr>

            <tr>
              <td>`value`</td>
              <td>Payload field value. Supports expressions.</td>
              <td>any</td>
              <td>Yes</td>
            </tr>
          </tbody>
        </table>
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>

## Output

<Tabs>
  <Tab title="v1">
    <table>
      <colgroup>
        <col width="210" />

        <col width="400" />

        <col width="90" />

        <col width="90" />
      </colgroup>

      <thead>
        <tr>
          <th>Field</th>
          <th>Description</th>
          <th>Type</th>
          <th>Required</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>`data`</td>
          <td>The parsed Lambda response payload, or the value at `dataKey` when `dataKey` is set.</td>
          <td>any</td>
          <td>No</td>
        </tr>

        <tr>
          <td>`executedVersion`</td>
          <td>Version of the Lambda function that was invoked.</td>
          <td>string</td>
          <td>No</td>
        </tr>

        <tr>
          <td>`message`</td>
          <td>Status or error message from the response.</td>
          <td>string</td>
          <td>No</td>
        </tr>

        <tr>
          <td>`raw`</td>
          <td>The full Lambda invocation result, including the parsed `payload`, `statusCode`, and `executedVersion`.</td>
          <td>any</td>
          <td>No</td>
        </tr>

        <tr>
          <td>`statusCode`</td>
          <td>HTTP status code of the Lambda invocation.</td>
          <td>number</td>
          <td>Yes</td>
        </tr>
      </tbody>
    </table>
  </Tab>
</Tabs>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.