One Observability Workshop v3.0.0
One Observability Workshop / constructs/lambda / WokshopLambdaFunction
Abstract Class: WokshopLambdaFunction¶
Defined in: constructs/lambda.ts:256
Abstract base class for workshop Lambda functions.
This class provides a common foundation for creating Lambda functions with consistent configuration, observability features, and security best practices. Concrete implementations must provide specific permissions, environment variables, and bundling configurations.
Extends¶
Construct
Extended by¶
DynamoDBWriteTestConstructPetfoodCleanupProcessorFunctionPetfoodImageGeneratorFunctionPetfoodStockProcessorFunctionRdsSeederFunctionStatusUpdatedServiceTrafficGeneratorFunctionUserCreatorFunction
Constructors¶
Constructor¶
new WokshopLambdaFunction(
scope,id,properties):WokshopLambdaFunction
Defined in: constructs/lambda.ts:268
Creates a new workshop Lambda function.
Parameters¶
scope¶
Construct
The parent construct
id¶
string
The construct identifier
properties¶
WorkshopLambdaFunctionProperties
Configuration properties for the function
Returns¶
WokshopLambdaFunction
Throws¶
Error if the runtime is not supported
Overrides¶
Construct.constructor
Properties¶
function¶
function:
Function
Defined in: constructs/lambda.ts:258
The Lambda function instance
Methods¶
scheduleFunction()¶
scheduleFunction(
scheduleExpression):void
Defined in: constructs/lambda.ts:376
Use event bridge to schedule the function execution using the specified schedule expression
Parameters¶
scheduleExpression¶
string
Returns¶
void
addFunctionPermissions()¶
abstractaddFunctionPermissions(properties):void
Defined in: constructs/lambda.ts:390
Adds IAM permissions required by the Lambda function. Must be implemented by concrete subclasses.
Parameters¶
properties¶
WorkshopLambdaFunctionProperties
Function configuration properties
Returns¶
void
createOutputs()¶
abstractcreateOutputs(properties):void
Defined in: constructs/lambda.ts:398
Creates CloudFormation outputs for the Lambda function. Must be implemented by concrete subclasses.
Parameters¶
properties¶
WorkshopLambdaFunctionProperties
Function configuration properties
Returns¶
void
getEnvironmentVariables()¶
abstractgetEnvironmentVariables(properties): {[key:string]:string; } |undefined
Defined in: constructs/lambda.ts:407
Returns environment variables for the Lambda function. Must be implemented by concrete subclasses.
Parameters¶
properties¶
WorkshopLambdaFunctionProperties
Function configuration properties
Returns¶
{[key: string]: string; } | undefined
Map of environment variable names to values
getLayers()¶
abstractgetLayers(properties):ILayerVersion[]
Defined in: constructs/lambda.ts:418
Returns Lambda layers to be attached to the function. Must be implemented by concrete subclasses.
Parameters¶
properties¶
WorkshopLambdaFunctionProperties
Function configuration properties
Returns¶
ILayerVersion[]
Array of Lambda layer versions
getBundling()¶
abstractgetBundling(properties):BundlingOptions
Defined in: constructs/lambda.ts:427
Returns bundling options for the Lambda function code. Must be implemented by concrete subclasses.
Parameters¶
properties¶
WorkshopLambdaFunctionProperties
Function configuration properties
Returns¶
BundlingOptions
Bundling configuration options