Skip to content

One Observability Workshop v3.0.0


One Observability Workshop / serverless/functions/petfood/cleanup-processor / PetfoodCleanupProcessorFunction

Class: PetfoodCleanupProcessorFunction

Defined in: serverless/functions/petfood/cleanup-processor.ts:40

Lambda that removes S3 images and DynamoDB records for discontinued food items via EventBridge.

Extends

Constructors

Constructor

new PetfoodCleanupProcessorFunction(scope, id, properties): PetfoodCleanupProcessorFunction

Defined in: serverless/functions/petfood/cleanup-processor.ts:41

Parameters

scope

Construct

id

string

properties

PetfoodCleanupProcessorProperties

Returns

PetfoodCleanupProcessorFunction

Overrides

WokshopLambdaFunction.constructor

Properties

function

function: Function

Defined in: constructs/lambda.ts:258

The Lambda function instance

Inherited from

WokshopLambdaFunction.function

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

Inherited from

WokshopLambdaFunction.scheduleFunction


addFunctionPermissions()

addFunctionPermissions(properties): void

Defined in: serverless/functions/petfood/cleanup-processor.ts:56

Adds IAM permissions required by the Lambda function. Must be implemented by concrete subclasses.

Parameters

properties

PetfoodCleanupProcessorProperties

Function configuration properties

Returns

void

Overrides

WokshopLambdaFunction.addFunctionPermissions


createOutputs()

createOutputs(): void

Defined in: serverless/functions/petfood/cleanup-processor.ts:93

Creates CloudFormation outputs for the Lambda function. Must be implemented by concrete subclasses.

Returns

void

Overrides

WokshopLambdaFunction.createOutputs


getEnvironmentVariables()

getEnvironmentVariables(properties): {[key: string]: string; } | undefined

Defined in: serverless/functions/petfood/cleanup-processor.ts:94

Returns environment variables for the Lambda function. Must be implemented by concrete subclasses.

Parameters

properties

PetfoodCleanupProcessorProperties

Function configuration properties

Returns

{[key: string]: string; } | undefined

Map of environment variable names to values

Overrides

WokshopLambdaFunction.getEnvironmentVariables


getLayers()

getLayers(): ILayerVersion[]

Defined in: serverless/functions/petfood/cleanup-processor.ts:109

Returns Lambda layers to be attached to the function. Must be implemented by concrete subclasses.

Returns

ILayerVersion[]

Array of Lambda layer versions

Overrides

WokshopLambdaFunction.getLayers


getBundling()

getBundling(): BundlingOptions

Defined in: serverless/functions/petfood/cleanup-processor.ts:123

Returns bundling options for the Lambda function code. Must be implemented by concrete subclasses.

Returns

BundlingOptions

Bundling configuration options

Overrides

WokshopLambdaFunction.getBundling