Class: Lambda

Lambda(stackName, baseName)

This class represents a Lambda component.

Constructor

new Lambda(stackName, baseName)

Don't call this manually. Use creator function in CloudFormation
Parameters:
Name Type Description
stackName string
baseName string
Source:

Methods

setCode(code)

Set the source code of this Lambda in the form of array of text strings.
Parameters:
Name Type Description
code array
Source:

setEnvVariables(envVariables)

Set the environment variables of this Lambda in the form of key-value pairs
Parameters:
Name Type Description
envVariables object
Source:

setHandlerPath(handlerPath)

Set the handler function path
Parameters:
Name Type Description
handlerPath string
Source:

setMemorySizeMB(memorySizeMB)

Set the memory limit of this Lambda in MB.
Parameters:
Name Type Description
memorySizeMB float
Source:

setSourcePackageInS3Bucket(bucketName, sourcePackageName)

Set teh source code zip in S3. You don't need to call this manually if "lambdaSourceFiles" is declared in package.json.
Parameters:
Name Type Description
bucketName string
sourcePackageName string
Source:

setTimeoutSecs(timeoutSecs)

Set the timeout value of this Lambda in seconds.
Parameters:
Name Type Description
timeoutSecs float
Source: