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 3.5
 
Container for the parameters to the CreateFunction operation. 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 Publish parameter. For more information about versioning, see AWS Lambda Function Versioning and Aliases.

This operation requires permission for the lambda:CreateFunction action.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.Lambda.AmazonLambdaRequest
      Amazon.Lambda.Model.CreateFunctionRequest

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

Syntax

C#
public class CreateFunctionRequest : AmazonLambdaRequest
         IRequestEvents

The CreateFunctionRequest type exposes the following members

Constructors

NameDescription
Public Method CreateFunctionRequest()

Properties

NameTypeDescription
Public Property Code Amazon.Lambda.Model.FunctionCode Gets and sets the property Code.

The code for the Lambda function.

Public Property Description System.String Gets and sets the property Description.

A short, user-defined function description. Lambda does not use this value. Assign a meaningful description as you see fit.

Public Property FunctionName System.String Gets and sets the property FunctionName.

The name you want to assign to the function you are uploading. The function names appear in the console and are returned in the ListFunctions API. Function names are used to specify functions to other AWS Lambda APIs, such as Invoke.

Public Property Handler System.String Gets and sets the property Handler.

The function within your code that Lambda calls to begin execution. For Node.js, it is the module-name.export value in your function. For Java, it can be package.class-name::handler or package.class-name. For more information, see Lambda Function Handler (Java).

Public Property MemorySize System.Int32 Gets and sets the property MemorySize.

The amount of memory, in MB, your Lambda function is given. Lambda uses this memory size to infer the amount of CPU and memory allocated to your function. Your function use-case determines your CPU and memory requirements. For example, a database operation might need less memory compared to an image processing function. The default value is 128 MB. The value must be a multiple of 64 MB.

Public Property Publish System.Boolean Gets and sets the property Publish.

This boolean parameter can be used to request AWS Lambda to create the Lambda function and publish a version as an atomic operation.

Public Property Role System.String Gets and sets the property Role.

The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it executes your function to access any other Amazon Web Services (AWS) resources. For more information, see AWS Lambda: How it Works.

Public Property Runtime Amazon.Lambda.Runtime Gets and sets the property Runtime.

The runtime environment for the Lambda function you are uploading.

Public Property StreamTransferProgress System.EventHandler<Amazon.Runtime.StreamTransferProgressArgs> Attach a callback that will be called as data is being sent to the AWS Service.
Public Property Timeout System.Int32 Gets and sets the property Timeout.

The function execution time at which Lambda should terminate the function. Because the execution time has cost implications, we recommend you set this value based on your expected execution time. The default is 3 seconds.

Public Property VpcConfig Amazon.Lambda.Model.VpcConfig Gets and sets the property VpcConfig.

If your Lambda function accesses resources in a VPC, you provide this parameter identifying the list of security group IDs and subnet IDs. These must belong to the same VPC. You must provide at least one security group and one subnet ID.

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