sym.sdk.integrations.aws_lambda

Methods for invoking AWS Lambda functions.

Functions

invoke(arn[, payload])

Synchronously invokes an AWS Lambda function.

invoke_async(arn[, payload])

Asynchronously invokes an AWS Lambda function.

sym.sdk.integrations.aws_lambda.invoke(arn: str, payload: dict = {})Union[dict, str]

Synchronously invokes an AWS Lambda function. If the results can be parsed as a JSON object, a dict is returned. Otherwise, the result is returned as a string.

Parameters
  • arn – The ARN of the Lambda function to invoke.

  • payload – A dict of JSON-serializable data to pass to the function.

sym.sdk.integrations.aws_lambda.invoke_async(arn: str, payload: dict = {})bool

Asynchronously invokes an AWS Lambda function. Note that this method simply returns a boolean indicating success enqueuing the invocation.

Parameters
  • arn – The ARN of the Lambda function to invoke.

  • payload – A dict of JSON-serializable data to pass to the function.