Skip to content
v2.278.0

LambdaFunctionRecipeSourceProperty Struct ​

Contains information about an AWS Lambda function to import to create a component.

Example ​

ts
// 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 lambdaFunctionRecipeSourceProperty: greengrassv2.CfnComponentVersion.LambdaFunctionRecipeSourceProperty = {
  componentDependencies: {
    componentDependenciesKey: {
      dependencyType: 'dependencyType',
      versionRequirement: 'versionRequirement',
    },
  },
  componentLambdaParameters: {
    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,
  },
  componentName: 'componentName',
  componentPlatforms: [{
    attributes: {
      attributesKey: 'attributes',
    },
    name: 'name',
  }],
  componentVersion: 'componentVersion',
  lambdaArn: 'lambdaArn',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_greengrassv2 as greengrassv2

lambda_function_recipe_source_property = greengrassv2.CfnComponentVersion.LambdaFunctionRecipeSourceProperty(
    component_dependencies={
        "component_dependencies_key": greengrassv2.CfnComponentVersion.ComponentDependencyRequirementProperty(
            dependency_type="dependencyType",
            version_requirement="versionRequirement"
        )
    },
    component_lambda_parameters=greengrassv2.CfnComponentVersion.LambdaExecutionParametersProperty(
        environment_variables={
            "environment_variables_key": "environmentVariables"
        },
        event_sources=[greengrassv2.CfnComponentVersion.LambdaEventSourceProperty(
            topic="topic",
            type="type"
        )],
        exec_args=["execArgs"],
        input_payload_encoding_type="inputPayloadEncodingType",
        linux_process_params=greengrassv2.CfnComponentVersion.LambdaLinuxProcessParamsProperty(
            container_params=greengrassv2.CfnComponentVersion.LambdaContainerParamsProperty(
                devices=[greengrassv2.CfnComponentVersion.LambdaDeviceMountProperty(
                    add_group_owner=False,
                    path="path",
                    permission="permission"
                )],
                memory_size_in_kb=123,
                mount_ro_sysfs=False,
                volumes=[greengrassv2.CfnComponentVersion.LambdaVolumeMountProperty(
                    add_group_owner=False,
                    destination_path="destinationPath",
                    permission="permission",
                    source_path="sourcePath"
                )]
            ),
            isolation_mode="isolationMode"
        ),
        max_idle_time_in_seconds=123,
        max_instances_count=123,
        max_queue_size=123,
        pinned=False,
        status_timeout_in_seconds=123,
        timeout_in_seconds=123
    ),
    component_name="componentName",
    component_platforms=[greengrassv2.CfnComponentVersion.ComponentPlatformProperty(
        attributes={
            "attributes_key": "attributes"
        },
        name="name"
    )],
    component_version="componentVersion",
    lambda_arn="lambdaArn"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.greengrassv2.*;

LambdaFunctionRecipeSourceProperty lambdaFunctionRecipeSourceProperty = LambdaFunctionRecipeSourceProperty.builder()
        .componentDependencies(Map.of(
                "componentDependenciesKey", ComponentDependencyRequirementProperty.builder()
                        .dependencyType("dependencyType")
                        .versionRequirement("versionRequirement")
                        .build()))
        .componentLambdaParameters(LambdaExecutionParametersProperty.builder()
                .environmentVariables(Map.of(
                        "environmentVariablesKey", "environmentVariables"))
                .eventSources(List.of(LambdaEventSourceProperty.builder()
                        .topic("topic")
                        .type("type")
                        .build()))
                .execArgs(List.of("execArgs"))
                .inputPayloadEncodingType("inputPayloadEncodingType")
                .linuxProcessParams(LambdaLinuxProcessParamsProperty.builder()
                        .containerParams(LambdaContainerParamsProperty.builder()
                                .devices(List.of(LambdaDeviceMountProperty.builder()
                                        .addGroupOwner(false)
                                        .path("path")
                                        .permission("permission")
                                        .build()))
                                .memorySizeInKb(123)
                                .mountRoSysfs(false)
                                .volumes(List.of(LambdaVolumeMountProperty.builder()
                                        .addGroupOwner(false)
                                        .destinationPath("destinationPath")
                                        .permission("permission")
                                        .sourcePath("sourcePath")
                                        .build()))
                                .build())
                        .isolationMode("isolationMode")
                        .build())
                .maxIdleTimeInSeconds(123)
                .maxInstancesCount(123)
                .maxQueueSize(123)
                .pinned(false)
                .statusTimeoutInSeconds(123)
                .timeoutInSeconds(123)
                .build())
        .componentName("componentName")
        .componentPlatforms(List.of(ComponentPlatformProperty.builder()
                .attributes(Map.of(
                        "attributesKey", "attributes"))
                .name("name")
                .build()))
        .componentVersion("componentVersion")
        .lambdaArn("lambdaArn")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.GreengrassV2;

var lambdaFunctionRecipeSourceProperty = new LambdaFunctionRecipeSourceProperty {
    ComponentDependencies = new Dictionary<string, object> {
        { "componentDependenciesKey", new ComponentDependencyRequirementProperty {
            DependencyType = "dependencyType",
            VersionRequirement = "versionRequirement"
        } }
    },
    ComponentLambdaParameters = new LambdaExecutionParametersProperty {
        EnvironmentVariables = new Dictionary<string, string> {
            { "environmentVariablesKey", "environmentVariables" }
        },
        EventSources = new [] { new LambdaEventSourceProperty {
            Topic = "topic",
            Type = "type"
        } },
        ExecArgs = new [] { "execArgs" },
        InputPayloadEncodingType = "inputPayloadEncodingType",
        LinuxProcessParams = new LambdaLinuxProcessParamsProperty {
            ContainerParams = new LambdaContainerParamsProperty {
                Devices = new [] { new LambdaDeviceMountProperty {
                    AddGroupOwner = false,
                    Path = "path",
                    Permission = "permission"
                } },
                MemorySizeInKb = 123,
                MountRoSysfs = false,
                Volumes = new [] { new LambdaVolumeMountProperty {
                    AddGroupOwner = false,
                    DestinationPath = "destinationPath",
                    Permission = "permission",
                    SourcePath = "sourcePath"
                } }
            },
            IsolationMode = "isolationMode"
        },
        MaxIdleTimeInSeconds = 123,
        MaxInstancesCount = 123,
        MaxQueueSize = 123,
        Pinned = false,
        StatusTimeoutInSeconds = 123,
        TimeoutInSeconds = 123
    },
    ComponentName = "componentName",
    ComponentPlatforms = new [] { new ComponentPlatformProperty {
        Attributes = new Dictionary<string, string> {
            { "attributesKey", "attributes" }
        },
        Name = "name"
    } },
    ComponentVersion = "componentVersion",
    LambdaArn = "lambdaArn"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

lambdaFunctionRecipeSourceProperty := &LambdaFunctionRecipeSourceProperty{
	ComponentDependencies: map[string]interface{}{
		"componentDependenciesKey": &ComponentDependencyRequirementProperty{
			"dependencyType": jsii.String("dependencyType"),
			"versionRequirement": jsii.String("versionRequirement"),
		},
	},
	ComponentLambdaParameters: &LambdaExecutionParametersProperty{
		EnvironmentVariables: map[string]*string{
			"environmentVariablesKey": jsii.String("environmentVariables"),
		},
		EventSources: []interface{}{
			&LambdaEventSourceProperty{
				Topic: jsii.String("topic"),
				Type: jsii.String("type"),
			},
		},
		ExecArgs: []*string{
			jsii.String("execArgs"),
		},
		InputPayloadEncodingType: jsii.String("inputPayloadEncodingType"),
		LinuxProcessParams: &LambdaLinuxProcessParamsProperty{
			ContainerParams: &LambdaContainerParamsProperty{
				Devices: []interface{}{
					&LambdaDeviceMountProperty{
						AddGroupOwner: jsii.Boolean(false),
						Path: jsii.String("path"),
						Permission: jsii.String("permission"),
					},
				},
				MemorySizeInKb: jsii.Number(123),
				MountRoSysfs: jsii.Boolean(false),
				Volumes: []interface{}{
					&LambdaVolumeMountProperty{
						AddGroupOwner: jsii.Boolean(false),
						DestinationPath: jsii.String("destinationPath"),
						Permission: jsii.String("permission"),
						SourcePath: jsii.String("sourcePath"),
					},
				},
			},
			IsolationMode: jsii.String("isolationMode"),
		},
		MaxIdleTimeInSeconds: jsii.Number(123),
		MaxInstancesCount: jsii.Number(123),
		MaxQueueSize: jsii.Number(123),
		Pinned: jsii.Boolean(false),
		StatusTimeoutInSeconds: jsii.Number(123),
		TimeoutInSeconds: jsii.Number(123),
	},
	ComponentName: jsii.String("componentName"),
	ComponentPlatforms: []interface{}{
		&ComponentPlatformProperty{
			Attributes: map[string]*string{
				"attributesKey": jsii.String("attributes"),
			},
			Name: jsii.String("name"),
		},
	},
	ComponentVersion: jsii.String("componentVersion"),
	LambdaArn: jsii.String("lambdaArn"),
}

Properties ​

componentDependenciesoptionalIResolvable | { [key: string]: IResolvable | CfnComponentVersion.ComponentDependencyRequirementProperty }component_dependenciesoptionaltyping.Union[IResolvable, typing.Mapping[str, typing.Union[IResolvable, ComponentDependencyRequirementProperty]]]componentDependenciesoptionalIResolvableComponentDependenciesoptionalIResolvableComponentDependenciesoptionalinterface{} #
The component versions on which this Lambda function component depends.
componentLambdaParametersoptionalIResolvable | CfnComponentVersion.LambdaExecutionParametersPropertycomponent_lambda_parametersoptionaltyping.Union[IResolvable, LambdaExecutionParametersProperty]componentLambdaParametersoptionalIResolvableComponentLambdaParametersoptionalIResolvableComponentLambdaParametersoptionalinterface{} #
The system and runtime parameters for the Lambda function as it runs on the AWS IoT Greengrass core device.
componentNameoptionalstringcomponent_nameoptionalstrcomponentNameoptionalStringComponentNameoptionalstringComponentNameoptional*string #
The name of the component.

Defaults to the name of the Lambda function.

componentPlatformsoptionalIResolvable | IResolvable | CfnComponentVersion.ComponentPlatformProperty[]component_platformsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ComponentPlatformProperty]]]componentPlatformsoptionalIResolvableComponentPlatformsoptionalIResolvableComponentPlatformsoptionalinterface{} #
The platforms that the component version supports.
componentVersionoptionalstringcomponent_versionoptionalstrcomponentVersionoptionalStringComponentVersionoptionalstringComponentVersionoptional*string #
The version of the component.

Defaults to the version of the Lambda function as a semantic version. For example, if your function version is 3 , the component version becomes 3.0.0 .

lambdaArnoptionalstringlambda_arnoptionalstrlambdaArnoptionalStringLambdaArnoptionalstringLambdaArnoptional*string #
The ARN of the Lambda function.

The ARN must include the version of the function to import. You can't use version aliases like $LATEST .