aws-cdk-lib.aws_greengrass.CfnFunctionDefinitionVersion.EnvironmentProperty

interface EnvironmentProperty

LanguageType name
.NETAmazon.CDK.AWS.Greengrass.CfnFunctionDefinitionVersion.EnvironmentProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsgreengrass#CfnFunctionDefinitionVersion_EnvironmentProperty
Javasoftware.amazon.awscdk.services.greengrass.CfnFunctionDefinitionVersion.EnvironmentProperty
Pythonaws_cdk.aws_greengrass.CfnFunctionDefinitionVersion.EnvironmentProperty
TypeScript aws-cdk-lib » aws_greengrass » CfnFunctionDefinitionVersion » EnvironmentProperty

The environment configuration for a Lambda function on the AWS IoT Greengrass core.

In an AWS CloudFormation template, Environment is a property of the FunctionConfiguration property type.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_greengrass as greengrass } from 'aws-cdk-lib';

declare const variables: any;
const environmentProperty: greengrass.CfnFunctionDefinitionVersion.EnvironmentProperty = {
  accessSysfs: false,
  execution: {
    isolationMode: 'isolationMode',
    runAs: {
      gid: 123,
      uid: 123,
    },
  },
  resourceAccessPolicies: [{
    resourceId: 'resourceId',

    // the properties below are optional
    permission: 'permission',
  }],
  variables: variables,
};

Properties

NameTypeDescription
accessSysfs?boolean | IResolvableIndicates whether the function is allowed to access the /sys directory on the core device, which allows the read device information from /sys .
execution?IResolvable | ExecutionPropertySettings for the Lambda execution environment in AWS IoT Greengrass .
resourceAccessPolicies?IResolvable | IResolvable | ResourceAccessPolicyProperty[]A list of the resources in the group that the function can access, with the corresponding read-only or read-write permissions. The maximum is 10 resources.
variables?anyEnvironment variables for the Lambda function.

accessSysfs?

Type: boolean | IResolvable (optional)

Indicates whether the function is allowed to access the /sys directory on the core device, which allows the read device information from /sys .

This property applies only to Lambda functions that run in a Greengrass container.


execution?

Type: IResolvable | ExecutionProperty (optional)

Settings for the Lambda execution environment in AWS IoT Greengrass .


resourceAccessPolicies?

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

A list of the resources in the group that the function can access, with the corresponding read-only or read-write permissions. The maximum is 10 resources.

This property applies only to Lambda functions that run in a Greengrass container.


variables?

Type: any (optional)

Environment variables for the Lambda function.