AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the InvokeAsync operation.
For asynchronous function invocation, use Invoke.
Invokes a function asynchronously.
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.
Namespace: Amazon.Lambda.Model
Assembly: AWSSDK.Lambda.dll
Version: 3.x.y.z
[Obsolete("For .NET 3.5/4.5, API InvokeAsyncResponse InvokeAsync(InvokeAsyncRequest) is deprecated, use InvokeResponse Invoke(InvokeRequest), or TaskInvokeAsync(InvokeRequest, CancellationToken) instead. For .NET Core, Task InvokeAsyncAsync(InvokeAsyncRequest, CancellationToken) is deprecated, use Task InvokeAsync(InvokeRequest, CancellationToken) instead.")]
public class InvokeAsyncRequest : AmazonLambdaRequest IAmazonWebServiceRequest
The InvokeAsyncRequest type exposes the following members
Name | Description | |
---|---|---|
![]() |
InvokeAsyncRequest() |
Name | Type | Description | |
---|---|---|---|
![]() |
FunctionName | System.String |
Gets and sets the property FunctionName. The name or ARN of the Lambda function. Name formats
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length. |
![]() |
InvokeArgs | System.String |
Gets and sets the property InvokeArgs. When this property is set the InvokeArgsStream property is also set with a MemoryStream containing the contents InvokeArgs JSON that you want to provide to your cloud function as input. |
![]() |
InvokeArgsStream | System.IO.Stream |
Gets and sets the property InvokeArgsStream. The JSON that you want to provide to your Lambda function as input. |
The following example invokes a Lambda function asynchronously
var client = new AmazonLambdaClient(); var response = client.InvokeAsync(new InvokeAsyncRequest { FunctionName = "my-function", }); int status = response.Status;
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5