actionLambda

invoke_function

Invokes Lambda

Activity as code

Below are the details and signature of the activity Python module.

Typeaction
Modulechaosaws.awslambda.actions
Nameinvoke_function
Returnmapping

More information about request arguments are available in the documentation https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/lambda.html#Lambda.Client.invoke

Usage

JSON

{
  "name": "invoke-function",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosaws.awslambda.actions",
    "func": "invoke_function",
    "arguments": {
      "function_name": ""
    }
  }
}

YAML

name: invoke-function
provider:
  arguments:
    function_name: ""
  func: invoke_function
  module: chaosaws.awslambda.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
function_namestringYesFunction NameName of the function
function_argumentsmappingnullNoArgumentsFunction arguments as an object
invocation_typestring“RequestResponse”NoInvocation TypeType of invocation of the function: RequestResponse
client_contextmappingnullNoClient ContextPayload to pass as client context
qualifierstringnullNoQualifier

Signature

def invoke_function(
        function_name: str,
        function_arguments: Dict[str, Any] = None,
        invocation_type: str = 'RequestResponse',
        client_context: Dict[str, Any] = None,
        qualifier: str = None,
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass