You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::LambdaPreview::Types::UploadFunctionRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/types.rb

Overview

Note:

When making an API call, you may pass UploadFunctionRequest data as a hash:

{
  function_name: "FunctionName", # required
  function_zip: "data", # required
  runtime: "nodejs", # required, accepts nodejs
  role: "RoleArn", # required
  handler: "Handler", # required
  mode: "event", # required, accepts event
  description: "Description",
  timeout: 1,
  memory_size: 1,
}

Instance Attribute Summary collapse

Instance Attribute Details

#descriptionString

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

Returns:

  • (String)


615
616
617
618
619
620
621
622
623
624
625
626
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/types.rb', line 615

class UploadFunctionRequest < Struct.new(
  :function_name,
  :function_zip,
  :runtime,
  :role,
  :handler,
  :mode,
  :description,
  :timeout,
  :memory_size)
  include Aws::Structure
end

#function_nameString

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 InvokeAsync.

Returns:

  • (String)


615
616
617
618
619
620
621
622
623
624
625
626
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/types.rb', line 615

class UploadFunctionRequest < Struct.new(
  :function_name,
  :function_zip,
  :runtime,
  :role,
  :handler,
  :mode,
  :description,
  :timeout,
  :memory_size)
  include Aws::Structure
end

#function_zipIO

A .zip file containing your packaged source code. For more information about creating a .zip file, go to AWS LambdaL How it Works in the AWS Lambda Developer Guide.

Returns:

  • (IO)


615
616
617
618
619
620
621
622
623
624
625
626
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/types.rb', line 615

class UploadFunctionRequest < Struct.new(
  :function_name,
  :function_zip,
  :runtime,
  :role,
  :handler,
  :mode,
  :description,
  :timeout,
  :memory_size)
  include Aws::Structure
end

#handlerString

The function that Lambda calls to begin execution. For Node.js, it is the module-name.export value in your function.

Returns:

  • (String)


615
616
617
618
619
620
621
622
623
624
625
626
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/types.rb', line 615

class UploadFunctionRequest < Struct.new(
  :function_name,
  :function_zip,
  :runtime,
  :role,
  :handler,
  :mode,
  :description,
  :timeout,
  :memory_size)
  include Aws::Structure
end

#memory_sizeInteger

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

Returns:

  • (Integer)


615
616
617
618
619
620
621
622
623
624
625
626
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/types.rb', line 615

class UploadFunctionRequest < Struct.new(
  :function_name,
  :function_zip,
  :runtime,
  :role,
  :handler,
  :mode,
  :description,
  :timeout,
  :memory_size)
  include Aws::Structure
end

#modeString

How the Lambda function will be invoked. Lambda supports only the "event" mode.

Returns:

  • (String)


615
616
617
618
619
620
621
622
623
624
625
626
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/types.rb', line 615

class UploadFunctionRequest < Struct.new(
  :function_name,
  :function_zip,
  :runtime,
  :role,
  :handler,
  :mode,
  :description,
  :timeout,
  :memory_size)
  include Aws::Structure
end

#roleString

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.

Returns:

  • (String)


615
616
617
618
619
620
621
622
623
624
625
626
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/types.rb', line 615

class UploadFunctionRequest < Struct.new(
  :function_name,
  :function_zip,
  :runtime,
  :role,
  :handler,
  :mode,
  :description,
  :timeout,
  :memory_size)
  include Aws::Structure
end

#runtimeString

The runtime environment for the Lambda function you are uploading. Currently, Lambda supports only "nodejs" as the runtime.

Returns:

  • (String)


615
616
617
618
619
620
621
622
623
624
625
626
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/types.rb', line 615

class UploadFunctionRequest < Struct.new(
  :function_name,
  :function_zip,
  :runtime,
  :role,
  :handler,
  :mode,
  :description,
  :timeout,
  :memory_size)
  include Aws::Structure
end

#timeoutInteger

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.

Returns:

  • (Integer)


615
616
617
618
619
620
621
622
623
624
625
626
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/types.rb', line 615

class UploadFunctionRequest < Struct.new(
  :function_name,
  :function_zip,
  :runtime,
  :role,
  :handler,
  :mode,
  :description,
  :timeout,
  :memory_size)
  include Aws::Structure
end