AWS Greengrass
API Reference

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.


{ "Id": "string", "FunctionArn": "string", "FunctionConfiguration": { "Pinned": true, "Executable": "string", "ExecArgs": "string", "MemorySize": 0, "Timeout": 0, "EncodingType": "binary|json", "Environment": { "Variables": { "additionalProperty0": "string", "additionalProperty1": "string", "additionalProperty2": "string" }, "ResourceAccessPolicies": [ { "ResourceId": "string", "Permission": "ro|rw" } ], "AccessSysfs": true, "Execution": { "IsolationMode": "GreengrassContainer|NoContainer", "RunAs": { "Uid": 1001, "Gid": 1002 } } } } }

Information about a Lambda function.

type: object

required: ["Id"]


A descriptive or arbitrary ID for the function. This value must be unique within the function definition version. Maximum length is 128 characters with pattern [a‑zA‑Z0‑9:_‑]+.

type: string


The ARN of the alias (recommended) or version of the target Lambda function.

type: string


The configuration of the Lambda function.

type: object


True if the function is pinned. Pinned means the function is long-lived and starts when the core starts.

type: boolean


The name of the function executable.

type: string


The execution arguments.

type: string


The memory size, in KB, which the function requires. This setting is not applicable and should be cleared when you run the Lambda function without containerization.

type: integer


The allowed function execution time, after which Lambda should terminate the function. This timeout still applies to pinned Lambda functions for each request.

type: integer


The expected encoding type of the input payload for the function. The default is json.

type: string

enum: ["binary", "json"]


The environment configuration of the function.

type: object


Environment variables for the Lambda function's configuration.

type: object

additionalProperties: An object with properties of type string that represent the environment variables.


A list of the resources, with their permissions, to which the Lambda function will be granted access. A Lambda function can have at most 10 resources. ResourceAccessPolicies apply only when you run the Lambda function in a Greengrass container.

type: array

items: ResourceAccessPolicy


A policy used by the function to access a resource.

type: object

required: ["ResourceId"]


The ID of the resource. (This ID is assigned to the resource when you create the resource definiton.)

type: string


The type of permission a function has to access a resource.

type: string

enum: ["ro", "rw"]


If true, the Lambda function is allowed to access the host's /sys folder. Use this when the Lambda function needs to read device information from /sys. This setting applies only when you run the Lambda function in a Greengrass container.

type: boolean


Configuration information that specifies how a Lambda function runs.

type: object


Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group.

type: string

enum: ["GreengrassContainer", "NoContainer"]


Specifies the user and group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values. We recommend that you avoid running as root unless absolutely necessary to minimize the risk of unintended changes or malicious attacks. To run as root, you must update config.json in greengrass-root/config to set allowFunctionsToRunAsRoot to yes.

type: object


The user ID whose permissions are used to run a Lambda function.

type: integer


The group ID whose permissions are used to run a Lambda function.

type: integer