

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::Greengrass::FunctionDefinitionVersion
<a name="aws-resource-greengrass-functiondefinitionversion"></a>

The `AWS::Greengrass::FunctionDefinitionVersion` resource represents a function definition version for AWS IoT Greengrass. A function definition version contains contain a list of functions.

**Note**  
To create a function definition version, you must specify the ID of the function definition that you want to associate with the version. For information about creating a function definition, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-functiondefinition.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-functiondefinition.html).  
After you create a function definition version that contains the functions you want to deploy, you must add it to your group version. For more information, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-group.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-group.html).

## Syntax
<a name="aws-resource-greengrass-functiondefinitionversion-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-greengrass-functiondefinitionversion-syntax.json"></a>

```
{
  "Type" : "AWS::Greengrass::FunctionDefinitionVersion",
  "Properties" : {
      "[DefaultConfig](#cfn-greengrass-functiondefinitionversion-defaultconfig)" : DefaultConfig,
      "[FunctionDefinitionId](#cfn-greengrass-functiondefinitionversion-functiondefinitionid)" : String,
      "[Functions](#cfn-greengrass-functiondefinitionversion-functions)" : [ Function, ... ]
    }
}
```

### YAML
<a name="aws-resource-greengrass-functiondefinitionversion-syntax.yaml"></a>

```
Type: AWS::Greengrass::FunctionDefinitionVersion
Properties:
  [DefaultConfig](#cfn-greengrass-functiondefinitionversion-defaultconfig): 
    DefaultConfig
  [FunctionDefinitionId](#cfn-greengrass-functiondefinitionversion-functiondefinitionid): String
  [Functions](#cfn-greengrass-functiondefinitionversion-functions): 
    - Function
```

## Properties
<a name="aws-resource-greengrass-functiondefinitionversion-properties"></a>

`DefaultConfig`  <a name="cfn-greengrass-functiondefinitionversion-defaultconfig"></a>
The default configuration that applies to all Lambda functions in the group. Individual Lambda functions can override these settings.  
*Required*: No  
*Type*: [DefaultConfig](aws-properties-greengrass-functiondefinitionversion-defaultconfig.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FunctionDefinitionId`  <a name="cfn-greengrass-functiondefinitionversion-functiondefinitionid"></a>
The ID of the function definition associated with this version. This value is a GUID.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Functions`  <a name="cfn-greengrass-functiondefinitionversion-functions"></a>
The functions in this version.  
*Required*: Yes  
*Type*: Array of [Function](aws-properties-greengrass-functiondefinitionversion-function.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-greengrass-functiondefinitionversion-return-values"></a>

### Ref
<a name="aws-resource-greengrass-functiondefinitionversion-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the Amazon Resource Name (ARN) of the function definition version, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/functions/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2`. 

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-greengrass-functiondefinitionversion-return-values-fn--getatt"></a>

## Examples
<a name="aws-resource-greengrass-functiondefinitionversion--examples"></a>



### Function Definition Version Snippet
<a name="aws-resource-greengrass-functiondefinitionversion--examples--Function_Definition_Version_Snippet"></a>

The following snippet defines function definition and function definition version resources. The function definition version references the function definition and contains a function. In this example, the Lambda function is created in another stack and is referenced using the `ImportValue` function.

For an example of a complete template, see the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-group.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-group.html) resource.

#### JSON
<a name="aws-resource-greengrass-functiondefinitionversion--examples--Function_Definition_Version_Snippet--json"></a>

```
"TestFunctionDefinition": {
    "Type": "AWS::Greengrass::FunctionDefinition",
    "Properties": {
        "Name": "DemoTestFunctionDefinition"
    }
},
"TestFunctionDefinitionVersion": {
    "Type": "AWS::Greengrass::FunctionDefinitionVersion",
    "Properties": {
        "FunctionDefinitionId": {
            "Fn::GetAtt": [
                "TestFunctionDefinition",
                "Id"
            ]
        },
        "DefaultConfig": {
            "Execution": {
                "IsolationMode": "GreengrassContainer"
            }
        },
        "Functions": [
            {
                "Id": "TestLambda1",
                "FunctionArn": {
                    "Fn::ImportValue": "TestCanaryLambdaVersionArn"
                },
                "FunctionConfiguration": {
                    "Pinned": "true",
                    "Executable": "run.exe",
                    "ExecArgs": "argument1",
                    "MemorySize": "512",
                    "Timeout": "2000",
                    "EncodingType": "binary",
                    "Environment": {
                        "Variables": {
                            "variable1": "value1"
                        },
                        "ResourceAccessPolicies": [
                            {
                                "ResourceId": "ResourceId1",
                                "Permission": "ro"
                            },
                            {
                                "ResourceId": "ResourceId2",
                                "Permission": "rw"
                            }
                        ],
                        "AccessSysfs": "false",
                        "Execution": {
                            "RunAs": {
                                "Uid": "1",
                                "Gid": "10"
                            }
                        }
                    }
                }
            }
        ]
    }
}
```

#### YAML
<a name="aws-resource-greengrass-functiondefinitionversion--examples--Function_Definition_Version_Snippet--yaml"></a>

```
TestFunctionDefinition:
  Type: 'AWS::Greengrass::FunctionDefinition'
  Properties:
    Name: DemoTestFunctionDefinition
TestFunctionDefinitionVersion:
  Type: 'AWS::Greengrass::FunctionDefinitionVersion'
  Properties:
    FunctionDefinitionId: !GetAtt 
      - TestFunctionDefinition
      - Id
    DefaultConfig:
      Execution:
        IsolationMode: GreengrassContainer
    Functions:
      - Id: TestLambda1
        FunctionArn: !ImportValue TestCanaryLambdaVersionArn
        FunctionConfiguration:
          Pinned: 'true'
          Executable: run.exe
          ExecArgs: argument1
          MemorySize: '512'
          Timeout: '2000'
          EncodingType: binary
          Environment:
            Variables:
              variable1: value1
            ResourceAccessPolicies:
              - ResourceId: ResourceId1
                Permission: ro
              - ResourceId: ResourceId2
                Permission: rw
            AccessSysfs: 'false'
            Execution:
              RunAs:
                Uid: '1'
                Gid: '10'
```

## See also
<a name="aws-resource-greengrass-functiondefinitionversion--seealso"></a>
+ [CreateFunctionDefinitionVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/createfunctiondefinitionversion-post.html) in the * AWS IoT Greengrass Version 1 API Reference *
+  [AWS IoT Greengrass Version 1 Developer Guide](https://docs.aws.amazon.com/greengrass/v1/developerguide/) 

# AWS::Greengrass::FunctionDefinitionVersion DefaultConfig
<a name="aws-properties-greengrass-functiondefinitionversion-defaultconfig"></a>

<a name="aws-properties-greengrass-functiondefinitionversion-defaultconfig-description"></a>The default configuration that applies to all Lambda functions in the function definition version. Individual Lambda functions can override these settings.

<a name="aws-properties-greengrass-functiondefinitionversion-defaultconfig-inheritance"></a> In an CloudFormation template, `DefaultConfig` is a property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-functiondefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-functiondefinitionversion.html) resource.

## Syntax
<a name="aws-properties-greengrass-functiondefinitionversion-defaultconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-greengrass-functiondefinitionversion-defaultconfig-syntax.json"></a>

```
{
  "[Execution](#cfn-greengrass-functiondefinitionversion-defaultconfig-execution)" : Execution
}
```

### YAML
<a name="aws-properties-greengrass-functiondefinitionversion-defaultconfig-syntax.yaml"></a>

```
  [Execution](#cfn-greengrass-functiondefinitionversion-defaultconfig-execution): 
    Execution
```

## Properties
<a name="aws-properties-greengrass-functiondefinitionversion-defaultconfig-properties"></a>

`Execution`  <a name="cfn-greengrass-functiondefinitionversion-defaultconfig-execution"></a>
Configuration settings for the Lambda execution environment on the AWS IoT Greengrass core.  
*Required*: Yes  
*Type*: [Execution](aws-properties-greengrass-functiondefinitionversion-execution.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## See also
<a name="aws-properties-greengrass-functiondefinitionversion-defaultconfig--seealso"></a>
+ [FunctionDefaultConfig](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-functiondefaultconfig.html) in the * AWS IoT Greengrass Version 1 API Reference *
+  [AWS IoT Greengrass Version 1 Developer Guide](https://docs.aws.amazon.com/greengrass/v1/developerguide/) 

# AWS::Greengrass::FunctionDefinitionVersion Environment
<a name="aws-properties-greengrass-functiondefinitionversion-environment"></a>

<a name="aws-properties-greengrass-functiondefinitionversion-environment-description"></a>The environment configuration for a Lambda function on the AWS IoT Greengrass core.

<a name="aws-properties-greengrass-functiondefinitionversion-environment-inheritance"></a> In an CloudFormation template, `Environment` is a property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-functionconfiguration.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-functionconfiguration.html) property type.

## Syntax
<a name="aws-properties-greengrass-functiondefinitionversion-environment-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-greengrass-functiondefinitionversion-environment-syntax.json"></a>

```
{
  "[AccessSysfs](#cfn-greengrass-functiondefinitionversion-environment-accesssysfs)" : Boolean,
  "[Execution](#cfn-greengrass-functiondefinitionversion-environment-execution)" : Execution,
  "[ResourceAccessPolicies](#cfn-greengrass-functiondefinitionversion-environment-resourceaccesspolicies)" : [ ResourceAccessPolicy, ... ],
  "[Variables](#cfn-greengrass-functiondefinitionversion-environment-variables)" : Json
}
```

### YAML
<a name="aws-properties-greengrass-functiondefinitionversion-environment-syntax.yaml"></a>

```
  [AccessSysfs](#cfn-greengrass-functiondefinitionversion-environment-accesssysfs): Boolean
  [Execution](#cfn-greengrass-functiondefinitionversion-environment-execution): 
    Execution
  [ResourceAccessPolicies](#cfn-greengrass-functiondefinitionversion-environment-resourceaccesspolicies): 
    - ResourceAccessPolicy
  [Variables](#cfn-greengrass-functiondefinitionversion-environment-variables): Json
```

## Properties
<a name="aws-properties-greengrass-functiondefinitionversion-environment-properties"></a>

`AccessSysfs`  <a name="cfn-greengrass-functiondefinitionversion-environment-accesssysfs"></a>
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.
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Execution`  <a name="cfn-greengrass-functiondefinitionversion-environment-execution"></a>
Settings for the Lambda execution environment in AWS IoT Greengrass.  
*Required*: No  
*Type*: [Execution](aws-properties-greengrass-functiondefinitionversion-execution.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ResourceAccessPolicies`  <a name="cfn-greengrass-functiondefinitionversion-environment-resourceaccesspolicies"></a>
A list of the [resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-resourceinstance.html) 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.
*Required*: No  
*Type*: Array of [ResourceAccessPolicy](aws-properties-greengrass-functiondefinitionversion-resourceaccesspolicy.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Variables`  <a name="cfn-greengrass-functiondefinitionversion-environment-variables"></a>
Environment variables for the Lambda function.  
*Required*: No  
*Type*: Json  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## See also
<a name="aws-properties-greengrass-functiondefinitionversion-environment--seealso"></a>
+ [FunctionConfigurationEnvironment](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-functionconfigurationenvironment.html) in the * AWS IoT Greengrass Version 1 API Reference *
+  [AWS IoT Greengrass Version 1 Developer Guide](https://docs.aws.amazon.com/greengrass/v1/developerguide/) 

# AWS::Greengrass::FunctionDefinitionVersion Execution
<a name="aws-properties-greengrass-functiondefinitionversion-execution"></a>

<a name="aws-properties-greengrass-functiondefinitionversion-execution-description"></a>Configuration settings for the Lambda execution environment on the AWS IoT Greengrass core.

<a name="aws-properties-greengrass-functiondefinitionversion-execution-inheritance"></a> In an CloudFormation template, `Execution` is a property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-defaultconfig.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-defaultconfig.html) property type for a function definition version and the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-environment.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-environment.html) property type for a function.

## Syntax
<a name="aws-properties-greengrass-functiondefinitionversion-execution-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-greengrass-functiondefinitionversion-execution-syntax.json"></a>

```
{
  "[IsolationMode](#cfn-greengrass-functiondefinitionversion-execution-isolationmode)" : String,
  "[RunAs](#cfn-greengrass-functiondefinitionversion-execution-runas)" : RunAs
}
```

### YAML
<a name="aws-properties-greengrass-functiondefinitionversion-execution-syntax.yaml"></a>

```
  [IsolationMode](#cfn-greengrass-functiondefinitionversion-execution-isolationmode): String
  [RunAs](#cfn-greengrass-functiondefinitionversion-execution-runas): 
    RunAs
```

## Properties
<a name="aws-properties-greengrass-functiondefinitionversion-execution-properties"></a>

`IsolationMode`  <a name="cfn-greengrass-functiondefinitionversion-execution-isolationmode"></a>
The containerization that the Lambda function runs in. Valid values are `GreengrassContainer` or `NoContainer`. Typically, this is `GreengrassContainer`. For more information, see [Containerization](https://docs.aws.amazon.com/greengrass/v1/developerguide/lambda-group-config.html#lambda-function-containerization) in the * AWS IoT Greengrass Version 1 Developer Guide *.  
+ When set on the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-defaultconfig.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-defaultconfig.html) property of a function definition version, this setting is used as the default containerization for all Lambda functions in the function definition version.
+ When set on the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-environment.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-environment.html) property of a function, this setting applies to the individual function and overrides the default. Omit this value to run the function with the default containerization.
We recommend that you run in a Greengrass container unless your business case requires that you run without containerization.
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RunAs`  <a name="cfn-greengrass-functiondefinitionversion-execution-runas"></a>
The user and group permissions used to run the Lambda function. Typically, this is the ggc\$1user and ggc\$1group. For more information, see [Run as](https://docs.aws.amazon.com/greengrass/v1/developerguide/lambda-group-config.html#lambda-access-identity.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.  
+ When set on the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-defaultconfig.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-defaultconfig.html) property of a function definition version, this setting is used as the default access identity for all Lambda functions in the function definition version.
+ When set on the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-environment.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-environment.html) property of a function, this setting applies to the individual function and overrides the default. You can override the user, group, or both. Omit this value to run the function with the default permissions.
Running as the root user increases risks to your data and device. Do not run as root (UID/GID=0) unless your business case requires it. For more information and requirements, see [Running a Lambda Function as Root](https://docs.aws.amazon.com/greengrass/v1/developerguide/lambda-group-config.html#lambda-running-as-root). 
*Required*: No  
*Type*: [RunAs](aws-properties-greengrass-functiondefinitionversion-runas.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## See also
<a name="aws-properties-greengrass-functiondefinitionversion-execution--seealso"></a>
+ [FunctionExecutionConfig](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-functionexecutionconfig.html) in the * AWS IoT Greengrass Version 1 API Reference *
+  [AWS IoT Greengrass Version 1 Developer Guide](https://docs.aws.amazon.com/greengrass/v1/developerguide/) 

# AWS::Greengrass::FunctionDefinitionVersion Function
<a name="aws-properties-greengrass-functiondefinitionversion-function"></a>

<a name="aws-properties-greengrass-functiondefinitionversion-function-description"></a>A function is a Lambda function that's referenced from an AWS IoT Greengrass group. The function is deployed to a Greengrass core where it runs locally. For more information, see [Run Lambda Functions on the AWS IoT Greengrass Core](https://docs.aws.amazon.com/greengrass/v1/developerguide/lambda-functions.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-functiondefinitionversion-function-inheritance"></a> In an CloudFormation template, the `Functions` property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-functiondefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-functiondefinitionversion.html) resource contains a list of `Function` property types.

## Syntax
<a name="aws-properties-greengrass-functiondefinitionversion-function-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-greengrass-functiondefinitionversion-function-syntax.json"></a>

```
{
  "[FunctionArn](#cfn-greengrass-functiondefinitionversion-function-functionarn)" : String,
  "[FunctionConfiguration](#cfn-greengrass-functiondefinitionversion-function-functionconfiguration)" : FunctionConfiguration,
  "[Id](#cfn-greengrass-functiondefinitionversion-function-id)" : String
}
```

### YAML
<a name="aws-properties-greengrass-functiondefinitionversion-function-syntax.yaml"></a>

```
  [FunctionArn](#cfn-greengrass-functiondefinitionversion-function-functionarn): String
  [FunctionConfiguration](#cfn-greengrass-functiondefinitionversion-function-functionconfiguration): 
    FunctionConfiguration
  [Id](#cfn-greengrass-functiondefinitionversion-function-id): String
```

## Properties
<a name="aws-properties-greengrass-functiondefinitionversion-function-properties"></a>

`FunctionArn`  <a name="cfn-greengrass-functiondefinitionversion-function-functionarn"></a>
The Amazon Resource Name (ARN) of the alias (recommended) or version of the referenced Lambda function.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FunctionConfiguration`  <a name="cfn-greengrass-functiondefinitionversion-function-functionconfiguration"></a>
The group-specific settings of the Lambda function. These settings configure the function's behavior in the Greengrass group.  
*Required*: Yes  
*Type*: [FunctionConfiguration](aws-properties-greengrass-functiondefinitionversion-functionconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Id`  <a name="cfn-greengrass-functiondefinitionversion-function-id"></a>
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:_-]+`.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## See also
<a name="aws-properties-greengrass-functiondefinitionversion-function--seealso"></a>
+ [Function](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-function.html) in the * AWS IoT Greengrass Version 1 API Reference *
+  [AWS IoT Greengrass Version 1 Developer Guide](https://docs.aws.amazon.com/greengrass/v1/developerguide/) 

# AWS::Greengrass::FunctionDefinitionVersion FunctionConfiguration
<a name="aws-properties-greengrass-functiondefinitionversion-functionconfiguration"></a>

<a name="aws-properties-greengrass-functiondefinitionversion-functionconfiguration-description"></a>The group-specific configuration settings for a Lambda function. These settings configure the function's behavior in the Greengrass group. For more information, see [Controlling Execution of Greengrass Lambda Functions by Using Group-Specific Configuration](https://docs.aws.amazon.com/greengrass/v1/developerguide/lambda-group-config.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-functiondefinitionversion-functionconfiguration-inheritance"></a> In an CloudFormation template, `FunctionConfiguration` is a property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-function.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-function.html) property type.

## Syntax
<a name="aws-properties-greengrass-functiondefinitionversion-functionconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-greengrass-functiondefinitionversion-functionconfiguration-syntax.json"></a>

```
{
  "[EncodingType](#cfn-greengrass-functiondefinitionversion-functionconfiguration-encodingtype)" : String,
  "[Environment](#cfn-greengrass-functiondefinitionversion-functionconfiguration-environment)" : Environment,
  "[ExecArgs](#cfn-greengrass-functiondefinitionversion-functionconfiguration-execargs)" : String,
  "[Executable](#cfn-greengrass-functiondefinitionversion-functionconfiguration-executable)" : String,
  "[MemorySize](#cfn-greengrass-functiondefinitionversion-functionconfiguration-memorysize)" : Integer,
  "[Pinned](#cfn-greengrass-functiondefinitionversion-functionconfiguration-pinned)" : Boolean,
  "[Timeout](#cfn-greengrass-functiondefinitionversion-functionconfiguration-timeout)" : Integer
}
```

### YAML
<a name="aws-properties-greengrass-functiondefinitionversion-functionconfiguration-syntax.yaml"></a>

```
  [EncodingType](#cfn-greengrass-functiondefinitionversion-functionconfiguration-encodingtype): String
  [Environment](#cfn-greengrass-functiondefinitionversion-functionconfiguration-environment): 
    Environment
  [ExecArgs](#cfn-greengrass-functiondefinitionversion-functionconfiguration-execargs): String
  [Executable](#cfn-greengrass-functiondefinitionversion-functionconfiguration-executable): String
  [MemorySize](#cfn-greengrass-functiondefinitionversion-functionconfiguration-memorysize): Integer
  [Pinned](#cfn-greengrass-functiondefinitionversion-functionconfiguration-pinned): Boolean
  [Timeout](#cfn-greengrass-functiondefinitionversion-functionconfiguration-timeout): Integer
```

## Properties
<a name="aws-properties-greengrass-functiondefinitionversion-functionconfiguration-properties"></a>

`EncodingType`  <a name="cfn-greengrass-functiondefinitionversion-functionconfiguration-encodingtype"></a>
The expected encoding type of the input payload for the function. Valid values are `json` (default) and `binary`.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Environment`  <a name="cfn-greengrass-functiondefinitionversion-functionconfiguration-environment"></a>
The environment configuration of the function.  
*Required*: No  
*Type*: [Environment](aws-properties-greengrass-functiondefinitionversion-environment.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ExecArgs`  <a name="cfn-greengrass-functiondefinitionversion-functionconfiguration-execargs"></a>
The execution arguments.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Executable`  <a name="cfn-greengrass-functiondefinitionversion-functionconfiguration-executable"></a>
The name of the function executable.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MemorySize`  <a name="cfn-greengrass-functiondefinitionversion-functionconfiguration-memorysize"></a>
The memory size (in KB) required by the function.  
This property applies only to Lambda functions that run in a Greengrass container.
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Pinned`  <a name="cfn-greengrass-functiondefinitionversion-functionconfiguration-pinned"></a>
Indicates whether the function is pinned (or *long-lived*). Pinned functions start when the core starts and process all requests in the same container. The default value is false.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Timeout`  <a name="cfn-greengrass-functiondefinitionversion-functionconfiguration-timeout"></a>
The allowed execution time (in seconds) after which the function should terminate. For pinned functions, this timeout applies for each request.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## See also
<a name="aws-properties-greengrass-functiondefinitionversion-functionconfiguration--seealso"></a>
+ [FunctionConfiguration](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-functionconfiguration.html) in the * AWS IoT Greengrass Version 1 API Reference *
+  [AWS IoT Greengrass Version 1 Developer Guide](https://docs.aws.amazon.com/greengrass/v1/developerguide/) 

# AWS::Greengrass::FunctionDefinitionVersion ResourceAccessPolicy
<a name="aws-properties-greengrass-functiondefinitionversion-resourceaccesspolicy"></a>

<a name="aws-properties-greengrass-functiondefinitionversion-resourceaccesspolicy-description"></a>A list of the [resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-resourceinstance.html) in the group that the function can access, with the corresponding read-only or read-write permissions. The maximum is 10 resources.

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

<a name="aws-properties-greengrass-functiondefinitionversion-resourceaccesspolicy-inheritance"></a> In an CloudFormation template, `ResourceAccessPolicy` is a property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-environment.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-environment.html) property type.

## Syntax
<a name="aws-properties-greengrass-functiondefinitionversion-resourceaccesspolicy-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-greengrass-functiondefinitionversion-resourceaccesspolicy-syntax.json"></a>

```
{
  "[Permission](#cfn-greengrass-functiondefinitionversion-resourceaccesspolicy-permission)" : String,
  "[ResourceId](#cfn-greengrass-functiondefinitionversion-resourceaccesspolicy-resourceid)" : String
}
```

### YAML
<a name="aws-properties-greengrass-functiondefinitionversion-resourceaccesspolicy-syntax.yaml"></a>

```
  [Permission](#cfn-greengrass-functiondefinitionversion-resourceaccesspolicy-permission): String
  [ResourceId](#cfn-greengrass-functiondefinitionversion-resourceaccesspolicy-resourceid): String
```

## Properties
<a name="aws-properties-greengrass-functiondefinitionversion-resourceaccesspolicy-properties"></a>

`Permission`  <a name="cfn-greengrass-functiondefinitionversion-resourceaccesspolicy-permission"></a>
The read-only or read-write access that the Lambda function has to the resource. Valid values are `ro` or `rw`.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ResourceId`  <a name="cfn-greengrass-functiondefinitionversion-resourceaccesspolicy-resourceid"></a>
The ID of the resource. This ID is assigned to the resource when you create the resource definition.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## See also
<a name="aws-properties-greengrass-functiondefinitionversion-resourceaccesspolicy--seealso"></a>
+ [ResourceAccessPolicy](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-resourceaccesspolicy.html) in the * AWS IoT Greengrass Version 1 API Reference *
+  [AWS IoT Greengrass Version 1 Developer Guide](https://docs.aws.amazon.com/greengrass/v1/developerguide/) 

# AWS::Greengrass::FunctionDefinitionVersion RunAs
<a name="aws-properties-greengrass-functiondefinitionversion-runas"></a>

<a name="aws-properties-greengrass-functiondefinitionversion-runas-description"></a>The user and group permissions used to run the Lambda function. This setting overrides the default access identity that's specified for the group (by default, ggc\$1user and ggc\$1group). You can override the user, group, or both. For more information, see [Run as](https://docs.aws.amazon.com/greengrass/v1/developerguide/lambda-group-config.html#lambda-access-identity.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

**Important**  
Running as the root user increases risks to your data and device. Do not run as root (UID/GID=0) unless your business case requires it. For more information and requirements, see [Running a Lambda Function as Root](https://docs.aws.amazon.com/greengrass/v1/developerguide/lambda-group-config.html#lambda-running-as-root). 

<a name="aws-properties-greengrass-functiondefinitionversion-runas-inheritance"></a> In an CloudFormation template, `RunAs` is a property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-execution.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinitionversion-execution.html) property type.

## Syntax
<a name="aws-properties-greengrass-functiondefinitionversion-runas-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-greengrass-functiondefinitionversion-runas-syntax.json"></a>

```
{
  "[Gid](#cfn-greengrass-functiondefinitionversion-runas-gid)" : Integer,
  "[Uid](#cfn-greengrass-functiondefinitionversion-runas-uid)" : Integer
}
```

### YAML
<a name="aws-properties-greengrass-functiondefinitionversion-runas-syntax.yaml"></a>

```
  [Gid](#cfn-greengrass-functiondefinitionversion-runas-gid): Integer
  [Uid](#cfn-greengrass-functiondefinitionversion-runas-uid): Integer
```

## Properties
<a name="aws-properties-greengrass-functiondefinitionversion-runas-properties"></a>

`Gid`  <a name="cfn-greengrass-functiondefinitionversion-runas-gid"></a>
The group ID whose permissions are used to run the Lambda function. You can use the **getent group** command on your core device to look up the group ID.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Uid`  <a name="cfn-greengrass-functiondefinitionversion-runas-uid"></a>
The user ID whose permissions are used to run the Lambda function. You can use the **getent passwd** command on your core device to look up the user ID.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## See also
<a name="aws-properties-greengrass-functiondefinitionversion-runas--seealso"></a>
+ [FunctionRunAsConfig](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-functionrunasconfig.html) in the * AWS IoT Greengrass Version 1 API Reference *
+  [AWS IoT Greengrass Version 1 Developer Guide](https://docs.aws.amazon.com/greengrass/v1/developerguide/) 