aws-cdk-lib.aws_greengrassv2.CfnComponentVersion.LambdaExecutionParametersProperty

interface LambdaExecutionParametersProperty

LanguageType name
.NETAmazon.CDK.AWS.GreengrassV2.CfnComponentVersion.LambdaExecutionParametersProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsgreengrassv2#CfnComponentVersion_LambdaExecutionParametersProperty
Javasoftware.amazon.awscdk.services.greengrassv2.CfnComponentVersion.LambdaExecutionParametersProperty
Pythonaws_cdk.aws_greengrassv2.CfnComponentVersion.LambdaExecutionParametersProperty
TypeScript aws-cdk-lib » aws_greengrassv2 » CfnComponentVersion » LambdaExecutionParametersProperty

Contains parameters for a Lambda function that runs on AWS IoT Greengrass .

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_greengrassv2 as greengrassv2 } from 'aws-cdk-lib';
const lambdaExecutionParametersProperty: greengrassv2.CfnComponentVersion.LambdaExecutionParametersProperty = {
  environmentVariables: {
    environmentVariablesKey: 'environmentVariables',
  },
  eventSources: [{
    topic: 'topic',
    type: 'type',
  }],
  execArgs: ['execArgs'],
  inputPayloadEncodingType: 'inputPayloadEncodingType',
  linuxProcessParams: {
    containerParams: {
      devices: [{
        addGroupOwner: false,
        path: 'path',
        permission: 'permission',
      }],
      memorySizeInKb: 123,
      mountRoSysfs: false,
      volumes: [{
        addGroupOwner: false,
        destinationPath: 'destinationPath',
        permission: 'permission',
        sourcePath: 'sourcePath',
      }],
    },
    isolationMode: 'isolationMode',
  },
  maxIdleTimeInSeconds: 123,
  maxInstancesCount: 123,
  maxQueueSize: 123,
  pinned: false,
  statusTimeoutInSeconds: 123,
  timeoutInSeconds: 123,
};

Properties

NameTypeDescription
environmentVariables?IResolvable | { [string]: string }The map of environment variables that are available to the Lambda function when it runs.
eventSources?IResolvable | IResolvable | LambdaEventSourceProperty[]The list of event sources to which to subscribe to receive work messages.
execArgs?string[]The list of arguments to pass to the Lambda function when it runs.
inputPayloadEncodingType?stringThe encoding type that the Lambda function supports.
linuxProcessParams?IResolvable | LambdaLinuxProcessParamsPropertyThe parameters for the Linux process that contains the Lambda function.
maxIdleTimeInSeconds?numberThe maximum amount of time in seconds that a non-pinned Lambda function can idle before the AWS IoT Greengrass Core software stops its process.
maxInstancesCount?numberThe maximum number of instances that a non-pinned Lambda function can run at the same time.
maxQueueSize?numberThe maximum size of the message queue for the Lambda function component.
pinned?boolean | IResolvableWhether or not the Lambda function is pinned, or long-lived.
statusTimeoutInSeconds?numberThe interval in seconds at which a pinned (also known as long-lived) Lambda function component sends status updates to the Lambda manager component.
timeoutInSeconds?numberThe maximum amount of time in seconds that the Lambda function can process a work item.

environmentVariables?

Type: IResolvable | { [string]: string } (optional)

The map of environment variables that are available to the Lambda function when it runs.


eventSources?

Type: IResolvable | IResolvable | LambdaEventSourceProperty[] (optional)

The list of event sources to which to subscribe to receive work messages.

The Lambda function runs when it receives a message from an event source. You can subscribe this function to local publish/subscribe messages and AWS IoT Core MQTT messages.


execArgs?

Type: string[] (optional)

The list of arguments to pass to the Lambda function when it runs.


inputPayloadEncodingType?

Type: string (optional)

The encoding type that the Lambda function supports.

Default: json


linuxProcessParams?

Type: IResolvable | LambdaLinuxProcessParamsProperty (optional)

The parameters for the Linux process that contains the Lambda function.


maxIdleTimeInSeconds?

Type: number (optional)

The maximum amount of time in seconds that a non-pinned Lambda function can idle before the AWS IoT Greengrass Core software stops its process.


maxInstancesCount?

Type: number (optional)

The maximum number of instances that a non-pinned Lambda function can run at the same time.


maxQueueSize?

Type: number (optional)

The maximum size of the message queue for the Lambda function component.

The AWS IoT Greengrass core device stores messages in a FIFO (first-in-first-out) queue until it can run the Lambda function to consume each message.


pinned?

Type: boolean | IResolvable (optional)

Whether or not the Lambda function is pinned, or long-lived.

  • A pinned Lambda function starts when the AWS IoT Greengrass Core starts and keeps running in its own container.
  • A non-pinned Lambda function starts only when it receives a work item and exists after it idles for maxIdleTimeInSeconds . If the function has multiple work items, the AWS IoT Greengrass Core software creates multiple instances of the function.

Default: true


statusTimeoutInSeconds?

Type: number (optional)

The interval in seconds at which a pinned (also known as long-lived) Lambda function component sends status updates to the Lambda manager component.


timeoutInSeconds?

Type: number (optional)

The maximum amount of time in seconds that the Lambda function can process a work item.