Constructor
new Lambda(stackName, baseName)
Don't call this manually. Use creator function in CloudFormation
Parameters:
Name | Type | Description |
---|---|---|
stackName |
string | |
baseName |
string |
Methods
setCode(code)
Set the source code of this Lambda in the form of array of text strings.
Parameters:
Name | Type | Description |
---|---|---|
code |
array |
setEnvVariables(envVariables)
Set the environment variables of this Lambda in the form of key-value pairs
Parameters:
Name | Type | Description |
---|---|---|
envVariables |
object |
setHandlerPath(handlerPath)
Set the handler function path
Parameters:
Name | Type | Description |
---|---|---|
handlerPath |
string |
setMemorySizeMB(memorySizeMB)
Set the memory limit of this Lambda in MB.
Parameters:
Name | Type | Description |
---|---|---|
memorySizeMB |
float |
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 |
setTimeoutSecs(timeoutSecs)
Set the timeout value of this Lambda in seconds.
Parameters:
Name | Type | Description |
---|---|---|
timeoutSecs |
float |