Fugue.AWS.Lambda.Code

Code values represent the function source that is executed by Lambda. Code may be uploaded as a zip file directly or be uploaded to an S3 bucket.

Module Members

fromS3

(Function)

Specify an S3 object containing the function’s source.

Example usage:

code: Lambda.Code.fromS3 {
  key: "myLambda.zip",
  bucket: myBucket,
}

Type Signature

 fun { key: String,
       bucket: Bucket,
       objectVersion: Optional<String> } -> Code
Argument: key

The S3 key identifying the source object.

Type: String

Argument: bucket

The S3 bucket containing the source object.

Type: Bucket

Argument: objectVersion

The S3 object version to use. Uses the latest version by default.

Type: Optional<String>

Returns:

A new Fugue.Core.AWS.Lambda.Code value.

Type: Code

fromZipBytes

(Function)

Specify the zip file bytes containing the function’s source.

Example usage:

code: Lambda.Code.fromZipBytes {
  bytes: Zip.zip {
    filePaths: ["js/"]
  },
}

Type Signature

 fun { bytes: Bytes} -> Code
Argument: bytes

The bytes of a zip file. These could be read from disk using readFile or generated using zip. Must be a valid zip file.

Type: Bytes

Returns:

A new Fugue.Core.AWS.Lambda.Code value.

Type: Code

fromZipFile

(Function)

Specify a zip file containing the function’s source.

code: Lambda.Code.fromZipFile {
  path: "myLambda.zip",
}

Type Signature

 fun { path: String} -> Code
Argument: path

The path to the zip file.

Type: String

Returns:

A new Fugue.Core.AWS.Lambda.Code value.

Type: Code