class aws_cdk.aws_stepfunctions_tasks.RunLambdaTask(lambda_function, *, client_context=None, integration_pattern=None, invocation_type=None, payload=None, qualifier=None)

Bases: object

Invoke a Lambda function as a Task.

OUTPUT: the output of this task is either the return value of Lambda’s Invoke call, or whatever the Lambda Function posted back using SendTaskSuccess/SendTaskFailure in waitForTaskToken mode.

deprecated :deprecated: Use LambdaInvoke

see :see: stability :stability: deprecated

__init__(lambda_function, *, client_context=None, integration_pattern=None, invocation_type=None, payload=None, qualifier=None)
  • lambda_function (IFunction) –

  • client_context (Optional[str]) – Client context to pass to the function. Default: - No context

  • integration_pattern (Optional[ServiceIntegrationPattern]) – The service integration pattern indicates different ways to invoke Lambda function. The valid value for Lambda is either FIRE_AND_FORGET or WAIT_FOR_TASK_TOKEN, it determines whether to pause the workflow until a task token is returned. If this is set to WAIT_FOR_TASK_TOKEN, the JsonPath.taskToken value must be included somewhere in the payload and the Lambda must call SendTaskSuccess/SendTaskFailure using that token. Default: FIRE_AND_FORGET

  • invocation_type (Optional[InvocationType]) – Invocation type of the Lambda function. Default: RequestResponse

  • payload (Optional[TaskInput]) – The JSON that you want to provide to your Lambda function as input. Default: - The state input (JSON path ‘$’)

  • qualifier (Optional[str]) – Version or alias of the function to be invoked. Default: - No qualifier

stability :stability: deprecated

Return type




Called when the task object is used in a workflow.


_task (Task) –

stability :stability: deprecated

Return type