AWS SDK Version 2 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.

.NET Framework 4.5
Invokes a specific Lambda function.

If you are using the versioning feature, you can invoke the specific function version by providing function version or alias name that is pointing to the function version using the Qualifier parameter in the request. If you don't provide the Qualifier parameter, the $LATEST version of the Lambda function is invoked. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases.

This operation requires permission for the lambda:InvokeFunction action.

Namespace: Amazon.Lambda
Assembly: AWSSDK.dll
Version: (assembly version)


public virtual InvokeResponse Invoke(
         InvokeRequest request


Type: Amazon.Lambda.Model.InvokeRequest

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

Return Value
Type: Amazon.Lambda.Model.InvokeResponse
The response from the Invoke service method, as returned by Lambda.


EC2ThrottledException AWS Lambda was throttled by Amazon EC2 during Lambda function initiatization using the execution role provided for the Lambda function.
EC2UnexpectedException AWS Lambda received an unexpected EC2 client exception while setting up for the Lambda function.
ENILimitReachedException AWS Lambda was not able to create an Elastic Network Interface (ENI) in the VPC, specified as part of Lambda function configuration, because the limit for network interfaces has been reached.
InvalidParameterValueException One of the parameters in the request is invalid. For example, if you provided an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration API, that AWS Lambda is unable to assume you will get this exception.
InvalidRequestContentException The request body could not be parsed as JSON.
InvalidSecurityGroupIDException The Security Group ID provided in the Lambda function VPC configuration is invalid.
InvalidSubnetIDException The Subnet ID provided in the Lambda function VPC configuration is invalid.
RequestTooLargeException The request payload exceeded the Invoke request body JSON input limit. For more information, see Limits.
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.
SubnetIPAddressLimitReachedException AWS Lambda was not able to set up VPC access for the Lambda function because one or more configured subnets has no available IP addresses.
UnsupportedMediaTypeException The content type of the Invoke request body is not JSON.

Version Information

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