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
 
Implementation for accessing Lambda AWS Lambda

Overview

This is the AWS Lambda API Reference. The AWS Lambda Developer Guide provides additional information. For the service overview, go to What is AWS Lambda, and for information about how the service works, go to AWS LambdaL How it Works in the AWS Lambda Developer Guide.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonServiceClient
    Amazon.Lambda.AmazonLambdaClient

Namespace: Amazon.Lambda
Assembly: AWSSDK.dll
Version: 0.0.3.0

Syntax

C#
public class AmazonLambdaClient : AmazonServiceClient
         IAmazonLambda, IDisposable

The AmazonLambdaClient type exposes the following members

Constructors

  Name Description
Public Method AmazonLambdaClient() Constructs AmazonLambdaClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
             
Public Method AmazonLambdaClient(RegionEndpoint) Constructs AmazonLambdaClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
             
Public Method AmazonLambdaClient(AmazonLambdaConfig) Constructs AmazonLambdaClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
             
Public Method AmazonLambdaClient(AWSCredentials) Constructs AmazonLambdaClient with AWS Credentials
Public Method AmazonLambdaClient(AWSCredentials, RegionEndpoint) Constructs AmazonLambdaClient with AWS Credentials
Public Method AmazonLambdaClient(AWSCredentials, AmazonLambdaConfig) Constructs AmazonLambdaClient with AWS Credentials and an AmazonLambdaClient Configuration object.
Public Method AmazonLambdaClient(string, string) Constructs AmazonLambdaClient with AWS Access Key ID and AWS Secret Key
Public Method AmazonLambdaClient(string, string, RegionEndpoint) Constructs AmazonLambdaClient with AWS Access Key ID and AWS Secret Key
Public Method AmazonLambdaClient(string, string, AmazonLambdaConfig) Constructs AmazonLambdaClient with AWS Access Key ID, AWS Secret Key and an AmazonLambdaClient Configuration object.
Public Method AmazonLambdaClient(string, string, string) Constructs AmazonLambdaClient with AWS Access Key ID and AWS Secret Key
Public Method AmazonLambdaClient(string, string, string, RegionEndpoint) Constructs AmazonLambdaClient with AWS Access Key ID and AWS Secret Key
Public Method AmazonLambdaClient(string, string, string, AmazonLambdaConfig) Constructs AmazonLambdaClient with AWS Access Key ID, AWS Secret Key and an AmazonLambdaClient Configuration object.

Methods

  Name Description
Public Method AddEventSource(AddEventSourceRequest) Identifies an Amazon Kinesis stream as the event source for an AWS Lambda function. AWS Lambda invokes the specified function when records are posted to the stream.

This is the pull model, where AWS Lambda invokes the function. For more information, go to AWS LambdaL How it Works in the AWS Lambda Developer Guide.

This association between an Amazon Kinesis stream and an AWS Lambda function is called the event source mapping. You provide the configuration information (for example, which stream to read from and which AWS Lambda function to invoke) for the event source mapping in the request body.

This operation requires permission for the

iam:PassRole
action for the IAM role. It also requires permission for the
lambda:AddEventSource
action.

Public Method AddEventSourceAsync(AddEventSourceRequest, CancellationToken) Initiates the asynchronous execution of the AddEventSource operation.
Public Method DeleteFunction(string) Deletes the specified Lambda function code and configuration.

This operation requires permission for the

lambda:DeleteFunction
action.

Public Method DeleteFunction(DeleteFunctionRequest) Deletes the specified Lambda function code and configuration.

This operation requires permission for the

lambda:DeleteFunction
action.

Public Method DeleteFunctionAsync(DeleteFunctionRequest, CancellationToken) Initiates the asynchronous execution of the DeleteFunction operation.
Public Method Dispose()
Public Method GetEventSource(string) Returns configuration information for the specified event source mapping (see AddEventSource).

This operation requires permission for the

lambda:GetEventSource
action.

Public Method GetEventSource(GetEventSourceRequest) Returns configuration information for the specified event source mapping (see AddEventSource).

This operation requires permission for the

lambda:GetEventSource
action.

Public Method GetEventSourceAsync(GetEventSourceRequest, CancellationToken) Initiates the asynchronous execution of the GetEventSource operation.
Public Method GetFunction(string) Returns the configuration information of the Lambda function and a presigned URL link to the .zip file you uploaded with UploadFunction so you can download the .zip file. Note that the URL is valid for up to 10 minutes. The configuration information is the same information you provided as parameters when uploading the function.

This operation requires permission for the

lambda:GetFunction
action.

Public Method GetFunction(GetFunctionRequest) Returns the configuration information of the Lambda function and a presigned URL link to the .zip file you uploaded with UploadFunction so you can download the .zip file. Note that the URL is valid for up to 10 minutes. The configuration information is the same information you provided as parameters when uploading the function.

This operation requires permission for the

lambda:GetFunction
action.

Public Method GetFunctionAsync(GetFunctionRequest, CancellationToken) Initiates the asynchronous execution of the GetFunction operation.
Public Method GetFunctionConfiguration(string) Returns the configuration information of the Lambda function. This the same information you provided as parameters when uploading the function by using UploadFunction.

This operation requires permission for the

lambda:GetFunctionConfiguration
operation.

Public Method GetFunctionConfiguration(GetFunctionConfigurationRequest) Returns the configuration information of the Lambda function. This the same information you provided as parameters when uploading the function by using UploadFunction.

This operation requires permission for the

lambda:GetFunctionConfiguration
operation.

Public Method GetFunctionConfigurationAsync(GetFunctionConfigurationRequest, CancellationToken) Initiates the asynchronous execution of the GetFunctionConfiguration operation.
Public Method InvokeAsync(InvokeAsyncRequest) 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:InvokeAsync
action.

Public Method InvokeAsync(string) Submits an invocation request to Lambda. Upon receiving the request, Lambda executes the specified cloud function asynchronously. To see the logs generated by the cloud function execution, see the CloudWatch logs console.

This operation requires permission for the

lambda:InvokeAsync
action.

The InvokeArgs will be set to an empty json document.

Public Method InvokeAsync(string, string) Submits an invocation request to Lambda. Upon receiving the request, Lambda executes the specified cloud function asynchronously. To see the logs generated by the cloud function execution, see the CloudWatch logs console.

This operation requires permission for the

lambda:InvokeAsync
action.

Public Method InvokeAsyncAsync(InvokeAsyncRequest, CancellationToken) Initiates the asynchronous execution of the InvokeAsync operation.
Public Method ListEventSources(ListEventSourcesRequest) Returns a list of event source mappings. For each mapping, the API returns configuration information (see AddEventSource). You can optionally specify filters to retrieve specific event source mappings.

This operation requires permission for the

lambda:ListEventSources
action.

Public Method ListEventSourcesAsync(ListEventSourcesRequest, CancellationToken) Initiates the asynchronous execution of the ListEventSources operation.
Public Method ListFunctions() Returns a list of your Lambda functions. For each function, the response includes the function configuration information. You must use GetFunction to retrieve the code for your function.

This operation requires permission for the

lambda:ListFunctions
action.

Public Method ListFunctions(ListFunctionsRequest) Returns a list of your Lambda functions. For each function, the response includes the function configuration information. You must use GetFunction to retrieve the code for your function.

This operation requires permission for the

lambda:ListFunctions
action.

Public Method ListFunctionsAsync(ListFunctionsRequest, CancellationToken) Initiates the asynchronous execution of the ListFunctions operation.
Public Method RemoveEventSource(string) Removes an event source mapping. This means AWS Lambda will no longer invoke the function for events in the associated source.

This operation requires permission for the

lambda:RemoveEventSource
action.

Public Method RemoveEventSource(RemoveEventSourceRequest) Removes an event source mapping. This means AWS Lambda will no longer invoke the function for events in the associated source.

This operation requires permission for the

lambda:RemoveEventSource
action.

Public Method RemoveEventSourceAsync(RemoveEventSourceRequest, CancellationToken) Initiates the asynchronous execution of the RemoveEventSource operation.
Public Method UpdateFunctionConfiguration(UpdateFunctionConfigurationRequest) Updates the configuration parameters for the specified Lambda function by using the values provided in the request. You provide only the parameters you want to change. This operation must only be used on an existing Lambda function and cannot be used to update the function's code.

This operation requires permission for the

lambda:UpdateFunctionConfiguration
action.

Public Method UpdateFunctionConfigurationAsync(UpdateFunctionConfigurationRequest, CancellationToken) Initiates the asynchronous execution of the UpdateFunctionConfiguration operation.
Public Method UploadFunction(UploadFunctionRequest) Creates a new Lambda function or updates an existing function. The function metadata is created from the request parameters, and the code for the function is provided by a .zip file in the request body. If the function name already exists, the existing Lambda function is updated with the new code and metadata.

This operation requires permission for the

lambda:UploadFunction
action.

Public Method UploadFunctionAsync(UploadFunctionRequest, CancellationToken) Initiates the asynchronous execution of the UploadFunction operation.

Events

  Name Description
Event AfterResponseEvent Occurs after a response is received from the service.
Event BeforeRequestEvent Occurs before a request is issued against the service.
Event ExceptionEvent Occurs after an exception is encountered.

Version Information

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

.NET for Windows Store apps:
Supported in: Windows 8.1, Windows 8

.NET for Windows Phone:
Supported in: Windows Phone 8.1, Windows Phone 8