invoke_async - Boto3 1.38.13 documentation (original) (raw)

Back to top

Toggle table of contents sidebar

Lambda / Client / invoke_async

Lambda.Client.invoke_async(**kwargs)

Warning

For asynchronous function invocation, use Invoke.

Invokes a function asynchronously.

Note

If you do use the InvokeAsync action, note that it doesn’t support the use of X-Ray active tracing. Trace ID is not propagated to the function, even if X-Ray active tracing is turned on.

Danger

This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.

See also: AWS API Documentation

Request Syntax

response = client.invoke_async( FunctionName='string', InvokeArgs=b'bytes'|file )

Parameters:

Name formats

Return type:

dict

Returns:

Response Syntax

Response Structure

Exceptions

Examples

The following example invokes a Lambda function asynchronously

response = client.invoke_async( FunctionName='my-function', InvokeArgs='{}', )

print(response)

Expected Output:

{ 'Status': 202, 'ResponseMetadata': { '...': '...', }, }