Fugue.AWS.Lambda.Function

This is the preferred interface for making Lambda Functions with Fugue. If you want to manage a Lambda Function with Fugue, the new function is the right place to start.

Table of Contents

Module Members

external

(Function)

Create a reference to an externally managed Function.

Example usage:

topic: Lambda.Function.external("arn:aws:lambda:us-east-1:123456789012:example-function")

Type Signature

 fun (String) -> Function
Argument: arn

The ARN of an existing function.

Type: String

Returns:

A reference to the specified function.

Type: Function

new

(Function)

new Lambda Function (Constructor)

Call this constructor to create a new Fugue.Core.AWS.Lambda.Function value.

Type Signature

 fun { functionName: String,
       runtime: Runtime,
       handler: String,
       description: Optional<String>,
       timeout: Optional<Int>,
       memorySize: Optional<Int>,
       publish: Optional<Bool>,
       vpcConfig: Optional<VpcConfig>,
       region: Optional<Region>,
       code: Code,
       role: Role,
       permissions: Optional<List<Permission>> } -> Function
Argument: 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.

Type: String

Argument: runtime

The runtime environment for the Lambda function you are uploading. Mutable.

Type: Runtime

Argument: 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. Mutable.

Type: String

Argument: description

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

Type: Optional<String>

Argument: 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. Mutable.

Type: Optional<Int>

Argument: 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. Mutable.

Type: Optional<Int>

Argument: publish

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

Type: Optional<Bool>

Argument: vpcConfig

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

Type: Optional<VpcConfig>

Argument: region

The region in which to run the Lambda function.

Type: Optional<Region>

Argument: code

The code for the Lambda function. Mutable.

Type: Code

Argument: role

An IAM.Role that Lambda assumes when it executes your function to access any other Amazon Web Services (AWS) resources. Mutable.

Type: Role

Argument: permissions

A list of permissions for the Lambda function. Mutable.

Type: Optional<List<Permission>>

Returns:

A Fugue.Core.AWS.Lambda.Function value.

Type: Function