Skip to content

One Observability Workshop v3.0.0


One Observability Workshop / serverless/functions/petfood/image-generator / PetfoodImageGeneratorFunction

Class: PetfoodImageGeneratorFunction

Defined in: serverless/functions/petfood/image-generator.ts:40

Lambda that generates food images via Bedrock Titan on FoodItemUpdated events.

Extends

Constructors

Constructor

new PetfoodImageGeneratorFunction(scope, id, properties): PetfoodImageGeneratorFunction

Defined in: serverless/functions/petfood/image-generator.ts:41

Parameters

scope

Construct

id

string

properties

PetfoodImageGeneratorProperties

Returns

PetfoodImageGeneratorFunction

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/image-generator.ts:65

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

Parameters

properties

PetfoodImageGeneratorProperties

Function configuration properties

Returns

void

Overrides

WokshopLambdaFunction.addFunctionPermissions


createOutputs()

createOutputs(): void

Defined in: serverless/functions/petfood/image-generator.ts:101

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/image-generator.ts:102

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

Parameters

properties

PetfoodImageGeneratorProperties

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/image-generator.ts:117

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/image-generator.ts:131

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

Returns

BundlingOptions

Bundling configuration options

Overrides

WokshopLambdaFunction.getBundling