AWS SDK Version 3 for .NET
API Reference

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.

This API is deprecated. We recommend you use Invoke API (see Invoke).

Submits an invocation request to AWS Lambda. Upon receiving the request, Lambda executes the specified function asynchronously. To see the logs generated by the Lambda function execution, see the CloudWatch Logs console.

This operation requires permission for the lambda:InvokeFunction action.

Note:

This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginInvoke and EndInvoke.

Note:

For PCL and Unity this operation is only available in asynchronous form. Please refer to InvokeAsyncAsync.

Namespace: Amazon.Lambda
Assembly: AWSSDK.Lambda.dll
Version: 3.x.y.z

Syntax

C#
public abstract InvokeAsyncResponse InvokeAsync(
         InvokeAsyncRequest request
)
Parameters
request
Type: Amazon.Lambda.Model.InvokeAsyncRequest

Container for the necessary parameters to execute the InvokeAsync service method.

Return Value
The response from the InvokeAsync service method, as returned by Lambda.

Exceptions

ExceptionCondition
InvalidRequestContentException The request body could not be parsed as JSON.
InvalidRuntimeException The runtime or runtime version specified is not supported.
ResourceNotFoundException The resource (for example, a Lambda function or access policy statement) specified in the request does not exist.
ServiceException The AWS Lambda service encountered an internal error.

Examples

This operation invokes a Lambda function asynchronously

To invoke a Lambda function asynchronously


var response = client.InvokeAsync(new InvokeAsyncRequest 
{
    FunctionName = "myFunction",
});

integer status = response.Status;

            

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

Unity:
Supported Versions: 4.6 and above
Supported Platforms: Android, iOS, Standalone

See Also