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.
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 Lambda: How it Works in the AWS Lambda Developer Guide.
Namespace: Amazon.Lambda
Assembly: AWSSDK.dll
Version: (assembly version)
public class AmazonLambdaClient : AmazonServiceClient IAmazonLambda, IDisposable
The AmazonLambdaClient type exposes the following members
Name | Description | |
---|---|---|
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> |
|
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> |
|
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> |
|
AmazonLambdaClient(AWSCredentials) | Constructs AmazonLambdaClient with AWS Credentials | |
AmazonLambdaClient(AWSCredentials, RegionEndpoint) | Constructs AmazonLambdaClient with AWS Credentials | |
AmazonLambdaClient(AWSCredentials, AmazonLambdaConfig) | Constructs AmazonLambdaClient with AWS Credentials and an AmazonLambdaClient Configuration object. | |
AmazonLambdaClient(string, string) | Constructs AmazonLambdaClient with AWS Access Key ID and AWS Secret Key | |
AmazonLambdaClient(string, string, RegionEndpoint) | Constructs AmazonLambdaClient with AWS Access Key ID and AWS Secret Key | |
AmazonLambdaClient(string, string, AmazonLambdaConfig) | Constructs AmazonLambdaClient with AWS Access Key ID, AWS Secret Key and an AmazonLambdaClient Configuration object. | |
AmazonLambdaClient(string, string, string) | Constructs AmazonLambdaClient with AWS Access Key ID and AWS Secret Key | |
AmazonLambdaClient(string, string, string, RegionEndpoint) | Constructs AmazonLambdaClient with AWS Access Key ID and AWS Secret Key | |
AmazonLambdaClient(string, string, string, AmazonLambdaConfig) | Constructs AmazonLambdaClient with AWS Access Key ID, AWS Secret Key and an AmazonLambdaClient Configuration object. |
Name | Description | |
---|---|---|
AddPermission(AddPermissionRequest) |
Adds a permission to the resource policy associated with the specified AWS Lambda
function. You use resource policies to grant permissions to event sources that use
push model. In a push model, event sources (such as Amazon S3 and custom
applications) invoke your Lambda function. Each permission you add to the resource
policy allows an event source, permission to invoke the Lambda function.
For information about the push model, see AWS Lambda: How it Works.
If you are using versioning, the permissions you add are specific to the Lambda function
version or alias you specify in the
This operation requires permission for the |
|
AddPermissionAsync(AddPermissionRequest, CancellationToken) | Initiates the asynchronous execution of the AddPermission operation. | |
CreateAlias(CreateAliasRequest) |
Creates an alias that points to the specified Lambda function version. For more information,
see Introduction
to AWS Lambda Aliases.
Alias names are unique for a given function.
This requires permission for the lambda:CreateAlias action. |
|
CreateAliasAsync(CreateAliasRequest, CancellationToken) | Initiates the asynchronous execution of the CreateAlias operation. | |
CreateEventSourceMapping(CreateEventSourceMappingRequest) |
Identifies a stream as an event source for a Lambda function. It can be either an
Amazon Kinesis stream or an Amazon DynamoDB stream. AWS Lambda invokes the specified
function when records are posted to the stream.
This association between a stream source and a Lambda function is called the event source mapping. You provide mapping information (for example, which stream to read from and which Lambda function to invoke) in the request body. Each event source, such as an Amazon Kinesis or a DynamoDB stream, can be associated with multiple AWS Lambda function. A given Lambda function can be associated with multiple AWS event sources. If you are using versioning, you can specify a specific function version or an alias via the function name parameter. For more information about versioning, see AWS Lambda Function Versioning and Aliases.
This operation requires permission for the |
|
CreateEventSourceMappingAsync(CreateEventSourceMappingRequest, CancellationToken) | Initiates the asynchronous execution of the CreateEventSourceMapping operation. | |
CreateFunction(CreateFunctionRequest) |
Creates a new Lambda 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 operation will fail. Note that the function name
is case-sensitive.
If you are using versioning, you can also publish a version of the Lambda function
you are creating using the
This operation requires permission for the |
|
CreateFunctionAsync(CreateFunctionRequest, CancellationToken) | Initiates the asynchronous execution of the CreateFunction operation. | |
DeleteAlias(DeleteAliasRequest) |
Deletes the specified Lambda function alias. For more information, see Introduction
to AWS Lambda Aliases.
This requires permission for the lambda:DeleteAlias action. |
|
DeleteAliasAsync(DeleteAliasRequest, CancellationToken) | Initiates the asynchronous execution of the DeleteAlias operation. | |
DeleteEventSourceMapping(DeleteEventSourceMappingRequest) |
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 |
|
DeleteEventSourceMappingAsync(DeleteEventSourceMappingRequest, CancellationToken) | Initiates the asynchronous execution of the DeleteEventSourceMapping operation. | |
DeleteFunction(string) |
Deletes the specified Lambda function code and configuration.
If you are using the versioning feature and you don't specify a function version in
your When you delete a function the associated resource policy is also deleted. You will need to delete the event source mappings explicitly.
This operation requires permission for the |
|
DeleteFunction(DeleteFunctionRequest) |
Deletes the specified Lambda function code and configuration.
If you are using the versioning feature and you don't specify a function version in
your When you delete a function the associated resource policy is also deleted. You will need to delete the event source mappings explicitly.
This operation requires permission for the |
|
DeleteFunctionAsync(DeleteFunctionRequest, CancellationToken) | Initiates the asynchronous execution of the DeleteFunction operation. | |
Dispose() | Inherited from Amazon.Runtime.AmazonServiceClient. | |
GetAlias(GetAliasRequest) |
Returns the specified alias information such as the alias ARN, description, and function
version it is pointing to. For more information, see Introduction
to AWS Lambda Aliases.
This requires permission for the |
|
GetAliasAsync(GetAliasRequest, CancellationToken) | Initiates the asynchronous execution of the GetAlias operation. | |
GetEventSourceMapping(GetEventSourceMappingRequest) |
Returns configuration information for the specified event source mapping (see CreateEventSourceMapping).
This operation requires permission for the |
|
GetEventSourceMappingAsync(GetEventSourceMappingRequest, CancellationToken) | Initiates the asynchronous execution of the GetEventSourceMapping operation. | |
GetFunction(string) |
Returns the configuration information of the Lambda function and a presigned URL link
to the .zip file you uploaded with CreateFunction 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.
Using the optional
This operation requires permission for the |
|
GetFunction(GetFunctionRequest) |
Returns the configuration information of the Lambda function and a presigned URL link
to the .zip file you uploaded with CreateFunction 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.
Using the optional
This operation requires permission for the |
|
GetFunctionAsync(GetFunctionRequest, CancellationToken) | Initiates the asynchronous execution of the GetFunction operation. | |
GetFunctionConfiguration(string) |
Returns the configuration information of the Lambda function. This the same information
you provided as parameters when uploading the function by using CreateFunction.
If you are using the versioning feature, you can retrieve this information for a specific
function version by using the optional
This operation requires permission for the |
|
GetFunctionConfiguration(GetFunctionConfigurationRequest) |
Returns the configuration information of the Lambda function. This the same information
you provided as parameters when uploading the function by using CreateFunction.
If you are using the versioning feature, you can retrieve this information for a specific
function version by using the optional
This operation requires permission for the |
|
GetFunctionConfigurationAsync(GetFunctionConfigurationRequest, CancellationToken) | Initiates the asynchronous execution of the GetFunctionConfiguration operation. | |
GetPolicy(GetPolicyRequest) |
Returns the resource policy associated with the specified Lambda function.
If you are using the versioning feature, you can get the resource policy associated
with the specific Lambda function version or alias by specifying the version or alias
name using the For information about adding permissions, see AddPermission.
You need permission for the |
|
GetPolicyAsync(GetPolicyRequest, CancellationToken) | Initiates the asynchronous execution of the GetPolicy operation. | |
Invoke(InvokeRequest) |
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
This operation requires permission for the |
|
InvokeAsync(InvokeRequest, CancellationToken) | Initiates the asynchronous execution of the Invoke operation. | |
InvokeAsync(InvokeAsyncRequest) |
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 |
|
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 The InvokeArgs will be set to an empty json document. |
|
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 |
|
InvokeAsyncAsync(InvokeAsyncRequest, CancellationToken) | Initiates the asynchronous execution of the InvokeAsync operation. | |
ListAliases(ListAliasesRequest) |
Returns list of aliases created for a Lambda function. For each alias, the response
includes information such as the alias ARN, description, alias name, and the function
version to which it points. For more information, see Introduction
to AWS Lambda Aliases.
This requires permission for the lambda:ListAliases action. |
|
ListAliasesAsync(ListAliasesRequest, CancellationToken) | Initiates the asynchronous execution of the ListAliases operation. | |
ListEventSourceMappings(ListEventSourceMappingsRequest) |
Returns a list of event source mappings you created using the CreateEventSourceMapping
(see CreateEventSourceMapping).
For each mapping, the API returns configuration information. You can optionally specify filters to retrieve specific event source mappings.
If you are using the versioning feature, you can get list of event source mappings
for a specific Lambda function version or an alias as described in the
This operation requires permission for the |
|
ListEventSourceMappingsAsync(ListEventSourceMappingsRequest, CancellationToken) | Initiates the asynchronous execution of the ListEventSourceMappings operation. | |
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 If you are using versioning feature, the response returns list of $LATEST versions of your functions. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases. |
|
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 If you are using versioning feature, the response returns list of $LATEST versions of your functions. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases. |
|
ListFunctionsAsync(ListFunctionsRequest, CancellationToken) | Initiates the asynchronous execution of the ListFunctions operation. | |
ListVersionsByFunction(ListVersionsByFunctionRequest) | List all versions of a function. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases. | |
ListVersionsByFunctionAsync(ListVersionsByFunctionRequest, CancellationToken) | Initiates the asynchronous execution of the ListVersionsByFunction operation. | |
PublishVersion(PublishVersionRequest) | Publishes a version of your function from the current snapshot of $LATEST. That is, AWS Lambda takes a snapshot of the function code and configuration information from $LATEST and publishes a new version. The code and configuration cannot be modified after publication. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases. | |
PublishVersionAsync(PublishVersionRequest, CancellationToken) | Initiates the asynchronous execution of the PublishVersion operation. | |
RemovePermission(RemovePermissionRequest) |
You can remove individual permissions from an resource policy associated with a Lambda
function by providing a statement ID that you provided when you added the permission.
If you are using versioning, the permissions you remove are specific to the Lambda
function version or alias you specify in the Note that removal of a permission will cause an active event source to lose permission to the function.
You need permission for the |
|
RemovePermissionAsync(RemovePermissionRequest, CancellationToken) | Initiates the asynchronous execution of the RemovePermission operation. | |
UpdateAlias(UpdateAliasRequest) |
Using this API you can update the function version to which the alias points and the
alias description. For more information, see Introduction
to AWS Lambda Aliases.
This requires permission for the lambda:UpdateAlias action. |
|
UpdateAliasAsync(UpdateAliasRequest, CancellationToken) | Initiates the asynchronous execution of the UpdateAlias operation. | |
UpdateEventSourceMapping(UpdateEventSourceMappingRequest) |
You can update an event source mapping. This is useful if you want to change the parameters
of the existing mapping without losing your position in the stream. You can change
which function will receive the stream records, but to change the stream itself, you
must create a new mapping.
If you are using the versioning feature, you can update the event source mapping to
map to a specific Lambda function version or alias as described in the If you disable the event source mapping, AWS Lambda stops polling. If you enable again, it will resume polling from the time it had stopped polling, so you don't lose processing of any records. However, if you delete event source mapping and create it again, it will reset.
This operation requires permission for the |
|
UpdateEventSourceMappingAsync(UpdateEventSourceMappingRequest, CancellationToken) | Initiates the asynchronous execution of the UpdateEventSourceMapping operation. | |
UpdateFunctionCode(UpdateFunctionCodeRequest) |
Updates the code for the specified Lambda function. This operation must only be used
on an existing Lambda function and cannot be used to update the function configuration.
If you are using the versioning feature, note this API will always update the $LATEST version of your Lambda function. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases.
This operation requires permission for the |
|
UpdateFunctionCodeAsync(UpdateFunctionCodeRequest, CancellationToken) | Initiates the asynchronous execution of the UpdateFunctionCode operation. | |
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.
If you are using the versioning feature, note this API will always update the $LATEST version of your Lambda function. For information about the versioning feature, see AWS Lambda Function Versioning and Aliases.
This operation requires permission for the |
|
UpdateFunctionConfigurationAsync(UpdateFunctionConfigurationRequest, CancellationToken) | Initiates the asynchronous execution of the UpdateFunctionConfiguration operation. |
Name | Description | |
---|---|---|
AfterResponseEvent | Inherited from Amazon.Runtime.AmazonServiceClient. | |
BeforeRequestEvent | Inherited from Amazon.Runtime.AmazonServiceClient. | |
ExceptionEvent | Inherited from Amazon.Runtime.AmazonServiceClient. |
.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