interface LambdaExecutionParametersProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.GreengrassV2.CfnComponentVersion.LambdaExecutionParametersProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsgreengrassv2#CfnComponentVersion_LambdaExecutionParametersProperty |
Java | software.amazon.awscdk.services.greengrassv2.CfnComponentVersion.LambdaExecutionParametersProperty |
Python | aws_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
Name | Type | Description |
---|---|---|
environment | IResolvable | { [string]: string } | The map of environment variables that are available to the Lambda function when it runs. |
event | IResolvable | IResolvable | Lambda [] | The list of event sources to which to subscribe to receive work messages. |
exec | string[] | The list of arguments to pass to the Lambda function when it runs. |
input | string | The encoding type that the Lambda function supports. |
linux | IResolvable | Lambda | The parameters for the Linux process that contains the Lambda function. |
max | number | 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. |
max | number | The maximum number of instances that a non-pinned Lambda function can run at the same time. |
max | number | The maximum size of the message queue for the Lambda function component. |
pinned? | boolean | IResolvable | Whether or not the Lambda function is pinned, or long-lived. |
status | number | The interval in seconds at which a pinned (also known as long-lived) Lambda function component sends status updates to the Lambda manager component. |
timeout | number | The 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
|
Lambda
[]
(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
|
Lambda
(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.