

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 IoT Greengrass
<a name="AWS_Greengrass"></a>

**Resource types**
+ [AWS::Greengrass::ConnectorDefinition](aws-resource-greengrass-connectordefinition.md)
+ [AWS::Greengrass::ConnectorDefinitionVersion](aws-resource-greengrass-connectordefinitionversion.md)
+ [AWS::Greengrass::CoreDefinition](aws-resource-greengrass-coredefinition.md)
+ [AWS::Greengrass::CoreDefinitionVersion](aws-resource-greengrass-coredefinitionversion.md)
+ [AWS::Greengrass::DeviceDefinition](aws-resource-greengrass-devicedefinition.md)
+ [AWS::Greengrass::DeviceDefinitionVersion](aws-resource-greengrass-devicedefinitionversion.md)
+ [AWS::Greengrass::FunctionDefinition](aws-resource-greengrass-functiondefinition.md)
+ [AWS::Greengrass::FunctionDefinitionVersion](aws-resource-greengrass-functiondefinitionversion.md)
+ [AWS::Greengrass::Group](aws-resource-greengrass-group.md)
+ [AWS::Greengrass::GroupVersion](aws-resource-greengrass-groupversion.md)
+ [AWS::Greengrass::LoggerDefinition](aws-resource-greengrass-loggerdefinition.md)
+ [AWS::Greengrass::LoggerDefinitionVersion](aws-resource-greengrass-loggerdefinitionversion.md)
+ [AWS::Greengrass::ResourceDefinition](aws-resource-greengrass-resourcedefinition.md)
+ [AWS::Greengrass::ResourceDefinitionVersion](aws-resource-greengrass-resourcedefinitionversion.md)
+ [AWS::Greengrass::SubscriptionDefinition](aws-resource-greengrass-subscriptiondefinition.md)
+ [AWS::Greengrass::SubscriptionDefinitionVersion](aws-resource-greengrass-subscriptiondefinitionversion.md)

# AWS::Greengrass::ConnectorDefinition
<a name="aws-resource-greengrass-connectordefinition"></a>

The `AWS::Greengrass::ConnectorDefinition` resource represents a connector definition for AWS IoT Greengrass. Connector definitions are used to organize your connector definition versions.

Connector definitions can reference multiple connector definition versions. All connector definition versions must be associated with a connector definition. Each connector definition version can contain one or more connectors.

**Note**  
When you create a connector definition, you can optionally include an initial connector definition version. To associate a connector definition version later, create an [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-connectordefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-connectordefinitionversion.html) resource and specify the ID of this connector definition.  
After you create the connector definition version that contains the connectors 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-connectordefinition-syntax"></a>

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

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

```
{
  "Type" : "AWS::Greengrass::ConnectorDefinition",
  "Properties" : {
      "[InitialVersion](#cfn-greengrass-connectordefinition-initialversion)" : ConnectorDefinitionVersion,
      "[Name](#cfn-greengrass-connectordefinition-name)" : String,
      "[Tags](#cfn-greengrass-connectordefinition-tags)" : [ [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html), ... ]
    }
}
```

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

```
Type: AWS::Greengrass::ConnectorDefinition
Properties:
  [InitialVersion](#cfn-greengrass-connectordefinition-initialversion): 
    ConnectorDefinitionVersion
  [Name](#cfn-greengrass-connectordefinition-name): String
  [Tags](#cfn-greengrass-connectordefinition-tags): 
    - [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)
```

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

`InitialVersion`  <a name="cfn-greengrass-connectordefinition-initialversion"></a>
The connector definition version to include when the connector definition is created. A connector definition version contains a list of [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-connectordefinition-connector.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-connectordefinition-connector.html) property types.  
To associate a connector definition version after the connector definition is created, create an [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-connectordefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-connectordefinitionversion.html) resource and specify the ID of this connector definition.
*Required*: No  
*Type*: [ConnectorDefinitionVersion](aws-properties-greengrass-connectordefinition-connectordefinitionversion.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-greengrass-connectordefinition-name"></a>
The name of the connector definition.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-greengrass-connectordefinition-tags"></a>
Application-specific metadata to attach to the connector definition. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tagging Your AWS IoT Greengrass Resources](https://docs.aws.amazon.com/greengrass/v1/developerguide/tagging.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.  
This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in CloudFormation templates.  

```
"Tags": {
    "KeyName0": "value",
    "KeyName1": "value",
    "KeyName2": "value"
}
```
*Required*: No  
*Type*: Array of [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

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

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

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the connector definition, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

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-connectordefinition-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

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

#### 
<a name="aws-resource-greengrass-connectordefinition-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the `ConnectorDefinition`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/connectors/1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

`Id`  <a name="Id-fn::getatt"></a>
The ID of the `ConnectorDefinition`, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

`LatestVersionArn`  <a name="LatestVersionArn-fn::getatt"></a>
The ARN of the last `ConnectorDefinitionVersion` that was added to the `ConnectorDefinition`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/connectors/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2`. 

`Name`  <a name="Name-fn::getatt"></a>
The name of the `ConnectorDefinition`, such as `MyConnectorDefinition`. 

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



### Connector Definition Snippet
<a name="aws-resource-greengrass-connectordefinition--examples--Connector_Definition_Snippet"></a>

The following snippet defines a connector definition resource with an initial version that contains a connector.

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-connectordefinition--examples--Connector_Definition_Snippet--json"></a>

```
"TestConnectorDefinition": {
    "Type": "AWS::Greengrass::ConnectorDefinition",
    "Properties": {
        "Name": "DemoTestConnectorDefinition",
        "InitialVersion": {
            "Connectors": [
                {
                    "Id": "Connector1",
                    "ConnectorArn": {
                        "Fn::Join": [
                            ":",
                            [
                                "arn:aws:greengrass",
                                {
                                    "Ref": "AWS::Region"
                                },
                                ":/connectors/SNS/versions/1"
                            ]
                        ]
                    },
                    "Parameters": {
                        "DefaultSNSArn": {
                            "Fn::Join": [
                                ":",
                                [
                                    "arn:aws:sns",
                                    {
                                        "Ref": "AWS::Region"
                                    },
                                    {
                                        "Ref": "AWS::AccountId"
                                    },
                                    "defaultSns"
                                ]
                            ]
                        }
                    }
                }
            ]
        }
    }
}
```

#### YAML
<a name="aws-resource-greengrass-connectordefinition--examples--Connector_Definition_Snippet--yaml"></a>

```
TestConnectorDefinition:
  Type: 'AWS::Greengrass::ConnectorDefinition'
  Properties:
    Name: DemoTestConnectorDefinition
    InitialVersion:
      Connectors:
        - Id: Connector1
          ConnectorArn: !Join 
            - ':'
            - - 'arn:aws:greengrass'
              - !Ref 'AWS::Region'
              - ':/connectors/SNS/versions/1'
          Parameters:
            DefaultSNSArn: !Join 
              - ':'
              - - 'arn:aws:sns'
                - !Ref 'AWS::Region'
                - !Ref 'AWS::AccountId'
                - defaultSns
```

## See also
<a name="aws-resource-greengrass-connectordefinition--seealso"></a>
+ [CreateConnectorDefinition](https://docs.aws.amazon.com/greengrass/v1/apireference/createconnectordefinition-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::ConnectorDefinition Connector
<a name="aws-properties-greengrass-connectordefinition-connector"></a>

<a name="aws-properties-greengrass-connectordefinition-connector-description"></a>Connectors are modules that provide built-in integration with local infrastructure, device protocols, AWS, and other cloud services. For more information, see [Integrate with Services and Protocols Using Greengrass Connectors](https://docs.aws.amazon.com/greengrass/v1/developerguide/connectors.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-connectordefinitionversion-connector-inheritance"></a> In an CloudFormation template, the `Connectors` property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-connectordefinition-connectordefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-connectordefinition-connectordefinitionversion.html) property type contains a list of `Connector` property types.

## Syntax
<a name="aws-properties-greengrass-connectordefinition-connector-syntax"></a>

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

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

```
{
  "[ConnectorArn](#cfn-greengrass-connectordefinition-connector-connectorarn)" : String,
  "[Id](#cfn-greengrass-connectordefinition-connector-id)" : String,
  "[Parameters](#cfn-greengrass-connectordefinition-connector-parameters)" : Json
}
```

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

```
  [ConnectorArn](#cfn-greengrass-connectordefinition-connector-connectorarn): String
  [Id](#cfn-greengrass-connectordefinition-connector-id): String
  [Parameters](#cfn-greengrass-connectordefinition-connector-parameters): Json
```

## Properties
<a name="aws-properties-greengrass-connectordefinition-connector-properties"></a>

`ConnectorArn`  <a name="cfn-greengrass-connectordefinition-connector-connectorarn"></a>
The Amazon Resource Name (ARN) of the connector.  
For more information about connectors provided by AWS, see [Greengrass Connectors Provided by AWS](https://docs.aws.amazon.com/greengrass/v1/developerguide/connectors-list.html).  
*Required*: Yes  
*Type*: String  
*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-connectordefinition-connector-id"></a>
A descriptive or arbitrary ID for the connector. This value must be unique within the connector 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)

`Parameters`  <a name="cfn-greengrass-connectordefinition-connector-parameters"></a>
The parameters or configuration used by the connector.  
For more information about connectors provided by AWS, see [Greengrass Connectors Provided by AWS](https://docs.aws.amazon.com/greengrass/v1/developerguide/connectors-list.html).  
*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-connectordefinition-connector--seealso"></a>
+ [Connector](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-connector.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::ConnectorDefinition ConnectorDefinitionVersion
<a name="aws-properties-greengrass-connectordefinition-connectordefinitionversion"></a>

<a name="aws-properties-greengrass-connectordefinition-connectordefinitionversion-description"></a>A connector definition version contains a list of connectors.

**Note**  
After you create a connector definition version that contains the connectors 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).

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

## Syntax
<a name="aws-properties-greengrass-connectordefinition-connectordefinitionversion-syntax"></a>

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

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

```
{
  "[Connectors](#cfn-greengrass-connectordefinition-connectordefinitionversion-connectors)" : [ Connector, ... ]
}
```

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

```
  [Connectors](#cfn-greengrass-connectordefinition-connectordefinitionversion-connectors): 
    - Connector
```

## Properties
<a name="aws-properties-greengrass-connectordefinition-connectordefinitionversion-properties"></a>

`Connectors`  <a name="cfn-greengrass-connectordefinition-connectordefinitionversion-connectors"></a>
The connectors in this version. Only one instance of a given connector can be added to a connector definition version at a time.  
*Required*: Yes  
*Type*: Array of [Connector](aws-properties-greengrass-connectordefinition-connector.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-connectordefinition-connectordefinitionversion--seealso"></a>
+ [ConnectorDefinitionVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-connectordefinitionversion.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::ConnectorDefinitionVersion
<a name="aws-resource-greengrass-connectordefinitionversion"></a>

The `AWS::Greengrass::ConnectorDefinitionVersion` resource represents a connector definition version for AWS IoT Greengrass. A connector definition version contains a list of connectors.

**Note**  
To create a connector definition version, you must specify the ID of the connector definition that you want to associate with the version. For information about creating a connector definition, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-connectordefinition.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-connectordefinition.html).  
After you create a connector definition version that contains the connectors 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-connectordefinitionversion-syntax"></a>

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

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

```
{
  "Type" : "AWS::Greengrass::ConnectorDefinitionVersion",
  "Properties" : {
      "[ConnectorDefinitionId](#cfn-greengrass-connectordefinitionversion-connectordefinitionid)" : String,
      "[Connectors](#cfn-greengrass-connectordefinitionversion-connectors)" : [ Connector, ... ]
    }
}
```

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

```
Type: AWS::Greengrass::ConnectorDefinitionVersion
Properties:
  [ConnectorDefinitionId](#cfn-greengrass-connectordefinitionversion-connectordefinitionid): String
  [Connectors](#cfn-greengrass-connectordefinitionversion-connectors): 
    - Connector
```

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

`ConnectorDefinitionId`  <a name="cfn-greengrass-connectordefinitionversion-connectordefinitionid"></a>
The ID of the connector 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)

`Connectors`  <a name="cfn-greengrass-connectordefinitionversion-connectors"></a>
The connectors in this version. Only one instance of a given connector can be added to the connector definition version at a time.  
*Required*: Yes  
*Type*: Array of [Connector](aws-properties-greengrass-connectordefinitionversion-connector.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-connectordefinitionversion-return-values"></a>

### Ref
<a name="aws-resource-greengrass-connectordefinitionversion-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 connector definition version, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/connectors/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-connectordefinitionversion-return-values-fn--getatt"></a>

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



### Connector Definition Version Snippet
<a name="aws-resource-greengrass-connectordefinitionversion--examples--Connector_Definition_Version_Snippet"></a>

The following snippet defines connector definition and connector definition version resources. The connector definition version references the connector definition and contains a connector.

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-connectordefinitionversion--examples--Connector_Definition_Version_Snippet--json"></a>

```
"TestConnectorDefinition": {
    "Type": "AWS::Greengrass::ConnectorDefinition",
    "Properties": {
        "Name": "DemoTestConnectorDefinition"
    }
},
"TestConnectorDefinitionVersion": {
    "Type": "AWS::Greengrass::ConnectorDefinitionVersion",
    "Properties": {
        "ConnectorDefinitionId": {
            "Ref": "TestConnectorDefinition"
        },
        "Connectors": [
            {
                "Id": "Connector1",
                "ConnectorArn": {
                    "Fn::Join": [
                        ":",
                        [
                            "arn:aws:greengrass",
                            {
                                "Ref": "AWS::Region"
                            },
                            ":/connectors/SNS/versions/1"
                        ]
                    ]
                },
                "Parameters": {
                    "DefaultSNSArn": {
                        "Fn::Join": [
                            ":",
                            [
                                "arn:aws:sns",
                                {
                                    "Ref": "AWS::Region"
                                },
                                {
                                    "Ref": "AWS::AccountId"
                                },
                                "defaultSns"
                            ]
                        ]
                    }
                }
            }
        ]
    }
}
```

#### YAML
<a name="aws-resource-greengrass-connectordefinitionversion--examples--Connector_Definition_Version_Snippet--yaml"></a>

```
TestConnectorDefinition:
  Type: 'AWS::Greengrass::ConnectorDefinition'
  Properties:
    Name: DemoTestConnectorDefinition
TestConnectorDefinitionVersion:
  Type: 'AWS::Greengrass::ConnectorDefinitionVersion'
  Properties:
    ConnectorDefinitionId: !Ref TestConnectorDefinition
    Connectors:
      - Id: Connector1
        ConnectorArn: !Join 
          - ':'
          - - 'arn:aws:greengrass'
            - !Ref 'AWS::Region'
            - ':/connectors/SNS/versions/1'
        Parameters:
          DefaultSNSArn: !Join 
            - ':'
            - - 'arn:aws:sns'
              - !Ref 'AWS::Region'
              - !Ref 'AWS::AccountId'
              - defaultSns
```

## See also
<a name="aws-resource-greengrass-connectordefinitionversion--seealso"></a>
+ [CreateConnectorDefinitionVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/createconnectordefinitionversion-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::ConnectorDefinitionVersion Connector
<a name="aws-properties-greengrass-connectordefinitionversion-connector"></a>

<a name="aws-properties-greengrass-connectordefinitionversion-connector-description"></a>Connectors are modules that provide built-in integration with local infrastructure, device protocols, AWS, and other cloud services. For more information, see [Integrate with Services and Protocols Using Greengrass Connectors](https://docs.aws.amazon.com/greengrass/v1/developerguide/connectors.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

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

## Syntax
<a name="aws-properties-greengrass-connectordefinitionversion-connector-syntax"></a>

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

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

```
{
  "[ConnectorArn](#cfn-greengrass-connectordefinitionversion-connector-connectorarn)" : String,
  "[Id](#cfn-greengrass-connectordefinitionversion-connector-id)" : String,
  "[Parameters](#cfn-greengrass-connectordefinitionversion-connector-parameters)" : Json
}
```

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

```
  [ConnectorArn](#cfn-greengrass-connectordefinitionversion-connector-connectorarn): String
  [Id](#cfn-greengrass-connectordefinitionversion-connector-id): String
  [Parameters](#cfn-greengrass-connectordefinitionversion-connector-parameters): Json
```

## Properties
<a name="aws-properties-greengrass-connectordefinitionversion-connector-properties"></a>

`ConnectorArn`  <a name="cfn-greengrass-connectordefinitionversion-connector-connectorarn"></a>
The Amazon Resource Name (ARN) of the connector.  
For more information about connectors provided by AWS, see [Greengrass Connectors Provided by AWS](https://docs.aws.amazon.com/greengrass/v1/developerguide/connectors-list.html).  
*Required*: Yes  
*Type*: String  
*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-connectordefinitionversion-connector-id"></a>
A descriptive or arbitrary ID for the connector. This value must be unique within the connector 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)

`Parameters`  <a name="cfn-greengrass-connectordefinitionversion-connector-parameters"></a>
The parameters or configuration that the connector uses.  
For more information about connectors provided by AWS, see [Greengrass Connectors Provided by AWS](https://docs.aws.amazon.com/greengrass/v1/developerguide/connectors-list.html).  
*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-connectordefinitionversion-connector--seealso"></a>
+ [Connector](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-connector.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::CoreDefinition
<a name="aws-resource-greengrass-coredefinition"></a>

The `AWS::Greengrass::CoreDefinition` resource represents a core definition for AWS IoT Greengrass. Core definitions are used to organize your core definition versions.

Core definitions can reference multiple core definition versions. All core definition versions must be associated with a core definition. Each core definition version can contain one Greengrass core.

**Note**  
When you create a core definition, you can optionally include an initial core definition version. To associate a core definition version later, create an [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-coredefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-coredefinitionversion.html) resource and specify the ID of this core definition.  
After you create the core definition version that contains the core 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-coredefinition-syntax"></a>

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

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

```
{
  "Type" : "AWS::Greengrass::CoreDefinition",
  "Properties" : {
      "[InitialVersion](#cfn-greengrass-coredefinition-initialversion)" : CoreDefinitionVersion,
      "[Name](#cfn-greengrass-coredefinition-name)" : String,
      "[Tags](#cfn-greengrass-coredefinition-tags)" : [ [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html), ... ]
    }
}
```

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

```
Type: AWS::Greengrass::CoreDefinition
Properties:
  [InitialVersion](#cfn-greengrass-coredefinition-initialversion): 
    CoreDefinitionVersion
  [Name](#cfn-greengrass-coredefinition-name): String
  [Tags](#cfn-greengrass-coredefinition-tags): 
    - [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)
```

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

`InitialVersion`  <a name="cfn-greengrass-coredefinition-initialversion"></a>
The core definition version to include when the core definition is created. Currently, a core definition version can contain only one [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-coredefinition-core.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-coredefinition-core.html).  
To associate a core definition version after the core definition is created, create an [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-coredefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-coredefinitionversion.html) resource and specify the ID of this core definition.
*Required*: No  
*Type*: [CoreDefinitionVersion](aws-properties-greengrass-coredefinition-coredefinitionversion.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-greengrass-coredefinition-name"></a>
The name of the core definition.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-greengrass-coredefinition-tags"></a>
Application-specific metadata to attach to the core definition. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tagging Your AWS IoT Greengrass Resources](https://docs.aws.amazon.com/greengrass/v1/developerguide/tagging.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.  
This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in CloudFormation templates.  

```
"Tags": {
    "KeyName0": "value",
    "KeyName1": "value",
    "KeyName2": "value"
}
```
*Required*: No  
*Type*: Array of [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

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

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

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the core definition, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

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-coredefinition-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

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

#### 
<a name="aws-resource-greengrass-coredefinition-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the `CoreDefinition`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/cores/1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

`Id`  <a name="Id-fn::getatt"></a>
The ID of the `CoreDefinition`, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

`LatestVersionArn`  <a name="LatestVersionArn-fn::getatt"></a>
The ARN of the last `CoreDefinitionVersion` that was added to the `CoreDefinition`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/cores/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2`. 

`Name`  <a name="Name-fn::getatt"></a>
The name of the `CoreDefinition`, such as `MyCoreDefinition`. 

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



### Create a Core Definition
<a name="aws-resource-greengrass-coredefinition--examples--Create_a_Core_Definition"></a>

The following example creates a core definition that specifies an initial version that contains a core.

The template uses the `Ref` function to return the ID of the core definition for the `CoreDefinitionId` property, which associates the version with the core definition. The template uses parameters to represent the core definition name and the ID, thing ARN, and certificate ARN to use for the core. It also outputs the ID of the new core definition.

For another template example, 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-coredefinition--examples--Create_a_Core_Definition--json"></a>

```
{
    "Description": "Create CoreDefinition with InitialVersion",
    "Parameters": {
        "CoreDefinitionName": {
            "Type": "String",
            "Default": "TestCoreDefinition"
        },
        "CoreId": {
            "Type": "String",
            "Default": "TestCoreId"
        },
        "CoreThingArn": {
            "Type": "String",
            "Default": "TestCoreThingArn"
        },
        "CoreCertificateArn": {
            "Type": "String",
            "Default": "TestCoreCertArn"
        }
    },
    "Resources": {
        "CoreDefinition": {
            "Type": "AWS::Greengrass::CoreDefinition",
            "Properties": {
                "Name": {
                    "Ref": "CoreDefinitionName"
                },
                "InitialVersion": {
                    "Cores": [
                        {
                            "Id": {
                                "Ref": "CoreId"
                            },
                            "ThingArn": {
                                "Ref": "CoreThingArn"
                            },
                            "CertificateArn": {
                                "Ref": "CoreCertificateArn"
                            },
                            "SyncShadow": "true"
                        }
                    ]
                }
            }
        }
    },
    "Outputs": {
        "CoreDefinitionId": {
            "Value": {
                "Ref": "CoreDefinition"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-greengrass-coredefinition--examples--Create_a_Core_Definition--yaml"></a>

```
Description: Create CoreDefinition with InitialVersion
Parameters:
  CoreDefinitionName:
    Type: String
    Default: TestCoreDefinition
  CoreId:
    Type: String
    Default: TestCoreId
  CoreThingArn:
    Type: String
    Default: TestCoreThingArn
  CoreCertificateArn:
    Type: String
    Default: TestCoreCertArn
Resources:
  CoreDefinition:
    Type: 'AWS::Greengrass::CoreDefinition'
    Properties:
      Name: !Ref CoreDefinitionName
      InitialVersion:
        Cores:
          - Id: !Ref CoreId
            ThingArn: !Ref CoreThingArn
            CertificateArn: !Ref CoreCertificateArn
            SyncShadow: 'true'
Outputs:
  CoreDefinitionId:
    Value: !Ref CoreDefinition
```

## See also
<a name="aws-resource-greengrass-coredefinition--seealso"></a>
+ [CreateCoreDefinition](https://docs.aws.amazon.com/greengrass/v1/apireference/createcoredefinition-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::CoreDefinition Core
<a name="aws-properties-greengrass-coredefinition-core"></a>

<a name="aws-properties-greengrass-coredefinition-core-description"></a> A core is an AWS IoT device that runs the AWS IoT Greengrass core software and manages local processes for a Greengrass group. For more information, see [What Is AWS IoT Greengrass?](https://docs.aws.amazon.com/greengrass/v1/developerguide/what-is-gg.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-coredefinition-core-inheritance"></a> In an CloudFormation template, the `Cores` property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-coredefinition-coredefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-coredefinition-coredefinitionversion.html) property type contains a list of `Core` property types. Currently, the list can contain only one core.

## Syntax
<a name="aws-properties-greengrass-coredefinition-core-syntax"></a>

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

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

```
{
  "[CertificateArn](#cfn-greengrass-coredefinition-core-certificatearn)" : String,
  "[Id](#cfn-greengrass-coredefinition-core-id)" : String,
  "[SyncShadow](#cfn-greengrass-coredefinition-core-syncshadow)" : Boolean,
  "[ThingArn](#cfn-greengrass-coredefinition-core-thingarn)" : String
}
```

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

```
  [CertificateArn](#cfn-greengrass-coredefinition-core-certificatearn): String
  [Id](#cfn-greengrass-coredefinition-core-id): String
  [SyncShadow](#cfn-greengrass-coredefinition-core-syncshadow): Boolean
  [ThingArn](#cfn-greengrass-coredefinition-core-thingarn): String
```

## Properties
<a name="aws-properties-greengrass-coredefinition-core-properties"></a>

`CertificateArn`  <a name="cfn-greengrass-coredefinition-core-certificatearn"></a>
The Amazon Resource Name (ARN) of the device certificate for the core. This X.509 certificate is used to authenticate the core with AWS IoT and AWS IoT Greengrass services.  
*Required*: Yes  
*Type*: String  
*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-coredefinition-core-id"></a>
A descriptive or arbitrary ID for the core. This value must be unique within the core 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)

`SyncShadow`  <a name="cfn-greengrass-coredefinition-core-syncshadow"></a>
Indicates whether the core's local shadow is synced with the cloud automatically. The default 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)

`ThingArn`  <a name="cfn-greengrass-coredefinition-core-thingarn"></a>
The ARN of the core, which is an AWS IoT device (thing).  
*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-coredefinition-core--seealso"></a>
+ [Core](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-core.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::CoreDefinition CoreDefinitionVersion
<a name="aws-properties-greengrass-coredefinition-coredefinitionversion"></a>

<a name="aws-properties-greengrass-coredefinition-coredefinitionversion-description"></a> A core definition version contains a Greengrass [core](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-coredefinition-core.html).

**Note**  
After you create a core definition version that contains the core 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).

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

## Syntax
<a name="aws-properties-greengrass-coredefinition-coredefinitionversion-syntax"></a>

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

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

```
{
  "[Cores](#cfn-greengrass-coredefinition-coredefinitionversion-cores)" : [ Core, ... ]
}
```

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

```
  [Cores](#cfn-greengrass-coredefinition-coredefinitionversion-cores): 
    - Core
```

## Properties
<a name="aws-properties-greengrass-coredefinition-coredefinitionversion-properties"></a>

`Cores`  <a name="cfn-greengrass-coredefinition-coredefinitionversion-cores"></a>
The Greengrass core in this version. Currently, the `Cores` property for a core definition version can contain only one core.  
*Required*: Yes  
*Type*: Array of [Core](aws-properties-greengrass-coredefinition-core.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-coredefinition-coredefinitionversion--seealso"></a>
+ [CoreDefinitionVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-coredefinitionversion.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::CoreDefinitionVersion
<a name="aws-resource-greengrass-coredefinitionversion"></a>

The `AWS::Greengrass::CoreDefinitionVersion` resource represents a core definition version for AWS IoT Greengrass. A core definition version contains a Greengrass core.

**Note**  
To create a core definition version, you must specify the ID of the core definition that you want to associate with the version. For information about creating a core definition, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-coredefinition.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-coredefinition.html).  
After you create a core definition version that contains the core 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-coredefinitionversion-syntax"></a>

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

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

```
{
  "Type" : "AWS::Greengrass::CoreDefinitionVersion",
  "Properties" : {
      "[CoreDefinitionId](#cfn-greengrass-coredefinitionversion-coredefinitionid)" : String,
      "[Cores](#cfn-greengrass-coredefinitionversion-cores)" : [ Core, ... ]
    }
}
```

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

```
Type: AWS::Greengrass::CoreDefinitionVersion
Properties:
  [CoreDefinitionId](#cfn-greengrass-coredefinitionversion-coredefinitionid): String
  [Cores](#cfn-greengrass-coredefinitionversion-cores): 
    - Core
```

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

`CoreDefinitionId`  <a name="cfn-greengrass-coredefinitionversion-coredefinitionid"></a>
The ID of the core 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)

`Cores`  <a name="cfn-greengrass-coredefinitionversion-cores"></a>
The Greengrass core in this version. Currently, the `Cores` property for a core definition version can contain only one core.  
*Required*: Yes  
*Type*: Array of [Core](aws-properties-greengrass-coredefinitionversion-core.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-coredefinitionversion-return-values"></a>

### Ref
<a name="aws-resource-greengrass-coredefinitionversion-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 core definition version, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/cores/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-coredefinitionversion-return-values-fn--getatt"></a>

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



### Create a Core Definition Version
<a name="aws-resource-greengrass-coredefinitionversion--examples--Create_a_Core_Definition_Version"></a>

The following example creates two resources: a core definition and a core definition version that contains a core.

The template uses the `Ref` function to provide the `CoreDefinitionId` for the core definition version (which associates the version with the core definition). The template uses parameters to represent the core definition name and the ID, thing ARN, and certificate ARN to use for the core. It also outputs the ID of the new core definition and the ARN of the new core definition version.

For another template example, 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-coredefinitionversion--examples--Create_a_Core_Definition_Version--json"></a>

```
{
    "Description": "Create CoreDefinition and associated CoreDefinitionVersion",
    "Parameters": {
        "CoreDefinitionName": {
            "Type": "String",
            "Default": "TestCoreDefinition"
        },
        "CoreId": {
            "Type": "String",
            "Default": "TestCoreId"
        },
        "CoreThingArn": {
            "Type": "String",
            "Default": "TestCoreThingArn"
        },
        "CoreCertificateArn": {
            "Type": "String",
            "Default": "TestCoreCertArn"
        }
    },
    "Resources": {
        "CoreDefinition": {
            "Type": "AWS::Greengrass::CoreDefinition",
            "Properties": {
                "Name": {
                    "Ref": "CoreDefinitionName"
                }
            }
        },
        "CoreDefinitionVersion": {
            "Type": "AWS::Greengrass::CoreDefinitionVersion",
            "Properties": {
                "CoreDefinitionId": {
                    "Ref": "CoreDefinition"
                },
                "Cores": [
                    {
                        "Id": {
                            "Ref": "CoreId"
                        },
                        "CertificateArn": {
                            "Ref": "CoreCertificateArn"
                        },
                        "ThingArn": {
                            "Ref": "CoreThingArn"
                        },
                        "SyncShadow": "true"
                    }
                ]
            }
        }
    },
    "Outputs": {
        "CoreDefinitionId": {
            "Value": {
                "Ref": "CoreDefinition"
            }
        },
        "CoreDefinitionVersionArn": {
            "Value": {
                "Ref": "CoreDefinitionVersion"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-greengrass-coredefinitionversion--examples--Create_a_Core_Definition_Version--yaml"></a>

```
Description: Create CoreDefinition and associated CoreDefinitionVersion
Parameters:
  CoreDefinitionName:
    Type: String
    Default: TestCoreDefinition
  CoreId:
    Type: String
    Default: TestCoreId
  CoreThingArn:
    Type: String
    Default: TestCoreThingArn
  CoreCertificateArn:
    Type: String
    Default: TestCoreCertArn
Resources:
  CoreDefinition:
    Type: 'AWS::Greengrass::CoreDefinition'
    Properties:
      Name: !Ref CoreDefinitionName
  CoreDefinitionVersion:
    Type: 'AWS::Greengrass::CoreDefinitionVersion'
    Properties:
      CoreDefinitionId: !Ref CoreDefinition
      Cores:
        - Id: !Ref CoreId
          CertificateArn: !Ref CoreCertificateArn
          ThingArn: !Ref CoreThingArn
          SyncShadow: 'true'
Outputs:
  CoreDefinitionId:
    Value: !Ref CoreDefinition
  CoreDefinitionVersionArn:
    Value: !Ref CoreDefinitionVersion
```

## See also
<a name="aws-resource-greengrass-coredefinitionversion--seealso"></a>
+ [CreateCoreDefinitionVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/createcoredefinitionversion-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::CoreDefinitionVersion Core
<a name="aws-properties-greengrass-coredefinitionversion-core"></a>

<a name="aws-properties-greengrass-coredefinitionversion-core-description"></a> A core is an AWS IoT device that runs the AWS IoT Greengrass core software and manages local processes for a Greengrass group. For more information, see [What Is AWS IoT Greengrass?](https://docs.aws.amazon.com/greengrass/v1/developerguide/what-is-gg.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-coredefinitionversion-core-inheritance"></a> In an CloudFormation template, the `Cores` property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-coredefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-coredefinitionversion.html) resource contains a list of `Core` property types. Currently, the list can contain only one core.

## Syntax
<a name="aws-properties-greengrass-coredefinitionversion-core-syntax"></a>

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

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

```
{
  "[CertificateArn](#cfn-greengrass-coredefinitionversion-core-certificatearn)" : String,
  "[Id](#cfn-greengrass-coredefinitionversion-core-id)" : String,
  "[SyncShadow](#cfn-greengrass-coredefinitionversion-core-syncshadow)" : Boolean,
  "[ThingArn](#cfn-greengrass-coredefinitionversion-core-thingarn)" : String
}
```

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

```
  [CertificateArn](#cfn-greengrass-coredefinitionversion-core-certificatearn): String
  [Id](#cfn-greengrass-coredefinitionversion-core-id): String
  [SyncShadow](#cfn-greengrass-coredefinitionversion-core-syncshadow): Boolean
  [ThingArn](#cfn-greengrass-coredefinitionversion-core-thingarn): String
```

## Properties
<a name="aws-properties-greengrass-coredefinitionversion-core-properties"></a>

`CertificateArn`  <a name="cfn-greengrass-coredefinitionversion-core-certificatearn"></a>
The ARN of the device certificate for the core. This X.509 certificate is used to authenticate the core with AWS IoT and AWS IoT Greengrass services.  
*Required*: Yes  
*Type*: String  
*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-coredefinitionversion-core-id"></a>
A descriptive or arbitrary ID for the core. This value must be unique within the core 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)

`SyncShadow`  <a name="cfn-greengrass-coredefinitionversion-core-syncshadow"></a>
Indicates whether the core's local shadow is synced with the cloud automatically. The default 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)

`ThingArn`  <a name="cfn-greengrass-coredefinitionversion-core-thingarn"></a>
The Amazon Resource Name (ARN) of the core, which is an AWS IoT device (thing).  
*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-coredefinitionversion-core--seealso"></a>
+ [Core](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-core.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::DeviceDefinition
<a name="aws-resource-greengrass-devicedefinition"></a>

The `AWS::Greengrass::DeviceDefinition` resource represents a device definition for AWS IoT Greengrass. Device definitions are used to organize your device definition versions.

Device definitions can reference multiple device definition versions. All device definition versions must be associated with a device definition. Each device definition version can contain one or more devices.

**Note**  
When you create a device definition, you can optionally include an initial device definition version. To associate a device definition version later, create an [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-devicedefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-devicedefinitionversion.html) resource and specify the ID of this device definition.  
After you create the device definition version that contains the devices 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-devicedefinition-syntax"></a>

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

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

```
{
  "Type" : "AWS::Greengrass::DeviceDefinition",
  "Properties" : {
      "[InitialVersion](#cfn-greengrass-devicedefinition-initialversion)" : DeviceDefinitionVersion,
      "[Name](#cfn-greengrass-devicedefinition-name)" : String,
      "[Tags](#cfn-greengrass-devicedefinition-tags)" : [ [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html), ... ]
    }
}
```

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

```
Type: AWS::Greengrass::DeviceDefinition
Properties:
  [InitialVersion](#cfn-greengrass-devicedefinition-initialversion): 
    DeviceDefinitionVersion
  [Name](#cfn-greengrass-devicedefinition-name): String
  [Tags](#cfn-greengrass-devicedefinition-tags): 
    - [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)
```

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

`InitialVersion`  <a name="cfn-greengrass-devicedefinition-initialversion"></a>
The device definition version to include when the device definition is created. A device definition version contains a list of [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-devicedefinition-device.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-devicedefinition-device.html) property types.  
To associate a device definition version after the device definition is created, create an [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-devicedefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-devicedefinitionversion.html) resource and specify the ID of this device definition.
*Required*: No  
*Type*: [DeviceDefinitionVersion](aws-properties-greengrass-devicedefinition-devicedefinitionversion.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-greengrass-devicedefinition-name"></a>
The name of the device definition.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-greengrass-devicedefinition-tags"></a>
Application-specific metadata to attach to the device definition. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tagging Your AWS IoT Greengrass Resources](https://docs.aws.amazon.com/greengrass/v1/developerguide/tagging.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.  
This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in CloudFormation templates.  

```
"Tags": {
    "KeyName0": "value",
    "KeyName1": "value",
    "KeyName2": "value"
}
```
*Required*: No  
*Type*: Array of [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

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

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

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the device definition, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

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-devicedefinition-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

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

#### 
<a name="aws-resource-greengrass-devicedefinition-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the `DeviceDefinition`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/devices/1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

`Id`  <a name="Id-fn::getatt"></a>
The ID of the `DeviceDefinition`, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

`LatestVersionArn`  <a name="LatestVersionArn-fn::getatt"></a>
The ARN of the last `DeviceDefinitionVersion` that was added to the `DeviceDefinition`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/devices/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2`. 

`Name`  <a name="Name-fn::getatt"></a>
The name of the device definition.

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



### Device Definition Snippet
<a name="aws-resource-greengrass-devicedefinition--examples--Device_Definition_Snippet"></a>

The following snippet defines a device definition resource with an initial version that contains a device. This example points to a manually generated device certificate.

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-devicedefinition--examples--Device_Definition_Snippet--json"></a>

```
"TestDeviceDefinition": {
    "Type": "AWS::Greengrass::DeviceDefinition",
    "Properties": {
        "Name": "DemoTestDeviceDefinition",
        "InitialVersion": {
            "Devices": [
                {
                    "Id": "TestDevice1",
                    "ThingArn": {
                        "Fn::Join": [
                            ":",
                            [
                                "arn:aws:iot",
                                {
                                    "Ref": "AWS::Region"
                                },
                                {
                                    "Ref": "AWS::AccountId"
                                },
                                "thing/TestDevice1"
                            ]
                        ]
                    },
                    "CertificateArn": {
                        "Fn::Join": [
                            ":",
                            [
                                "arn:aws:iot",
                                {
                                    "Ref": "AWS::Region"
                                },
                                {
                                    "Ref": "AWS::AccountId"
                                },
                                "cert/4db8b7f58d95b7fdb45c38c28a0b1adf6c5f8c03e902de65734935fea83e751f"
                            ]
                        ]
                    },
                    "SyncShadow": "true"
                }
            ]
        }
    }
}
```

#### YAML
<a name="aws-resource-greengrass-devicedefinition--examples--Device_Definition_Snippet--yaml"></a>

```
TestDeviceDefinition:
  Type: 'AWS::Greengrass::DeviceDefinition'
  Properties:
    Name: DemoTestDeviceDefinition
    InitialVersion:
      Devices:
        - Id: TestDevice1
          ThingArn: !Join 
            - ':'
            - - 'arn:aws:iot'
              - !Ref 'AWS::Region'
              - !Ref 'AWS::AccountId'
              - thing/TestDevice1
          CertificateArn: !Join 
            - ':'
            - - 'arn:aws:iot'
              - !Ref 'AWS::Region'
              - !Ref 'AWS::AccountId'
              - >-
                cert/4db8b7f58d95b7fdb45c38c28a0b1adf6c5f8c03e902de65734935fea83e751f
          SyncShadow: 'true'
```

## See also
<a name="aws-resource-greengrass-devicedefinition--seealso"></a>
+ [CreateDeviceDefinition](https://docs.aws.amazon.com/greengrass/v1/apireference/createdevicedefinition-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::DeviceDefinition Device
<a name="aws-properties-greengrass-devicedefinition-device"></a>

<a name="aws-properties-greengrass-devicedefinition-device-description"></a> A device is an AWS IoT device (thing) that's added to a Greengrass group. Greengrass devices can communicate with the Greengrass core in the same group. For more information, see [What Is AWS IoT Greengrass?](https://docs.aws.amazon.com/greengrass/v1/developerguide/what-is-gg.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-devicedefinition-device-inheritance"></a> In an CloudFormation template, the `Devices` property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-devicedefinition-devicedefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-devicedefinition-devicedefinitionversion.html) property type contains a list of `Device` property types.

## Syntax
<a name="aws-properties-greengrass-devicedefinition-device-syntax"></a>

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

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

```
{
  "[CertificateArn](#cfn-greengrass-devicedefinition-device-certificatearn)" : String,
  "[Id](#cfn-greengrass-devicedefinition-device-id)" : String,
  "[SyncShadow](#cfn-greengrass-devicedefinition-device-syncshadow)" : Boolean,
  "[ThingArn](#cfn-greengrass-devicedefinition-device-thingarn)" : String
}
```

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

```
  [CertificateArn](#cfn-greengrass-devicedefinition-device-certificatearn): String
  [Id](#cfn-greengrass-devicedefinition-device-id): String
  [SyncShadow](#cfn-greengrass-devicedefinition-device-syncshadow): Boolean
  [ThingArn](#cfn-greengrass-devicedefinition-device-thingarn): String
```

## Properties
<a name="aws-properties-greengrass-devicedefinition-device-properties"></a>

`CertificateArn`  <a name="cfn-greengrass-devicedefinition-device-certificatearn"></a>
The Amazon Resource Name (ARN) of the device certificate for the device. This X.509 certificate is used to authenticate the device with AWS IoT and AWS IoT Greengrass services.  
*Required*: Yes  
*Type*: String  
*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-devicedefinition-device-id"></a>
A descriptive or arbitrary ID for the device. This value must be unique within the device 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)

`SyncShadow`  <a name="cfn-greengrass-devicedefinition-device-syncshadow"></a>
Indicates whether the device's local shadow is synced with the cloud automatically.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ThingArn`  <a name="cfn-greengrass-devicedefinition-device-thingarn"></a>
The ARN of the device, which is an AWS IoT device (thing).  
*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-devicedefinition-device--seealso"></a>
+ [Device](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-device.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::DeviceDefinition DeviceDefinitionVersion
<a name="aws-properties-greengrass-devicedefinition-devicedefinitionversion"></a>

<a name="aws-properties-greengrass-devicedefinition-devicedefinitionversion-description"></a> A device definition version contains a list of [devices](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-devicedefinition-device.html).

**Note**  
After you create a device definition version that contains the devices 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).

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

## Syntax
<a name="aws-properties-greengrass-devicedefinition-devicedefinitionversion-syntax"></a>

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

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

```
{
  "[Devices](#cfn-greengrass-devicedefinition-devicedefinitionversion-devices)" : [ Device, ... ]
}
```

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

```
  [Devices](#cfn-greengrass-devicedefinition-devicedefinitionversion-devices): 
    - Device
```

## Properties
<a name="aws-properties-greengrass-devicedefinition-devicedefinitionversion-properties"></a>

`Devices`  <a name="cfn-greengrass-devicedefinition-devicedefinitionversion-devices"></a>
The devices in this version.  
*Required*: Yes  
*Type*: Array of [Device](aws-properties-greengrass-devicedefinition-device.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-devicedefinition-devicedefinitionversion--seealso"></a>
+ [DeviceDefinitionVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-devicedefinitionversion.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::DeviceDefinitionVersion
<a name="aws-resource-greengrass-devicedefinitionversion"></a>

The `AWS::Greengrass::DeviceDefinitionVersion` resource represents a device definition version for AWS IoT Greengrass. A device definition version contains a list of devices.

**Note**  
To create a device definition version, you must specify the ID of the device definition that you want to associate with the version. For information about creating a device definition, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-devicedefinition.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-devicedefinition.html).  
After you create a device definition version that contains the devices 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-devicedefinitionversion-syntax"></a>

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

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

```
{
  "Type" : "AWS::Greengrass::DeviceDefinitionVersion",
  "Properties" : {
      "[DeviceDefinitionId](#cfn-greengrass-devicedefinitionversion-devicedefinitionid)" : String,
      "[Devices](#cfn-greengrass-devicedefinitionversion-devices)" : [ Device, ... ]
    }
}
```

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

```
Type: AWS::Greengrass::DeviceDefinitionVersion
Properties:
  [DeviceDefinitionId](#cfn-greengrass-devicedefinitionversion-devicedefinitionid): String
  [Devices](#cfn-greengrass-devicedefinitionversion-devices): 
    - Device
```

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

`DeviceDefinitionId`  <a name="cfn-greengrass-devicedefinitionversion-devicedefinitionid"></a>
The ID of the device 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)

`Devices`  <a name="cfn-greengrass-devicedefinitionversion-devices"></a>
The devices in this version.  
*Required*: Yes  
*Type*: Array of [Device](aws-properties-greengrass-devicedefinitionversion-device.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-devicedefinitionversion-return-values"></a>

### Ref
<a name="aws-resource-greengrass-devicedefinitionversion-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 device definition version, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/devices/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-devicedefinitionversion-return-values-fn--getatt"></a>

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



### Device Definition Version Snippet
<a name="aws-resource-greengrass-devicedefinitionversion--examples--Device_Definition_Version_Snippet"></a>

The following snippet defines device definition and device definition version resources. The device definition version references the device definition and contains a device. This example points to a manually generated device certificate.

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-devicedefinitionversion--examples--Device_Definition_Version_Snippet--json"></a>

```
"TestDeviceDefinition": {
    "Type": "AWS::Greengrass::DeviceDefinition",
    "Properties": {
        "Name": "DemoTestDeviceDefinition"
    }
},
"TestDeviceDefinitionVersion": {
    "Type": "AWS::Greengrass::DeviceDefinitionVersion",
    "Properties": {
        "DeviceDefinitionId": {
            "Fn::GetAtt": [
                "TestDeviceDefinition",
                "Id"
            ]
        },
        "Devices": [
            {
                "Id": "TestDevice1",
                "CertificateArn": {
                    "Fn::Join": [
                        ":",
                        [
                            "arn:aws:iot",
                            {
                                "Ref": "AWS::Region"
                            },
                            {
                                "Ref": "AWS::AccountId"
                            },
                            "cert/4db8b7f58d95b7fdb45c38c28a0b1adf6c5f8c03e902de65734935fea83e751f"
                        ]
                    ]
                },
                "SyncShadow": "true",
                "ThingArn": {
                    "Fn::Join": [
                        ":",
                        [
                            "arn:aws:iot",
                            {
                                "Ref": "AWS::Region"
                            },
                            {
                                "Ref": "AWS::AccountId"
                            },
                            "thing/TestDevice1"
                        ]
                    ]
                }
            }
        ]
    }
}
```

#### YAML
<a name="aws-resource-greengrass-devicedefinitionversion--examples--Device_Definition_Version_Snippet--yaml"></a>

```
TestDeviceDefinition:
  Type: 'AWS::Greengrass::DeviceDefinition'
  Properties:
    Name: DemoTestDeviceDefinition
TestDeviceDefinitionVersion:
  Type: 'AWS::Greengrass::DeviceDefinitionVersion'
  Properties:
    DeviceDefinitionId: !GetAtt 
      - TestDeviceDefinition
      - Id
    Devices:
      - Id: TestDevice1
        CertificateArn: !Join 
          - ':'
          - - 'arn:aws:iot'
            - !Ref 'AWS::Region'
            - !Ref 'AWS::AccountId'
            - >-
              cert/4db8b7f58d95b7fdb45c38c28a0b1adf6c5f8c03e902de65734935fea83e751f
        SyncShadow: 'true'
        ThingArn: !Join 
          - ':'
          - - 'arn:aws:iot'
            - !Ref 'AWS::Region'
            - !Ref 'AWS::AccountId'
            - thing/TestDevice1
```

## See also
<a name="aws-resource-greengrass-devicedefinitionversion--seealso"></a>
+ [CreateDeviceDefinitionVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/createdevicedefinitionversion-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::DeviceDefinitionVersion Device
<a name="aws-properties-greengrass-devicedefinitionversion-device"></a>

<a name="aws-properties-greengrass-devicedefinitionversion-device-description"></a> A device is an AWS IoT device (thing) that's added to a Greengrass group. Greengrass devices can communicate with the Greengrass core in the same group. For more information, see [What Is AWS IoT Greengrass?](https://docs.aws.amazon.com/greengrass/v1/developerguide/what-is-gg.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

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

## Syntax
<a name="aws-properties-greengrass-devicedefinitionversion-device-syntax"></a>

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

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

```
{
  "[CertificateArn](#cfn-greengrass-devicedefinitionversion-device-certificatearn)" : String,
  "[Id](#cfn-greengrass-devicedefinitionversion-device-id)" : String,
  "[SyncShadow](#cfn-greengrass-devicedefinitionversion-device-syncshadow)" : Boolean,
  "[ThingArn](#cfn-greengrass-devicedefinitionversion-device-thingarn)" : String
}
```

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

```
  [CertificateArn](#cfn-greengrass-devicedefinitionversion-device-certificatearn): String
  [Id](#cfn-greengrass-devicedefinitionversion-device-id): String
  [SyncShadow](#cfn-greengrass-devicedefinitionversion-device-syncshadow): Boolean
  [ThingArn](#cfn-greengrass-devicedefinitionversion-device-thingarn): String
```

## Properties
<a name="aws-properties-greengrass-devicedefinitionversion-device-properties"></a>

`CertificateArn`  <a name="cfn-greengrass-devicedefinitionversion-device-certificatearn"></a>
The ARN of the device certificate for the device. This X.509 certificate is used to authenticate the device with AWS IoT and AWS IoT Greengrass services.  
*Required*: Yes  
*Type*: String  
*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-devicedefinitionversion-device-id"></a>
A descriptive or arbitrary ID for the device. This value must be unique within the device 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)

`SyncShadow`  <a name="cfn-greengrass-devicedefinitionversion-device-syncshadow"></a>
Indicates whether the device's local shadow is synced with the cloud automatically.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ThingArn`  <a name="cfn-greengrass-devicedefinitionversion-device-thingarn"></a>
The Amazon Resource Name (ARN) of the device, which is an AWS IoT device (thing).  
*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-devicedefinitionversion-device--seealso"></a>
+ [Device](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-device.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::FunctionDefinition
<a name="aws-resource-greengrass-functiondefinition"></a>

The `AWS::Greengrass::FunctionDefinition` resource represents a function definition for AWS IoT Greengrass. Function definitions are used to organize your function definition versions.

Function definitions can reference multiple function definition versions. All function definition versions must be associated with a function definition. Each function definition version can contain one or more functions.

**Note**  
When you create a function definition, you can optionally include an initial function definition version. To associate a function definition version later, create an [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 and specify the ID of this function definition.  
After you create the 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-functiondefinition-syntax"></a>

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

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

```
{
  "Type" : "AWS::Greengrass::FunctionDefinition",
  "Properties" : {
      "[InitialVersion](#cfn-greengrass-functiondefinition-initialversion)" : FunctionDefinitionVersion,
      "[Name](#cfn-greengrass-functiondefinition-name)" : String,
      "[Tags](#cfn-greengrass-functiondefinition-tags)" : [ [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html), ... ]
    }
}
```

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

```
Type: AWS::Greengrass::FunctionDefinition
Properties:
  [InitialVersion](#cfn-greengrass-functiondefinition-initialversion): 
    FunctionDefinitionVersion
  [Name](#cfn-greengrass-functiondefinition-name): String
  [Tags](#cfn-greengrass-functiondefinition-tags): 
    - [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)
```

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

`InitialVersion`  <a name="cfn-greengrass-functiondefinition-initialversion"></a>
The function definition version to include when the function definition is created. A function definition version contains a list of [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-function.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-function.html) property types.  
To associate a function definition version after the function definition is created, create an [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 and specify the ID of this function definition.
*Required*: No  
*Type*: [FunctionDefinitionVersion](aws-properties-greengrass-functiondefinition-functiondefinitionversion.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-greengrass-functiondefinition-name"></a>
The name of the function definition.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-greengrass-functiondefinition-tags"></a>
Application-specific metadata to attach to the function definition. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tagging Your AWS IoT Greengrass Resources](https://docs.aws.amazon.com/greengrass/v1/developerguide/tagging.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.  
This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in CloudFormation templates.  

```
"Tags": {
    "KeyName0": "value",
    "KeyName1": "value",
    "KeyName2": "value"
}
```
*Required*: No  
*Type*: Array of [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

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

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

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the function definition, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

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-functiondefinition-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

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

#### 
<a name="aws-resource-greengrass-functiondefinition-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the `FunctionDefinition`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/functions/1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

`Id`  <a name="Id-fn::getatt"></a>
The ID of the `FunctionDefinition`, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

`LatestVersionArn`  <a name="LatestVersionArn-fn::getatt"></a>
The ARN of the last `FunctionDefinitionVersion` that was added to the `FunctionDefinition`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/functions/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2`. 

`Name`  <a name="Name-fn::getatt"></a>
The name of the `FunctionDefinition`, such as `MyFunctionDefinition`. 

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



### Function Definition Snippet
<a name="aws-resource-greengrass-functiondefinition--examples--Function_Definition_Snippet"></a>

The following snippet defines a function definition resource with an initial version that 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-functiondefinition--examples--Function_Definition_Snippet--json"></a>

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

#### YAML
<a name="aws-resource-greengrass-functiondefinition--examples--Function_Definition_Snippet--yaml"></a>

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

## See also
<a name="aws-resource-greengrass-functiondefinition--seealso"></a>
+ [CreateFunctionDefinition](https://docs.aws.amazon.com/greengrass/v1/apireference/createfunctiondefinition-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::FunctionDefinition DefaultConfig
<a name="aws-properties-greengrass-functiondefinition-defaultconfig"></a>

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

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

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

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

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

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

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

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

`Execution`  <a name="cfn-greengrass-functiondefinition-defaultconfig-execution"></a>
Configuration settings for the Lambda execution environment on the AWS IoT Greengrass core.  
*Required*: Yes  
*Type*: [Execution](aws-properties-greengrass-functiondefinition-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-functiondefinition-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::FunctionDefinition Environment
<a name="aws-properties-greengrass-functiondefinition-environment"></a>

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

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

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

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

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

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

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

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

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

`AccessSysfs`  <a name="cfn-greengrass-functiondefinition-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-functiondefinition-environment-execution"></a>
Settings for the Lambda execution environment in AWS IoT Greengrass.  
*Required*: No  
*Type*: [Execution](aws-properties-greengrass-functiondefinition-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-functiondefinition-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 for Lambda functions that run in a Greengrass container.
*Required*: No  
*Type*: Array of [ResourceAccessPolicy](aws-properties-greengrass-functiondefinition-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-functiondefinition-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-functiondefinition-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::FunctionDefinition Execution
<a name="aws-properties-greengrass-functiondefinition-execution"></a>

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

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

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

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

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

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

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

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

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

`IsolationMode`  <a name="cfn-greengrass-functiondefinition-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-functiondefinition-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-functiondefinition-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-functiondefinition-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::FunctionDefinition Function
<a name="aws-properties-greengrass-functiondefinition-function"></a>

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

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

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

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

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

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

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

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

`FunctionArn`  <a name="cfn-greengrass-functiondefinition-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-functiondefinition-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-functiondefinition-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-functiondefinition-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-functiondefinition-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::FunctionDefinition FunctionConfiguration
<a name="aws-properties-greengrass-functiondefinition-functionconfiguration"></a>

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

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

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

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

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

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

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

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

`EncodingType`  <a name="cfn-greengrass-functiondefinition-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-functiondefinition-functionconfiguration-environment"></a>
The environment configuration of the function.  
*Required*: No  
*Type*: [Environment](aws-properties-greengrass-functiondefinition-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-functiondefinition-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-functiondefinition-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-functiondefinition-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-functiondefinition-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-functiondefinition-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-functiondefinition-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::FunctionDefinition FunctionDefinitionVersion
<a name="aws-properties-greengrass-functiondefinition-functiondefinitionversion"></a>

<a name="aws-properties-greengrass-functiondefinition-functiondefinitionversion-description"></a>A function definition version contains a list of functions.

**Note**  
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).

<a name="aws-properties-greengrass-functiondefinition-functiondefinitionversion-inheritance"></a> In an CloudFormation template, `FunctionDefinitionVersion` is the property type of the `InitialVersion` property in the [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) resource.

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

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

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

```
{
  "[DefaultConfig](#cfn-greengrass-functiondefinition-functiondefinitionversion-defaultconfig)" : DefaultConfig,
  "[Functions](#cfn-greengrass-functiondefinition-functiondefinitionversion-functions)" : [ Function, ... ]
}
```

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

```
  [DefaultConfig](#cfn-greengrass-functiondefinition-functiondefinitionversion-defaultconfig): 
    DefaultConfig
  [Functions](#cfn-greengrass-functiondefinition-functiondefinitionversion-functions): 
    - Function
```

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

`DefaultConfig`  <a name="cfn-greengrass-functiondefinition-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-functiondefinition-defaultconfig.md)  
*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-functiondefinition-functiondefinitionversion-functions"></a>
The functions in this version.  
*Required*: Yes  
*Type*: Array of [Function](aws-properties-greengrass-functiondefinition-function.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-functiondefinition-functiondefinitionversion--seealso"></a>
+ [FunctionDefinitionVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-functiondefinitionversion.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::FunctionDefinition ResourceAccessPolicy
<a name="aws-properties-greengrass-functiondefinition-resourceaccesspolicy"></a>

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

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

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

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

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

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

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

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

`Permission`  <a name="cfn-greengrass-functiondefinition-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-functiondefinition-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-functiondefinition-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::FunctionDefinition RunAs
<a name="aws-properties-greengrass-functiondefinition-runas"></a>

<a name="aws-properties-greengrass-functiondefinition-runas-description"></a>The access identity whose permissions are 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-functiondefinition-runas-inheritance"></a> In an CloudFormation template, `RunAs` is a property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-execution.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-execution.html) property type.

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

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

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

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

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

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

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

`Gid`  <a name="cfn-greengrass-functiondefinition-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-functiondefinition-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-functiondefinition-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/) 

# 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/) 

# AWS::Greengrass::Group
<a name="aws-resource-greengrass-group"></a>

AWS IoT Greengrass seamlessly extends AWS to edge devices so they can act locally on the data they generate, while still using the cloud for management, analytics, and durable storage. With AWS IoT Greengrass, connected devices can run AWS Lambda functions, execute predictions based on machine learning models, keep device data in sync, and communicate with other devices securely – even when not connected to the internet. For more information, see the [AWS IoT Greengrass Version 1 Developer Guide ](https://docs.aws.amazon.com/greengrass/v1/developerguide/what-is-gg.html).

**Note**  
For AWS Region support, see [CloudFormation Support for AWS IoT Greengrass](https://docs.aws.amazon.com/greengrass/v1/developerguide/cloudformation-support.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

The `AWS::Greengrass::Group` resource represents a group in AWS IoT Greengrass. In the AWS IoT Greengrass API, groups are used to organize your group versions.

Groups can reference multiple group versions. All group versions must be associated with a group. A group version references a device definition version, subscription definition version, and other version types that contain the components you want to deploy to a Greengrass core device.

To deploy a group version, the group version must reference a core definition version that contains one core. Other version types are optionally included, depending on your business need.

**Note**  
When you create a group, you can optionally include an initial group version. To associate a group version later, create a [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-groupversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-groupversion.html) resource and specify the ID of this group.  
To change group components (such as devices, subscriptions, or functions), you must create new versions. This is because versions are immutable. For example, to add a function, you create a function definition version that contains the new function (and all other functions that you want to deploy). Then you create a group version that references the new function definition version (and all other version types that you want to deploy).

 **Deploying a Group Version** 

After you create the group version in your CloudFormation template, you can deploy it using the [https://docs.aws.amazon.com/greengrass/v1/apireference/createdeployment-post.html](https://docs.aws.amazon.com/greengrass/v1/apireference/createdeployment-post.html) command in the AWS CLI or from the **Greengrass** node in the AWS IoT console. To deploy a group version, you must have a Greengrass service role associated with your AWS account. For more information, see [CloudFormation Support for AWS IoT Greengrass](https://docs.aws.amazon.com/greengrass/v1/developerguide/cloudformation-support.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

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

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

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

```
{
  "Type" : "AWS::Greengrass::Group",
  "Properties" : {
      "[InitialVersion](#cfn-greengrass-group-initialversion)" : GroupVersion,
      "[Name](#cfn-greengrass-group-name)" : String,
      "[RoleArn](#cfn-greengrass-group-rolearn)" : String,
      "[Tags](#cfn-greengrass-group-tags)" : [ [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html), ... ]
    }
}
```

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

```
Type: AWS::Greengrass::Group
Properties:
  [InitialVersion](#cfn-greengrass-group-initialversion): 
    GroupVersion
  [Name](#cfn-greengrass-group-name): String
  [RoleArn](#cfn-greengrass-group-rolearn): String
  [Tags](#cfn-greengrass-group-tags): 
    - [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)
```

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

`InitialVersion`  <a name="cfn-greengrass-group-initialversion"></a>
The group version to include when the group is created. A group version references the Amazon Resource Name (ARN) of a core definition version, device definition version, subscription definition version, and other version types. The group version must reference a core definition version that contains one core. Other version types are optionally included, depending on your business need.  
To associate a group version after the group is created, create an [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-groupversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-groupversion.html) resource and specify the ID of this group.
*Required*: No  
*Type*: [GroupVersion](aws-properties-greengrass-group-groupversion.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-greengrass-group-name"></a>
The name of the group.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-greengrass-group-rolearn"></a>
The Amazon Resource Name (ARN) of the IAM role attached to the group. This role contains the permissions that Lambda functions and connectors use to interact with other AWS services.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-greengrass-group-tags"></a>
Application-specific metadata to attach to the group. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tagging Your AWS IoT Greengrass Resources](https://docs.aws.amazon.com/greengrass/v1/developerguide/tagging.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.  
This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in CloudFormation templates.  

```
"Tags": {
    "KeyName0": "value",
    "KeyName1": "value",
    "KeyName2": "value"
}
```
*Required*: No  
*Type*: Array of [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

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

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

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the group, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

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-group-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

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

#### 
<a name="aws-resource-greengrass-group-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The ARN of the `Group`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/groups/1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

`Id`  <a name="Id-fn::getatt"></a>
The ID of the `Group`, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

`LatestVersionArn`  <a name="LatestVersionArn-fn::getatt"></a>
The ARN of the last `GroupVersion` that was added to the `Group`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/groups/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2`. 

`Name`  <a name="Name-fn::getatt"></a>
The name of the `Group`, such as `MyGroup`. 

`RoleArn`  <a name="RoleArn-fn::getatt"></a>
The ARN of the IAM role that's attached to the `Group`, such as `arn:aws:iam::123456789012:role/role-name`. 

`RoleAttachedAt`  <a name="RoleAttachedAt-fn::getatt"></a>
The time (in milliseconds since the epoch) when the group role was attached to the `Group`. 

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



### Create a Group
<a name="aws-resource-greengrass-group--examples--Create_a_Group"></a>

The following template defines a core, device, function, logger, subscription, and two resources, and then references them from the group version.

The template includes parameters that let you specify the certificate ARNs for the core and device and the ARN of the source Lambda function (which is an AWS Lambda resource). It uses the `Ref` and `GetAtt` intrinsic functions to reference IDs, ARNs, and other attributes that are required to create Greengrass resources.

**Note**  
After you create the group version in your CloudFormation template, you can deploy it using the [https://docs.aws.amazon.com/greengrass/v1/apireference/createdeployment-post.html](https://docs.aws.amazon.com/greengrass/v1/apireference/createdeployment-post.html) command in the AWS CLI or from the group configuration page in the AWS IoT console. To deploy a group version, you must have a Greengrass service role associated with your AWS account. For more information, see [CloudFormation Support for AWS IoT Greengrass](https://docs.aws.amazon.com/greengrass/v1/developerguide/cloudformation-support.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

#### JSON
<a name="aws-resource-greengrass-group--examples--Create_a_Group--json"></a>

```
{
    "Description": "AWS IoT Greengrass example template that creates a group version with a core, device, function, logger, subscription, and resources.",
    "Parameters": {
        "CoreCertificateArn": {
            "Type": "String"
        },
        "DeviceCertificateArn": {
            "Type": "String"
        },
        "LambdaVersionArn": {
            "Type": "String"
        }
    },
    "Resources": {
        "TestCore1": {
            "Type": "AWS::IoT::Thing",
            "Properties": {
                "ThingName": "TestCore1"
            }
        },
        "TestCoreDefinition": {
            "Type": "AWS::Greengrass::CoreDefinition",
            "Properties": {
                "Name": "DemoTestCoreDefinition"
            }
        },
        "TestCoreDefinitionVersion": {
            "Type": "AWS::Greengrass::CoreDefinitionVersion",
            "Properties": {
                "CoreDefinitionId": {
                    "Ref": "TestCoreDefinition"
                },
                "Cores": [
                    {
                        "Id": "TestCore1",
                        "CertificateArn": {
                            "Ref": "CoreCertificateArn"
                        },
                        "SyncShadow": "false",
                        "ThingArn": {
                            "Fn::Join": [
                                ":",
                                [
                                    "arn:aws:iot",
                                    {
                                        "Ref": "AWS::Region"
                                    },
                                    {
                                        "Ref": "AWS::AccountId"
                                    },
                                    "thing/TestCore1"
                                ]
                            ]
                        }
                    }
                ]
            }
        },
        "TestDevice1": {
            "Type": "AWS::IoT::Thing",
            "Properties": {
                "ThingName": "TestDevice1"
            }
        },
        "TestDeviceDefinition": {
            "Type": "AWS::Greengrass::DeviceDefinition",
            "Properties": {
                "Name": "DemoTestDeviceDefinition"
            }
        },
        "TestDeviceDefinitionVersion": {
            "Type": "AWS::Greengrass::DeviceDefinitionVersion",
            "Properties": {
                "DeviceDefinitionId": {
                    "Fn::GetAtt": [
                        "TestDeviceDefinition",
                        "Id"
                    ]
                },
                "Devices": [
                    {
                        "Id": "TestDevice1",
                        "CertificateArn": {
                            "Ref": "DeviceCertificateArn"
                        },
                        "SyncShadow": "true",
                        "ThingArn": {
                            "Fn::Join": [
                                ":",
                                [
                                    "arn:aws:iot",
                                    {
                                        "Ref": "AWS::Region"
                                    },
                                    {
                                        "Ref": "AWS::AccountId"
                                    },
                                    "thing/TestDevice1"
                                ]
                            ]
                        }
                    }
                ]
            }
        },
        "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": {
                            "Ref": "LambdaVersionArn"
                        },
                        "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": {
                                    "IsolationMode": "GreengrassContainer",
                                    "RunAs": {
                                        "Uid": "1",
                                        "Gid": "10"
                                    }
                                }
                            }
                        }
                    }
                ]
            }
        },
        "TestLoggerDefinition": {
            "Type": "AWS::Greengrass::LoggerDefinition",
            "Properties": {
                "Name": "DemoTestLoggerDefinition"
            }
        },
        "TestLoggerDefinitionVersion": {
            "Type": "AWS::Greengrass::LoggerDefinitionVersion",
            "Properties": {
                "LoggerDefinitionId": {
                    "Ref": "TestLoggerDefinition"
                },
                "Loggers": [
                    {
                        "Id": "TestLogger1",
                        "Type": "AWSCloudWatch",
                        "Component": "GreengrassSystem",
                        "Level": "INFO"
                    }
                ]
            }
        },
        "TestResourceDefinition": {
            "Type": "AWS::Greengrass::ResourceDefinition",
            "Properties": {
                "Name": "DemoTestResourceDefinition"
            }
        },
        "TestResourceDefinitionVersion": {
            "Type": "AWS::Greengrass::ResourceDefinitionVersion",
            "Properties": {
                "ResourceDefinitionId": {
                    "Ref": "TestResourceDefinition"
                },
                "Resources": [
                    {
                        "Id": "ResourceId1",
                        "Name": "LocalDeviceResource",
                        "ResourceDataContainer": {
                            "LocalDeviceResourceData": {
                                "SourcePath": "/dev/TestSourcePath1",
                                "GroupOwnerSetting": {
                                    "AutoAddGroupOwner": "false",
                                    "GroupOwner": "TestOwner"
                                }
                            }
                        }
                    },
                    {
                        "Id": "ResourceId2",
                        "Name": "LocalVolumeResourceData",
                        "ResourceDataContainer": {
                            "LocalVolumeResourceData": {
                                "SourcePath": "/dev/TestSourcePath2",
                                "DestinationPath": "/volumes/TestDestinationPath2",
                                "GroupOwnerSetting": {
                                    "AutoAddGroupOwner": "false",
                                    "GroupOwner": "TestOwner"
                                }
                            }
                        }
                    }
                ]
            }
        },
        "TestSubscriptionDefinition": {
            "Type": "AWS::Greengrass::SubscriptionDefinition",
            "Properties": {
                "Name": "DemoTestSubscriptionDefinition"
            }
        },
        "TestSubscriptionDefinitionVersion": {
            "Type": "AWS::Greengrass::SubscriptionDefinitionVersion",
            "Properties": {
                "SubscriptionDefinitionId": {
                    "Ref": "TestSubscriptionDefinition"
                },
                "Subscriptions": [
                    {
                        "Id": "TestSubscription1",
                        "Source": {
                            "Fn::Join": [
                                ":",
                                [
                                    "arn:aws:iot",
                                    {
                                        "Ref": "AWS::Region"
                                    },
                                    {
                                        "Ref": "AWS::AccountId"
                                    },
                                    "thing/TestDevice1"
                                ]
                            ]
                        },
                        "Subject": "TestSubjectUpdated",
                        "Target": {
                            "Ref": "LambdaVersionArn"
                        }
                    }
                ]
            }
        },
        "TestGroup": {
            "Type": "AWS::Greengrass::Group",
            "Properties": {
                "Name": "DemoTestGroupNewName",
                "RoleArn": {
                    "Fn::Join": [
                        ":",
                        [
                            "arn:aws:iam:",
                            {
                                "Ref": "AWS::AccountId"
                            },
                            "role/TestUser"
                        ]
                    ]
                },
                "InitialVersion": {
                    "CoreDefinitionVersionArn": {
                        "Ref": "TestCoreDefinitionVersion"
                    },
                    "DeviceDefinitionVersionArn": {
                        "Ref": "TestDeviceDefinitionVersion"
                    },
                    "FunctionDefinitionVersionArn": {
                        "Ref": "TestFunctionDefinitionVersion"
                    },
                    "SubscriptionDefinitionVersionArn": {
                        "Ref": "TestSubscriptionDefinitionVersion"
                    },
                    "LoggerDefinitionVersionArn": {
                        "Ref": "TestLoggerDefinitionVersion"
                    },
                    "ResourceDefinitionVersionArn": {
                        "Ref": "TestResourceDefinitionVersion"
                    }
                },
                "Tags": {
                    "KeyName0": "value",
                    "KeyName1": "value",
                    "KeyName2": "value"
                }
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-greengrass-group--examples--Create_a_Group--yaml"></a>

```
Description: >-
  AWS IoT Greengrass example template that creates a group version with a core,
  device, function, logger, subscription, and resources.
Parameters:
  CoreCertificateArn:
    Type: String
  DeviceCertificateArn:
    Type: String
  LambdaVersionArn:
    Type: String
Resources:
  TestCore1:
    Type: 'AWS::IoT::Thing'
    Properties:
      ThingName: TestCore1
  TestCoreDefinition:
    Type: 'AWS::Greengrass::CoreDefinition'
    Properties:
      Name: DemoTestCoreDefinition
  TestCoreDefinitionVersion:
    Type: 'AWS::Greengrass::CoreDefinitionVersion'
    Properties:
      CoreDefinitionId: !Ref TestCoreDefinition
      Cores:
        - Id: TestCore1
          CertificateArn: !Ref CoreCertificateArn
          SyncShadow: 'false'
          ThingArn: !Join 
            - ':'
            - - 'arn:aws:iot'
              - !Ref 'AWS::Region'
              - !Ref 'AWS::AccountId'
              - thing/TestCore1
  TestDevice1:
    Type: 'AWS::IoT::Thing'
    Properties:
      ThingName: TestDevice1
  TestDeviceDefinition:
    Type: 'AWS::Greengrass::DeviceDefinition'
    Properties:
      Name: DemoTestDeviceDefinition
  TestDeviceDefinitionVersion:
    Type: 'AWS::Greengrass::DeviceDefinitionVersion'
    Properties:
      DeviceDefinitionId: !GetAtt 
        - TestDeviceDefinition
        - Id
      Devices:
        - Id: TestDevice1
          CertificateArn: !Ref DeviceCertificateArn
          SyncShadow: 'true'
          ThingArn: !Join 
            - ':'
            - - 'arn:aws:iot'
              - !Ref 'AWS::Region'
              - !Ref 'AWS::AccountId'
              - thing/TestDevice1
  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: !Ref LambdaVersionArn
          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:
                IsolationMode: GreengrassContainer
                RunAs:
                  Uid: '1'
                  Gid: '10'
  TestLoggerDefinition:
    Type: 'AWS::Greengrass::LoggerDefinition'
    Properties:
      Name: DemoTestLoggerDefinition
  TestLoggerDefinitionVersion:
    Type: 'AWS::Greengrass::LoggerDefinitionVersion'
    Properties:
      LoggerDefinitionId: !Ref TestLoggerDefinition
      Loggers:
        - Id: TestLogger1
          Type: AWSCloudWatch
          Component: GreengrassSystem
          Level: INFO
  TestResourceDefinition:
    Type: 'AWS::Greengrass::ResourceDefinition'
    Properties:
      Name: DemoTestResourceDefinition
  TestResourceDefinitionVersion:
    Type: 'AWS::Greengrass::ResourceDefinitionVersion'
    Properties:
      ResourceDefinitionId: !Ref TestResourceDefinition
      Resources:
        - Id: ResourceId1
          Name: LocalDeviceResource
          ResourceDataContainer:
            LocalDeviceResourceData:
              SourcePath: /dev/TestSourcePath1
              GroupOwnerSetting:
                AutoAddGroupOwner: 'false'
                GroupOwner: TestOwner
        - Id: ResourceId2
          Name: LocalVolumeResourceData
          ResourceDataContainer:
            LocalVolumeResourceData:
              SourcePath: /dev/TestSourcePath2
              DestinationPath: /volumes/TestDestinationPath2
              GroupOwnerSetting:
                AutoAddGroupOwner: 'false'
                GroupOwner: TestOwner
  TestSubscriptionDefinition:
    Type: 'AWS::Greengrass::SubscriptionDefinition'
    Properties:
      Name: DemoTestSubscriptionDefinition
  TestSubscriptionDefinitionVersion:
    Type: 'AWS::Greengrass::SubscriptionDefinitionVersion'
    Properties:
      SubscriptionDefinitionId: !Ref TestSubscriptionDefinition
      Subscriptions:
        - Id: TestSubscription1
          Source: !Join 
            - ':'
            - - 'arn:aws:iot'
              - !Ref 'AWS::Region'
              - !Ref 'AWS::AccountId'
              - thing/TestDevice1
          Subject: TestSubjectUpdated
          Target: !Ref LambdaVersionArn
  TestGroup:
    Type: 'AWS::Greengrass::Group'
    Properties:
      Name: DemoTestGroupNewName
      RoleArn: !Join 
        - ':'
        - - 'arn:aws:iam:'
          - !Ref 'AWS::AccountId'
          - role/TestUser
      InitialVersion:
        CoreDefinitionVersionArn: !Ref TestCoreDefinitionVersion
        DeviceDefinitionVersionArn: !Ref TestDeviceDefinitionVersion
        FunctionDefinitionVersionArn: !Ref TestFunctionDefinitionVersion
        SubscriptionDefinitionVersionArn: !Ref TestSubscriptionDefinitionVersion
        LoggerDefinitionVersionArn: !Ref TestLoggerDefinitionVersion
        ResourceDefinitionVersionArn: !Ref TestResourceDefinitionVersion
      Tags:
        KeyName0: value
        KeyName1: value
        KeyName2: value
```

## See also
<a name="aws-resource-greengrass-group--seealso"></a>
+ [CreateGroup](https://docs.aws.amazon.com/greengrass/v1/apireference/creategroup-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::Group GroupVersion
<a name="aws-properties-greengrass-group-groupversion"></a>

<a name="aws-properties-greengrass-group-groupversion-description"></a>A group version in AWS IoT Greengrass, which references of a core definition version, device definition version, subscription definition version, and other version types that contain the components you want to deploy to a Greengrass core device. The group version must reference a core definition version that contains one core. Other version types are optionally included, depending on your business need.

<a name="aws-properties-greengrass-group-groupversion-inheritance"></a> In an CloudFormation template, `GroupVersion` is the property type of the `InitialVersion` property in 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.

## Syntax
<a name="aws-properties-greengrass-group-groupversion-syntax"></a>

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

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

```
{
  "[ConnectorDefinitionVersionArn](#cfn-greengrass-group-groupversion-connectordefinitionversionarn)" : String,
  "[CoreDefinitionVersionArn](#cfn-greengrass-group-groupversion-coredefinitionversionarn)" : String,
  "[DeviceDefinitionVersionArn](#cfn-greengrass-group-groupversion-devicedefinitionversionarn)" : String,
  "[FunctionDefinitionVersionArn](#cfn-greengrass-group-groupversion-functiondefinitionversionarn)" : String,
  "[LoggerDefinitionVersionArn](#cfn-greengrass-group-groupversion-loggerdefinitionversionarn)" : String,
  "[ResourceDefinitionVersionArn](#cfn-greengrass-group-groupversion-resourcedefinitionversionarn)" : String,
  "[SubscriptionDefinitionVersionArn](#cfn-greengrass-group-groupversion-subscriptiondefinitionversionarn)" : String
}
```

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

```
  [ConnectorDefinitionVersionArn](#cfn-greengrass-group-groupversion-connectordefinitionversionarn): String
  [CoreDefinitionVersionArn](#cfn-greengrass-group-groupversion-coredefinitionversionarn): String
  [DeviceDefinitionVersionArn](#cfn-greengrass-group-groupversion-devicedefinitionversionarn): String
  [FunctionDefinitionVersionArn](#cfn-greengrass-group-groupversion-functiondefinitionversionarn): String
  [LoggerDefinitionVersionArn](#cfn-greengrass-group-groupversion-loggerdefinitionversionarn): String
  [ResourceDefinitionVersionArn](#cfn-greengrass-group-groupversion-resourcedefinitionversionarn): String
  [SubscriptionDefinitionVersionArn](#cfn-greengrass-group-groupversion-subscriptiondefinitionversionarn): String
```

## Properties
<a name="aws-properties-greengrass-group-groupversion-properties"></a>

`ConnectorDefinitionVersionArn`  <a name="cfn-greengrass-group-groupversion-connectordefinitionversionarn"></a>
The Amazon Resource Name (ARN) of the connector definition version that contains the connectors you want to deploy with the group version.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`CoreDefinitionVersionArn`  <a name="cfn-greengrass-group-groupversion-coredefinitionversionarn"></a>
The ARN of the core definition version that contains the core you want to deploy with the group version. Currently, the core definition version can contain only one core.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DeviceDefinitionVersionArn`  <a name="cfn-greengrass-group-groupversion-devicedefinitionversionarn"></a>
The ARN of the device definition version that contains the devices you want to deploy with the group version.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FunctionDefinitionVersionArn`  <a name="cfn-greengrass-group-groupversion-functiondefinitionversionarn"></a>
The ARN of the function definition version that contains the functions you want to deploy with the group version.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LoggerDefinitionVersionArn`  <a name="cfn-greengrass-group-groupversion-loggerdefinitionversionarn"></a>
The ARN of the logger definition version that contains the loggers you want to deploy with the group version.  
  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ResourceDefinitionVersionArn`  <a name="cfn-greengrass-group-groupversion-resourcedefinitionversionarn"></a>
The ARN of the resource definition version that contains the resources you want to deploy with the group version.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SubscriptionDefinitionVersionArn`  <a name="cfn-greengrass-group-groupversion-subscriptiondefinitionversionarn"></a>
The ARN of the subscription definition version that contains the subscriptions you want to deploy with the group version.  
*Required*: No  
*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-group-groupversion--seealso"></a>
+ [GroupVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-groupversion.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::GroupVersion
<a name="aws-resource-greengrass-groupversion"></a>

The `AWS::Greengrass::GroupVersion` resource represents a group version in AWS IoT Greengrass. A group version references a core definition version, device definition version, subscription definition version, and other version types that contain the components you want to deploy to a Greengrass core device. The group version must reference a core definition version that contains one core. Other version types are optionally included, depending on your business need.

**Note**  
To create a group version, you must specify the ID of the group that you want to associate with the version. For information about creating a group, 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-groupversion-syntax"></a>

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

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

```
{
  "Type" : "AWS::Greengrass::GroupVersion",
  "Properties" : {
      "[ConnectorDefinitionVersionArn](#cfn-greengrass-groupversion-connectordefinitionversionarn)" : String,
      "[CoreDefinitionVersionArn](#cfn-greengrass-groupversion-coredefinitionversionarn)" : String,
      "[DeviceDefinitionVersionArn](#cfn-greengrass-groupversion-devicedefinitionversionarn)" : String,
      "[FunctionDefinitionVersionArn](#cfn-greengrass-groupversion-functiondefinitionversionarn)" : String,
      "[GroupId](#cfn-greengrass-groupversion-groupid)" : String,
      "[LoggerDefinitionVersionArn](#cfn-greengrass-groupversion-loggerdefinitionversionarn)" : String,
      "[ResourceDefinitionVersionArn](#cfn-greengrass-groupversion-resourcedefinitionversionarn)" : String,
      "[SubscriptionDefinitionVersionArn](#cfn-greengrass-groupversion-subscriptiondefinitionversionarn)" : String
    }
}
```

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

```
Type: AWS::Greengrass::GroupVersion
Properties:
  [ConnectorDefinitionVersionArn](#cfn-greengrass-groupversion-connectordefinitionversionarn): String
  [CoreDefinitionVersionArn](#cfn-greengrass-groupversion-coredefinitionversionarn): String
  [DeviceDefinitionVersionArn](#cfn-greengrass-groupversion-devicedefinitionversionarn): String
  [FunctionDefinitionVersionArn](#cfn-greengrass-groupversion-functiondefinitionversionarn): String
  [GroupId](#cfn-greengrass-groupversion-groupid): String
  [LoggerDefinitionVersionArn](#cfn-greengrass-groupversion-loggerdefinitionversionarn): String
  [ResourceDefinitionVersionArn](#cfn-greengrass-groupversion-resourcedefinitionversionarn): String
  [SubscriptionDefinitionVersionArn](#cfn-greengrass-groupversion-subscriptiondefinitionversionarn): String
```

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

`ConnectorDefinitionVersionArn`  <a name="cfn-greengrass-groupversion-connectordefinitionversionarn"></a>
The Amazon Resource Name (ARN) of the connector definition version that contains the connectors you want to deploy with the group version.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`CoreDefinitionVersionArn`  <a name="cfn-greengrass-groupversion-coredefinitionversionarn"></a>
The ARN of the core definition version that contains the core you want to deploy with the group version. Currently, the core definition version can contain only one core.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DeviceDefinitionVersionArn`  <a name="cfn-greengrass-groupversion-devicedefinitionversionarn"></a>
The ARN of the device definition version that contains the devices you want to deploy with the group version.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FunctionDefinitionVersionArn`  <a name="cfn-greengrass-groupversion-functiondefinitionversionarn"></a>
The ARN of the function definition version that contains the functions you want to deploy with the group version.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`GroupId`  <a name="cfn-greengrass-groupversion-groupid"></a>
The ID of the group 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)

`LoggerDefinitionVersionArn`  <a name="cfn-greengrass-groupversion-loggerdefinitionversionarn"></a>
The ARN of the logger definition version that contains the loggers you want to deploy with the group version.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ResourceDefinitionVersionArn`  <a name="cfn-greengrass-groupversion-resourcedefinitionversionarn"></a>
The ARN of the resource definition version that contains the resources you want to deploy with the group version.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SubscriptionDefinitionVersionArn`  <a name="cfn-greengrass-groupversion-subscriptiondefinitionversionarn"></a>
The ARN of the subscription definition version that contains the subscriptions you want to deploy with the group version.  
*Required*: No  
*Type*: String  
*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-groupversion-return-values"></a>

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

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ARN of the group version, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/groups/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-groupversion-return-values-fn--getatt"></a>

## See also
<a name="aws-resource-greengrass-groupversion--seealso"></a>
+ [CreateGroupVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/creategroupversion-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::LoggerDefinition
<a name="aws-resource-greengrass-loggerdefinition"></a>

The `AWS::Greengrass::LoggerDefinition` resource represents a logger definition for AWS IoT Greengrass. Logger definitions are used to organize your logger definition versions.

Logger definitions can reference multiple logger definition versions. All logger definition versions must be associated with a logger definition. Each logger definition version can contain one or more loggers.

**Note**  
When you create a logger definition, you can optionally include an initial logger definition version. To associate a logger definition version later, create an [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-loggerdefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-loggerdefinitionversion.html) resource and specify the ID of this logger definition.  
After you create the logger definition version that contains the loggers 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-loggerdefinition-syntax"></a>

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

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

```
{
  "Type" : "AWS::Greengrass::LoggerDefinition",
  "Properties" : {
      "[InitialVersion](#cfn-greengrass-loggerdefinition-initialversion)" : LoggerDefinitionVersion,
      "[Name](#cfn-greengrass-loggerdefinition-name)" : String,
      "[Tags](#cfn-greengrass-loggerdefinition-tags)" : [ [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html), ... ]
    }
}
```

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

```
Type: AWS::Greengrass::LoggerDefinition
Properties:
  [InitialVersion](#cfn-greengrass-loggerdefinition-initialversion): 
    LoggerDefinitionVersion
  [Name](#cfn-greengrass-loggerdefinition-name): String
  [Tags](#cfn-greengrass-loggerdefinition-tags): 
    - [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)
```

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

`InitialVersion`  <a name="cfn-greengrass-loggerdefinition-initialversion"></a>
The logger definition version to include when the logger definition is created. A logger definition version contains a list of [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-loggerdefinition-logger.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-loggerdefinition-logger.html) property types.  
To associate a logger definition version after the logger definition is created, create an [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-loggerdefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-loggerdefinitionversion.html) resource and specify the ID of this logger definition.
*Required*: No  
*Type*: [LoggerDefinitionVersion](aws-properties-greengrass-loggerdefinition-loggerdefinitionversion.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-greengrass-loggerdefinition-name"></a>
The name of the logger definition.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-greengrass-loggerdefinition-tags"></a>
Application-specific metadata to attach to the logger definition. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tagging Your AWS IoT Greengrass Resources](https://docs.aws.amazon.com/greengrass/v1/developerguide/tagging.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.  
This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in CloudFormation templates.  

```
"Tags": {
    "KeyName0": "value",
    "KeyName1": "value",
    "KeyName2": "value"
}
```
*Required*: No  
*Type*: Array of [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

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

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

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the logger definition, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

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-loggerdefinition-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

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

#### 
<a name="aws-resource-greengrass-loggerdefinition-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the `LoggerDefinition`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/loggers/1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

`Id`  <a name="Id-fn::getatt"></a>
The ID of the `LoggerDefinition`, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

`LatestVersionArn`  <a name="LatestVersionArn-fn::getatt"></a>
The ARN of the last `LoggerDefinitionVersion` that was added to the `LoggerDefinition`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/loggers/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2`. 

`Name`  <a name="Name-fn::getatt"></a>
The name of the `LoggerDefinition`, such as `MyLoggerDefinition`. 

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



### Logger Definition Snippet
<a name="aws-resource-greengrass-loggerdefinition--examples--Logger_Definition_Snippet"></a>

The following snippet defines a logger definition resource with an initial version that contains a logger.

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-loggerdefinition--examples--Logger_Definition_Snippet--json"></a>

```
"TestLoggerDefinition": {
    "Type": "AWS::Greengrass::LoggerDefinition",
    "Properties": {
        "Name": "DemoTestLoggerDefinition",
        "InitialVersion": {
            "Loggers": [
                {
                    "Id": "TestLogger1",
                    "Type": "FileSystem",
                    "Component": "GreengrassSystem",
                    "Level": "INFO",
                    "Space": "128"
                }
            ]
        }
    }
}
```

#### YAML
<a name="aws-resource-greengrass-loggerdefinition--examples--Logger_Definition_Snippet--yaml"></a>

```
TestLoggerDefinition:
  Type: 'AWS::Greengrass::LoggerDefinition'
  Properties:
    Name: DemoTestLoggerDefinition
    InitialVersion:
      Loggers:
        - Id: TestLogger1
          Type: FileSystem
          Component: GreengrassSystem
          Level: INFO
          Space: '128'
```

## See also
<a name="aws-resource-greengrass-loggerdefinition--seealso"></a>
+ [CreateLoggerDefinition](https://docs.aws.amazon.com/greengrass/v1/apireference/createloggerdefinition-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::LoggerDefinition Logger
<a name="aws-properties-greengrass-loggerdefinition-logger"></a>

<a name="aws-properties-greengrass-loggerdefinition-logger-description"></a>A logger represents logging settings for the AWS IoT Greengrass group, which can be stored in CloudWatch and the local file system of your core device. All log entries include a timestamp, log level, and information about the event. For more information, see [Monitoring with AWS IoT Greengrass Logs](https://docs.aws.amazon.com/greengrass/v1/developerguide/greengrass-logs-overview.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-loggerdefinition-logger-inheritance"></a> In an CloudFormation template, the `Loggers` property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-loggerdefinition-loggerdefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-loggerdefinition-loggerdefinitionversion.html) property type contains a list of `Logger` property types.

## Syntax
<a name="aws-properties-greengrass-loggerdefinition-logger-syntax"></a>

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

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

```
{
  "[Component](#cfn-greengrass-loggerdefinition-logger-component)" : String,
  "[Id](#cfn-greengrass-loggerdefinition-logger-id)" : String,
  "[Level](#cfn-greengrass-loggerdefinition-logger-level)" : String,
  "[Space](#cfn-greengrass-loggerdefinition-logger-space)" : Integer,
  "[Type](#cfn-greengrass-loggerdefinition-logger-type)" : String
}
```

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

```
  [Component](#cfn-greengrass-loggerdefinition-logger-component): String
  [Id](#cfn-greengrass-loggerdefinition-logger-id): String
  [Level](#cfn-greengrass-loggerdefinition-logger-level): String
  [Space](#cfn-greengrass-loggerdefinition-logger-space): Integer
  [Type](#cfn-greengrass-loggerdefinition-logger-type): String
```

## Properties
<a name="aws-properties-greengrass-loggerdefinition-logger-properties"></a>

`Component`  <a name="cfn-greengrass-loggerdefinition-logger-component"></a>
The source of the log event. Valid values are `GreengrassSystem` or `Lambda`. When `GreengrassSystem` is used, events from Greengrass system components are logged. When `Lambda` is used, events from user-defined Lambda functions are logged.  
*Required*: Yes  
*Type*: String  
*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-loggerdefinition-logger-id"></a>
A descriptive or arbitrary ID for the logger. This value must be unique within the logger 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)

`Level`  <a name="cfn-greengrass-loggerdefinition-logger-level"></a>
The log-level threshold. Log events below this threshold are filtered out and aren't stored. Valid values are `DEBUG`, `INFO` (recommended), `WARN`, `ERROR`, or `FATAL`.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Space`  <a name="cfn-greengrass-loggerdefinition-logger-space"></a>
The amount of file space (in KB) to use when writing logs to the local file system. This property does not apply for CloudWatch Logs.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Type`  <a name="cfn-greengrass-loggerdefinition-logger-type"></a>
The storage mechanism for log events. Valid values are `FileSystem` or `AWSCloudWatch`. When `AWSCloudWatch` is used, log events are sent to CloudWatch Logs. When `FileSystem` is used, log events are stored on the local file system.  
*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-loggerdefinition-logger--seealso"></a>
+ [Logger](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-logger.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::LoggerDefinition LoggerDefinitionVersion
<a name="aws-properties-greengrass-loggerdefinition-loggerdefinitionversion"></a>

<a name="aws-properties-greengrass-loggerdefinition-loggerdefinitionversion-description"></a> A logger definition version contains a list of [loggers](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-loggerdefinition-logger.html).

**Note**  
After you create a logger definition version that contains the loggers 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).

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

## Syntax
<a name="aws-properties-greengrass-loggerdefinition-loggerdefinitionversion-syntax"></a>

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

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

```
{
  "[Loggers](#cfn-greengrass-loggerdefinition-loggerdefinitionversion-loggers)" : [ Logger, ... ]
}
```

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

```
  [Loggers](#cfn-greengrass-loggerdefinition-loggerdefinitionversion-loggers): 
    - Logger
```

## Properties
<a name="aws-properties-greengrass-loggerdefinition-loggerdefinitionversion-properties"></a>

`Loggers`  <a name="cfn-greengrass-loggerdefinition-loggerdefinitionversion-loggers"></a>
The loggers in this version.  
*Required*: Yes  
*Type*: Array of [Logger](aws-properties-greengrass-loggerdefinition-logger.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-loggerdefinition-loggerdefinitionversion--seealso"></a>
+ [LoggerDefinitionVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-loggerdefinitionversion.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::LoggerDefinitionVersion
<a name="aws-resource-greengrass-loggerdefinitionversion"></a>

The `AWS::Greengrass::LoggerDefinitionVersion` resource represents a logger definition version for AWS IoT Greengrass. A logger definition version contains a list of loggers.

**Note**  
To create a logger definition version, you must specify the ID of the logger definition that you want to associate with the version. For information about creating a logger definition, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-loggerdefinition.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-loggerdefinition.html).  
After you create a logger definition version that contains the loggers 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-loggerdefinitionversion-syntax"></a>

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

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

```
{
  "Type" : "AWS::Greengrass::LoggerDefinitionVersion",
  "Properties" : {
      "[LoggerDefinitionId](#cfn-greengrass-loggerdefinitionversion-loggerdefinitionid)" : String,
      "[Loggers](#cfn-greengrass-loggerdefinitionversion-loggers)" : [ Logger, ... ]
    }
}
```

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

```
Type: AWS::Greengrass::LoggerDefinitionVersion
Properties:
  [LoggerDefinitionId](#cfn-greengrass-loggerdefinitionversion-loggerdefinitionid): String
  [Loggers](#cfn-greengrass-loggerdefinitionversion-loggers): 
    - Logger
```

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

`LoggerDefinitionId`  <a name="cfn-greengrass-loggerdefinitionversion-loggerdefinitionid"></a>
The ID of the logger 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)

`Loggers`  <a name="cfn-greengrass-loggerdefinitionversion-loggers"></a>
The loggers in this version.  
*Required*: Yes  
*Type*: Array of [Logger](aws-properties-greengrass-loggerdefinitionversion-logger.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-loggerdefinitionversion-return-values"></a>

### Ref
<a name="aws-resource-greengrass-loggerdefinitionversion-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 logger definition version, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/loggers/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-loggerdefinitionversion-return-values-fn--getatt"></a>

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



### Logger Definition Version Snippet
<a name="aws-resource-greengrass-loggerdefinitionversion--examples--Logger_Definition_Version_Snippet"></a>

The following snippet defines logger definition and logger definition version resources. The logger definition version references the logger definition and contains a logger.

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-loggerdefinitionversion--examples--Logger_Definition_Version_Snippet--json"></a>

```
"TestLoggerDefinition": {
    "Type": "AWS::Greengrass::LoggerDefinition",
    "Properties": {
        "Name": "DemoTestLoggerDefinition"
    }
},
"TestLoggerDefinitionVersion": {
    "Type": "AWS::Greengrass::LoggerDefinitionVersion",
    "Properties": {
        "LoggerDefinitionId": {
            "Ref": "TestLoggerDefinition"
        },
        "Loggers": [
            {
                "Id": "TestLogger1",
                "Type": "FileSystem",
                "Component": "GreengrassSystem",
                "Level": "INFO",
                "Space": "128"
            }
        ]
    }
}
```

#### YAML
<a name="aws-resource-greengrass-loggerdefinitionversion--examples--Logger_Definition_Version_Snippet--yaml"></a>

```
TestLoggerDefinition:
  Type: 'AWS::Greengrass::LoggerDefinition'
  Properties:
    Name: DemoTestLoggerDefinition
TestLoggerDefinitionVersion:
  Type: 'AWS::Greengrass::LoggerDefinitionVersion'
  Properties:
    LoggerDefinitionId: !Ref TestLoggerDefinition
    Loggers:
      - Id: TestLogger1
        Type: FileSystem
        Component: GreengrassSystem
        Level: INFO
        Space: '128'
```

## See also
<a name="aws-resource-greengrass-loggerdefinitionversion--seealso"></a>
+ [CreateLoggerDefinitionVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/createloggerdefinitionversion-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::LoggerDefinitionVersion Logger
<a name="aws-properties-greengrass-loggerdefinitionversion-logger"></a>

<a name="aws-properties-greengrass-loggerdefinitionversion-logger-description"></a>A logger represents logging settings for the AWS IoT Greengrass group, which can be stored in CloudWatch and the local file system of your core device. All log entries include a timestamp, log level, and information about the event. For more information, see [Monitoring with AWS IoT Greengrass Logs](https://docs.aws.amazon.com/greengrass/v1/developerguide/greengrass-logs-overview.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

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

## Syntax
<a name="aws-properties-greengrass-loggerdefinitionversion-logger-syntax"></a>

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

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

```
{
  "[Component](#cfn-greengrass-loggerdefinitionversion-logger-component)" : String,
  "[Id](#cfn-greengrass-loggerdefinitionversion-logger-id)" : String,
  "[Level](#cfn-greengrass-loggerdefinitionversion-logger-level)" : String,
  "[Space](#cfn-greengrass-loggerdefinitionversion-logger-space)" : Integer,
  "[Type](#cfn-greengrass-loggerdefinitionversion-logger-type)" : String
}
```

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

```
  [Component](#cfn-greengrass-loggerdefinitionversion-logger-component): String
  [Id](#cfn-greengrass-loggerdefinitionversion-logger-id): String
  [Level](#cfn-greengrass-loggerdefinitionversion-logger-level): String
  [Space](#cfn-greengrass-loggerdefinitionversion-logger-space): Integer
  [Type](#cfn-greengrass-loggerdefinitionversion-logger-type): String
```

## Properties
<a name="aws-properties-greengrass-loggerdefinitionversion-logger-properties"></a>

`Component`  <a name="cfn-greengrass-loggerdefinitionversion-logger-component"></a>
The source of the log event. Valid values are `GreengrassSystem` or `Lambda`. When `GreengrassSystem` is used, events from Greengrass system components are logged. When `Lambda` is used, events from user-defined Lambda functions are logged.  
*Required*: Yes  
*Type*: String  
*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-loggerdefinitionversion-logger-id"></a>
A descriptive or arbitrary ID for the logger. This value must be unique within the logger 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)

`Level`  <a name="cfn-greengrass-loggerdefinitionversion-logger-level"></a>
The log-level threshold. Log events below this threshold are filtered out and aren't stored. Valid values are `DEBUG`, `INFO` (recommended), `WARN`, `ERROR`, or `FATAL`.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Space`  <a name="cfn-greengrass-loggerdefinitionversion-logger-space"></a>
The amount of file space (in KB) to use when writing logs to the local file system. This property does not apply for CloudWatch Logs.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Type`  <a name="cfn-greengrass-loggerdefinitionversion-logger-type"></a>
The storage mechanism for log events. Valid values are `FileSystem` or `AWSCloudWatch`. When `AWSCloudWatch` is used, log events are sent to CloudWatch Logs. When `FileSystem` is used, log events are stored on the local file system.  
*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-loggerdefinitionversion-logger--seealso"></a>
+ [Logger](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-logger.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::ResourceDefinition
<a name="aws-resource-greengrass-resourcedefinition"></a>

The `AWS::Greengrass::ResourceDefinition` resource represents a resource definition for AWS IoT Greengrass. Resource definitions are used to organize your resource definition versions.

Resource definitions can reference multiple resource definition versions. All resource definition versions must be associated with a resource definition. Each resource definition version can contain one or more resources. (In CloudFormation, resources are named *resource instances*.)

**Note**  
When you create a resource definition, you can optionally include an initial resource definition version. To associate a resource definition version later, create an [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-resourcedefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-resourcedefinitionversion.html) resource and specify the ID of this resource definition.  
After you create the resource definition version that contains the resources 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-resourcedefinition-syntax"></a>

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

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

```
{
  "Type" : "AWS::Greengrass::ResourceDefinition",
  "Properties" : {
      "[InitialVersion](#cfn-greengrass-resourcedefinition-initialversion)" : ResourceDefinitionVersion,
      "[Name](#cfn-greengrass-resourcedefinition-name)" : String,
      "[Tags](#cfn-greengrass-resourcedefinition-tags)" : [ [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html), ... ]
    }
}
```

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

```
Type: AWS::Greengrass::ResourceDefinition
Properties:
  [InitialVersion](#cfn-greengrass-resourcedefinition-initialversion): 
    ResourceDefinitionVersion
  [Name](#cfn-greengrass-resourcedefinition-name): String
  [Tags](#cfn-greengrass-resourcedefinition-tags): 
    - [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)
```

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

`InitialVersion`  <a name="cfn-greengrass-resourcedefinition-initialversion"></a>
The resource definition version to include when the resource definition is created. A resource definition version contains a list of [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-resourceinstance.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-resourceinstance.html) property types.  
To associate a resource definition version after the resource definition is created, create an [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-resourcedefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-resourcedefinitionversion.html) resource and specify the ID of this resource definition.
*Required*: No  
*Type*: [ResourceDefinitionVersion](aws-properties-greengrass-resourcedefinition-resourcedefinitionversion.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-greengrass-resourcedefinition-name"></a>
The name of the resource definition.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-greengrass-resourcedefinition-tags"></a>
Application-specific metadata to attach to the resource definition. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tagging Your AWS IoT Greengrass Resources](https://docs.aws.amazon.com/greengrass/v1/developerguide/tagging.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.  
This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in CloudFormation templates.  

```
"Tags": {
    "KeyName0": "value",
    "KeyName1": "value",
    "KeyName2": "value"
}
```
*Required*: No  
*Type*: Array of [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

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

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

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the resource definition, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`.

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-resourcedefinition-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

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

#### 
<a name="aws-resource-greengrass-resourcedefinition-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the `ResourceDefinition`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/resources/1234a5b6-78cd-901e-2fgh-3i45j6k178l9`.

`Id`  <a name="Id-fn::getatt"></a>
The ID of the `ResourceDefinition`, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`.

`LatestVersionArn`  <a name="LatestVersionArn-fn::getatt"></a>
The ARN of the last `ResourceDefinitionVersion` that was added to the `ResourceDefinition`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/resources/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2`. 

`Name`  <a name="Name-fn::getatt"></a>
The name of the `ResourceDefinition`, such as `MyResourceDefinition`.

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



### Resource Definition Snippet
<a name="aws-resource-greengrass-resourcedefinition--examples--Resource_Definition_Snippet"></a>

The following snippet defines a resource definition resource with an initial version that contains each type of resource.

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-resourcedefinition--examples--Resource_Definition_Snippet--json"></a>

```
"TestResourceDefinition": {
    "Type": "AWS::Greengrass::ResourceDefinition",
    "Properties": {
        "Name": "DemoTestResourceDefinition",
        "InitialVersion": {
            "Resources": [
                {
                    "Id": "ResourceId1",
                    "Name": "LocalDeviceResource",
                    "ResourceDataContainer": {
                        "LocalDeviceResourceData": {
                            "SourcePath": "/dev/TestSourcePath1",
                            "GroupOwnerSetting": {
                                "AutoAddGroupOwner": "false",
                                "GroupOwner": "TestOwner"
                            }
                        }
                    }
                },
                {
                    "Id": "ResourceId2",
                    "Name": "LocalVolumeResourceData",
                    "ResourceDataContainer": {
                        "LocalVolumeResourceData": {
                            "SourcePath": "/dev/TestSourcePath2",
                            "DestinationPath": "/volumes/TestDestinationPath2",
                            "GroupOwnerSetting": {
                                "AutoAddGroupOwner": "false",
                                "GroupOwner": "TestOwner"
                            }
                        }
                    }
                },
                {
                    "Id": "ResourceId3",
                    "Name": "SageMakerMachineLearningModelResourceData",
                    "ResourceDataContainer": {
                        "SageMakerMachineLearningModelResourceData": {
                            "SageMakerJobArn": {
                                "Fn::Join": [
                                    ":",
                                    [
                                        "arn:aws:sagemaker",
                                        {
                                            "Ref": "AWS::Region"
                                        },
                                        {
                                            "Ref": "AWS::AccountId"
                                        },
                                        "training-job/testJob"
                                    ]
                                ]
                            },
                            "DestinationPath": "/sagemakermodels/TestDestinationPath3"
                        }
                    }
                },
                {
                    "Id": "ResourceId4",
                    "Name": "S3MachineLearningModelResourceData",
                    "ResourceDataContainer": {
                        "S3MachineLearningModelResourceData": {
                            "S3Uri": "http://amzn-s3-demo-bucket.s3.amazonaws.com/testUri.zip",
                            "DestinationPath": "/mlModels/TestDestinationPath4"
                        }
                    }
                },
                {
                    "Id": "ResourceId5",
                    "Name": "SecretsManagerSecretResourceData",
                    "ResourceDataContainer": {
                        "SecretsManagerSecretResourceData": {
                            "ARN": {
                                "Fn::Join": [
                                    ":",
                                    [
                                        "arn:aws:secretsmanager",
                                        {
                                            "Ref": "AWS::Region"
                                        },
                                        {
                                            "Ref": "AWS::AccountId"
                                        },
                                        "secret:testARN"
                                    ]
                                ]
                            },
                            "AdditionalStagingLabelsToDownload": [
                                "label1",
                                "label2"
                            ]
                        }
                    }
                }
            ]
        }
    }
}
```

#### YAML
<a name="aws-resource-greengrass-resourcedefinition--examples--Resource_Definition_Snippet--yaml"></a>

```
TestResourceDefinition:
  Type: 'AWS::Greengrass::ResourceDefinition'
  Properties:
    Name: DemoTestResourceDefinition
TestResourceDefinitionVersion:
  Type: 'AWS::Greengrass::ResourceDefinitionVersion'
  Properties:
    ResourceDefinitionId: !Ref TestResourceDefinition
    Resources:
      - Id: ResourceId1
        Name: LocalDeviceResource
        ResourceDataContainer:
          LocalDeviceResourceData:
            SourcePath: /dev/TestSourcePath1
            GroupOwnerSetting:
              AutoAddGroupOwner: 'false'
              GroupOwner: TestOwner
      - Id: ResourceId2
        Name: LocalVolumeResourceData
        ResourceDataContainer:
          LocalVolumeResourceData:
            SourcePath: /dev/TestSourcePath2
            DestinationPath: /volumes/TestDestinationPath2
            GroupOwnerSetting:
              AutoAddGroupOwner: 'false'
              GroupOwner: TestOwner
      - Id: ResourceId3
        Name: SageMakerMachineLearningModelResourceData
        ResourceDataContainer:
          SageMakerMachineLearningModelResourceData:
            SageMakerJobArn: !Join 
              - ':'
              - - 'arn:aws:sagemaker'
                - !Ref 'AWS::Region'
                - !Ref 'AWS::AccountId'
                - training-job/testJob
            DestinationPath: /sagemakermodels/TestDestinationPath3
      - Id: ResourceId4
        Name: S3MachineLearningModelResourceData
        ResourceDataContainer:
          S3MachineLearningModelResourceData:
            S3Uri: 'http://amzn-s3-demo-bucket.s3.amazonaws.com/testUri.zip'
            DestinationPath: /mlModels/TestDestinationPath4
      - Id: ResourceId5
        Name: SecretsManagerSecretResourceData
        ResourceDataContainer:
          SecretsManagerSecretResourceData:
            ARN: !Join 
              - ':'
              - - 'arn:aws:secretsmanager'
                - !Ref 'AWS::Region'
                - !Ref 'AWS::AccountId'
                - 'secret:testARN'
            AdditionalStagingLabelsToDownload:
              - label1
              - label2
```

## See also
<a name="aws-resource-greengrass-resourcedefinition--seealso"></a>
+ [CreateResourceDefinition](https://docs.aws.amazon.com/greengrass/v1/apireference/createresourcedefinition-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::ResourceDefinition GroupOwnerSetting
<a name="aws-properties-greengrass-resourcedefinition-groupownersetting"></a>

<a name="aws-properties-greengrass-resourcedefinition-groupownersetting-description"></a>Settings that define additional Linux OS group permissions to give to the Lambda function process. You can give the permissions of the Linux group that owns the resource or choose another Linux group. These permissions are in addition to the function's `RunAs` permissions.

<a name="aws-properties-greengrass-resourcedefinition-groupownersetting-inheritance"></a> In an CloudFormation template, `GroupOwnerSetting` is a property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-localdeviceresourcedata.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-localdeviceresourcedata.html) and [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-localvolumeresourcedata.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-localvolumeresourcedata.html) property types.

## Syntax
<a name="aws-properties-greengrass-resourcedefinition-groupownersetting-syntax"></a>

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

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

```
{
  "[AutoAddGroupOwner](#cfn-greengrass-resourcedefinition-groupownersetting-autoaddgroupowner)" : Boolean,
  "[GroupOwner](#cfn-greengrass-resourcedefinition-groupownersetting-groupowner)" : String
}
```

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

```
  [AutoAddGroupOwner](#cfn-greengrass-resourcedefinition-groupownersetting-autoaddgroupowner): Boolean
  [GroupOwner](#cfn-greengrass-resourcedefinition-groupownersetting-groupowner): String
```

## Properties
<a name="aws-properties-greengrass-resourcedefinition-groupownersetting-properties"></a>

`AutoAddGroupOwner`  <a name="cfn-greengrass-resourcedefinition-groupownersetting-autoaddgroupowner"></a>
Indicates whether to give the privileges of the Linux group that owns the resource to the Lambda process. This gives the Lambda process the file access permissions of the Linux group.  
*Required*: Yes  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`GroupOwner`  <a name="cfn-greengrass-resourcedefinition-groupownersetting-groupowner"></a>
The name of the Linux group whose privileges you want to add to the Lambda process. This value is ignored if `AutoAddGroupOwner` is true.  
*Required*: No  
*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-resourcedefinition-groupownersetting--seealso"></a>
+ [GroupOwnerSetting](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-groupownersetting.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::ResourceDefinition LocalDeviceResourceData
<a name="aws-properties-greengrass-resourcedefinition-localdeviceresourcedata"></a>

<a name="aws-properties-greengrass-resourcedefinition-localdeviceresourcedata-description"></a>Settings for a local device resource, which represents a file under `/dev`. For more information, see [Access Local Resources with Lambda Functions](https://docs.aws.amazon.com/greengrass/v1/developerguide/access-local-resources.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-resourcedefinition-localdeviceresourcedata-inheritance"></a> In an CloudFormation template, `LocalDeviceResourceData` can be used in the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-resourcedatacontainer.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-resourcedatacontainer.html) property type.

## Syntax
<a name="aws-properties-greengrass-resourcedefinition-localdeviceresourcedata-syntax"></a>

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

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

```
{
  "[GroupOwnerSetting](#cfn-greengrass-resourcedefinition-localdeviceresourcedata-groupownersetting)" : GroupOwnerSetting,
  "[SourcePath](#cfn-greengrass-resourcedefinition-localdeviceresourcedata-sourcepath)" : String
}
```

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

```
  [GroupOwnerSetting](#cfn-greengrass-resourcedefinition-localdeviceresourcedata-groupownersetting): 
    GroupOwnerSetting
  [SourcePath](#cfn-greengrass-resourcedefinition-localdeviceresourcedata-sourcepath): String
```

## Properties
<a name="aws-properties-greengrass-resourcedefinition-localdeviceresourcedata-properties"></a>

`GroupOwnerSetting`  <a name="cfn-greengrass-resourcedefinition-localdeviceresourcedata-groupownersetting"></a>
Settings that define additional Linux OS group permissions to give to the Lambda function process.  
*Required*: No  
*Type*: [GroupOwnerSetting](aws-properties-greengrass-resourcedefinition-groupownersetting.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourcePath`  <a name="cfn-greengrass-resourcedefinition-localdeviceresourcedata-sourcepath"></a>
The local absolute path of the device resource. The source path for a device resource can refer only to a character device or block device under `/dev`.  
*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-resourcedefinition-localdeviceresourcedata--seealso"></a>
+ [LocalDeviceResourceData](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-localdeviceresourcedata.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::ResourceDefinition LocalVolumeResourceData
<a name="aws-properties-greengrass-resourcedefinition-localvolumeresourcedata"></a>

<a name="aws-properties-greengrass-resourcedefinition-localvolumeresourcedata-description"></a>Settings for a local volume resource, which represents a file or directory on the root file system. For more information, see [Access Local Resources with Lambda Functions](https://docs.aws.amazon.com/greengrass/v1/developerguide/access-local-resources.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-resourcedefinition-localvolumeresourcedata-inheritance"></a> In an CloudFormation template, `LocalVolumeResourceData` can be used in the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-resourcedatacontainer.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-resourcedatacontainer.html) property type.

## Syntax
<a name="aws-properties-greengrass-resourcedefinition-localvolumeresourcedata-syntax"></a>

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

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

```
{
  "[DestinationPath](#cfn-greengrass-resourcedefinition-localvolumeresourcedata-destinationpath)" : String,
  "[GroupOwnerSetting](#cfn-greengrass-resourcedefinition-localvolumeresourcedata-groupownersetting)" : GroupOwnerSetting,
  "[SourcePath](#cfn-greengrass-resourcedefinition-localvolumeresourcedata-sourcepath)" : String
}
```

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

```
  [DestinationPath](#cfn-greengrass-resourcedefinition-localvolumeresourcedata-destinationpath): String
  [GroupOwnerSetting](#cfn-greengrass-resourcedefinition-localvolumeresourcedata-groupownersetting): 
    GroupOwnerSetting
  [SourcePath](#cfn-greengrass-resourcedefinition-localvolumeresourcedata-sourcepath): String
```

## Properties
<a name="aws-properties-greengrass-resourcedefinition-localvolumeresourcedata-properties"></a>

`DestinationPath`  <a name="cfn-greengrass-resourcedefinition-localvolumeresourcedata-destinationpath"></a>
The absolute local path of the resource in the Lambda environment.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`GroupOwnerSetting`  <a name="cfn-greengrass-resourcedefinition-localvolumeresourcedata-groupownersetting"></a>
Settings that define additional Linux OS group permissions to give to the Lambda function process.  
*Required*: No  
*Type*: [GroupOwnerSetting](aws-properties-greengrass-resourcedefinition-groupownersetting.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourcePath`  <a name="cfn-greengrass-resourcedefinition-localvolumeresourcedata-sourcepath"></a>
The local absolute path of the volume resource on the host. The source path for a volume resource type cannot start with `/sys`.  
*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-resourcedefinition-localvolumeresourcedata--seealso"></a>
+ [LocalVolumeResourceData](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-localvolumeresourcedata.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::ResourceDefinition ResourceDataContainer
<a name="aws-properties-greengrass-resourcedefinition-resourcedatacontainer"></a>

<a name="aws-properties-greengrass-resourcedefinition-resourcedatacontainer-description"></a>A container for resource data, which defines the resource type. The container takes only one of the following supported resource data types: `LocalDeviceResourceData`, `LocalVolumeResourceData`, `SageMakerMachineLearningModelResourceData`, `S3MachineLearningModelResourceData`, or `SecretsManagerSecretResourceData`.

**Note**  
Only one resource type can be defined for a `ResourceDataContainer` instance.

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

## Syntax
<a name="aws-properties-greengrass-resourcedefinition-resourcedatacontainer-syntax"></a>

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

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

```
{
  "[LocalDeviceResourceData](#cfn-greengrass-resourcedefinition-resourcedatacontainer-localdeviceresourcedata)" : LocalDeviceResourceData,
  "[LocalVolumeResourceData](#cfn-greengrass-resourcedefinition-resourcedatacontainer-localvolumeresourcedata)" : LocalVolumeResourceData,
  "[S3MachineLearningModelResourceData](#cfn-greengrass-resourcedefinition-resourcedatacontainer-s3machinelearningmodelresourcedata)" : S3MachineLearningModelResourceData,
  "[SageMakerMachineLearningModelResourceData](#cfn-greengrass-resourcedefinition-resourcedatacontainer-sagemakermachinelearningmodelresourcedata)" : SageMakerMachineLearningModelResourceData,
  "[SecretsManagerSecretResourceData](#cfn-greengrass-resourcedefinition-resourcedatacontainer-secretsmanagersecretresourcedata)" : SecretsManagerSecretResourceData
}
```

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

```
  [LocalDeviceResourceData](#cfn-greengrass-resourcedefinition-resourcedatacontainer-localdeviceresourcedata): 
    LocalDeviceResourceData
  [LocalVolumeResourceData](#cfn-greengrass-resourcedefinition-resourcedatacontainer-localvolumeresourcedata): 
    LocalVolumeResourceData
  [S3MachineLearningModelResourceData](#cfn-greengrass-resourcedefinition-resourcedatacontainer-s3machinelearningmodelresourcedata): 
    S3MachineLearningModelResourceData
  [SageMakerMachineLearningModelResourceData](#cfn-greengrass-resourcedefinition-resourcedatacontainer-sagemakermachinelearningmodelresourcedata): 
    SageMakerMachineLearningModelResourceData
  [SecretsManagerSecretResourceData](#cfn-greengrass-resourcedefinition-resourcedatacontainer-secretsmanagersecretresourcedata): 
    SecretsManagerSecretResourceData
```

## Properties
<a name="aws-properties-greengrass-resourcedefinition-resourcedatacontainer-properties"></a>

`LocalDeviceResourceData`  <a name="cfn-greengrass-resourcedefinition-resourcedatacontainer-localdeviceresourcedata"></a>
Settings for a local device resource.  
*Required*: No  
*Type*: [LocalDeviceResourceData](aws-properties-greengrass-resourcedefinition-localdeviceresourcedata.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LocalVolumeResourceData`  <a name="cfn-greengrass-resourcedefinition-resourcedatacontainer-localvolumeresourcedata"></a>
Settings for a local volume resource.  
*Required*: No  
*Type*: [LocalVolumeResourceData](aws-properties-greengrass-resourcedefinition-localvolumeresourcedata.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`S3MachineLearningModelResourceData`  <a name="cfn-greengrass-resourcedefinition-resourcedatacontainer-s3machinelearningmodelresourcedata"></a>
Settings for a machine learning resource stored in Amazon S3.  
*Required*: No  
*Type*: [S3MachineLearningModelResourceData](aws-properties-greengrass-resourcedefinition-s3machinelearningmodelresourcedata.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SageMakerMachineLearningModelResourceData`  <a name="cfn-greengrass-resourcedefinition-resourcedatacontainer-sagemakermachinelearningmodelresourcedata"></a>
Settings for a machine learning resource saved as an SageMaker AI training job.  
*Required*: No  
*Type*: [SageMakerMachineLearningModelResourceData](aws-properties-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SecretsManagerSecretResourceData`  <a name="cfn-greengrass-resourcedefinition-resourcedatacontainer-secretsmanagersecretresourcedata"></a>
Settings for a secret resource.  
*Required*: No  
*Type*: [SecretsManagerSecretResourceData](aws-properties-greengrass-resourcedefinition-secretsmanagersecretresourcedata.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-resourcedefinition-resourcedatacontainer--seealso"></a>
+ [ResourceDataContainer](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-resourcedatacontainer.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::ResourceDefinition ResourceDefinitionVersion
<a name="aws-properties-greengrass-resourcedefinition-resourcedefinitionversion"></a>

<a name="aws-properties-greengrass-resourcedefinition-resourcedefinitionversion-description"></a>A resource definition version contains a list of resources. (In CloudFormation, resources are named *resource instances*.)

**Note**  
After you create a resource definition version that contains the resources 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).

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

## Syntax
<a name="aws-properties-greengrass-resourcedefinition-resourcedefinitionversion-syntax"></a>

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

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

```
{
  "[Resources](#cfn-greengrass-resourcedefinition-resourcedefinitionversion-resources)" : [ ResourceInstance, ... ]
}
```

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

```
  [Resources](#cfn-greengrass-resourcedefinition-resourcedefinitionversion-resources): 
    - ResourceInstance
```

## Properties
<a name="aws-properties-greengrass-resourcedefinition-resourcedefinitionversion-properties"></a>

`Resources`  <a name="cfn-greengrass-resourcedefinition-resourcedefinitionversion-resources"></a>
The resources in this version.  
*Required*: Yes  
*Type*: Array of [ResourceInstance](aws-properties-greengrass-resourcedefinition-resourceinstance.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-resourcedefinition-resourcedefinitionversion--seealso"></a>
+ [ResourceDefinitionVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-resourcedefinitionversion.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::ResourceDefinition ResourceDownloadOwnerSetting
<a name="aws-properties-greengrass-resourcedefinition-resourcedownloadownersetting"></a>

The owner setting for a downloaded machine learning resource. For more information, see [Access Machine Learning Resources from Lambda Functions](https://docs.aws.amazon.com/greengrass/v1/developerguide/access-ml-resources.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-resourcedefinition-resourcedownloadownersetting-inheritance"></a> In an CloudFormation template, `ResourceDownloadOwnerSetting` is the property type of the `OwnerSetting` property for the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-s3machinelearningmodelresourcedata.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-s3machinelearningmodelresourcedata.html) and [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata.html) property types.

## Syntax
<a name="aws-properties-greengrass-resourcedefinition-resourcedownloadownersetting-syntax"></a>

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

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

```
{
  "[GroupOwner](#cfn-greengrass-resourcedefinition-resourcedownloadownersetting-groupowner)" : String,
  "[GroupPermission](#cfn-greengrass-resourcedefinition-resourcedownloadownersetting-grouppermission)" : String
}
```

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

```
  [GroupOwner](#cfn-greengrass-resourcedefinition-resourcedownloadownersetting-groupowner): String
  [GroupPermission](#cfn-greengrass-resourcedefinition-resourcedownloadownersetting-grouppermission): String
```

## Properties
<a name="aws-properties-greengrass-resourcedefinition-resourcedownloadownersetting-properties"></a>

`GroupOwner`  <a name="cfn-greengrass-resourcedefinition-resourcedownloadownersetting-groupowner"></a>
The group owner of the machine learning resource. This is the group ID (GID) of an existing Linux OS group on the system. The group's permissions are added to the Lambda process.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`GroupPermission`  <a name="cfn-greengrass-resourcedefinition-resourcedownloadownersetting-grouppermission"></a>
The permissions that the group owner has to the machine learning resource. Valid values are `rw` (read-write) or `ro` (read-only).  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Greengrass::ResourceDefinition ResourceInstance
<a name="aws-properties-greengrass-resourcedefinition-resourceinstance"></a>

<a name="aws-properties-greengrass-resourcedefinition-resourceinstance-description"></a>A local resource, machine learning resource, or secret resource. For more information, see [Access Local Resources with Lambda Functions](https://docs.aws.amazon.com/greengrass/v1/developerguide/access-local-resources.html), [Perform Machine Learning Inference](https://docs.aws.amazon.com/greengrass/v1/developerguide/ml-inference.html), and [Deploy Secrets to the AWS IoT Greengrass Core](https://docs.aws.amazon.com/greengrass/v1/developerguide/secrets.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

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

## Syntax
<a name="aws-properties-greengrass-resourcedefinition-resourceinstance-syntax"></a>

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

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

```
{
  "[Id](#cfn-greengrass-resourcedefinition-resourceinstance-id)" : String,
  "[Name](#cfn-greengrass-resourcedefinition-resourceinstance-name)" : String,
  "[ResourceDataContainer](#cfn-greengrass-resourcedefinition-resourceinstance-resourcedatacontainer)" : ResourceDataContainer
}
```

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

```
  [Id](#cfn-greengrass-resourcedefinition-resourceinstance-id): String
  [Name](#cfn-greengrass-resourcedefinition-resourceinstance-name): String
  [ResourceDataContainer](#cfn-greengrass-resourcedefinition-resourceinstance-resourcedatacontainer): 
    ResourceDataContainer
```

## Properties
<a name="aws-properties-greengrass-resourcedefinition-resourceinstance-properties"></a>

`Id`  <a name="cfn-greengrass-resourcedefinition-resourceinstance-id"></a>
A descriptive or arbitrary ID for the resource. This value must be unique within the resource 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)

`Name`  <a name="cfn-greengrass-resourcedefinition-resourceinstance-name"></a>
The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Maximum length 128 characters with pattern [a-zA-Z0-9:\$1-]\$1. This must be unique within a Greengrass group.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ResourceDataContainer`  <a name="cfn-greengrass-resourcedefinition-resourceinstance-resourcedatacontainer"></a>
A container for resource data. The container takes only one of the following supported resource data types: `LocalDeviceResourceData`, `LocalVolumeResourceData`, `SageMakerMachineLearningModelResourceData`, `S3MachineLearningModelResourceData`, or `SecretsManagerSecretResourceData`.  
Only one resource type can be defined for a `ResourceDataContainer` instance.
*Required*: Yes  
*Type*: [ResourceDataContainer](aws-properties-greengrass-resourcedefinition-resourcedatacontainer.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-resourcedefinition-resourceinstance--seealso"></a>
+ [Resource](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-resource.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::ResourceDefinition S3MachineLearningModelResourceData
<a name="aws-properties-greengrass-resourcedefinition-s3machinelearningmodelresourcedata"></a>

<a name="aws-properties-greengrass-resourcedefinition-s3machinelearningmodelresourcedata-description"></a>Settings for an Amazon S3 machine learning resource. For more information, see [Perform Machine Learning Inference](https://docs.aws.amazon.com/greengrass/v1/developerguide/ml-inference.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-resourcedefinition-s3machinelearningmodelresourcedata-inheritance"></a> In an CloudFormation template, `S3MachineLearningModelResourceData` can be used in the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-resourcedatacontainer.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-resourcedatacontainer.html) property type.

## Syntax
<a name="aws-properties-greengrass-resourcedefinition-s3machinelearningmodelresourcedata-syntax"></a>

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

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

```
{
  "[DestinationPath](#cfn-greengrass-resourcedefinition-s3machinelearningmodelresourcedata-destinationpath)" : String,
  "[OwnerSetting](#cfn-greengrass-resourcedefinition-s3machinelearningmodelresourcedata-ownersetting)" : ResourceDownloadOwnerSetting,
  "[S3Uri](#cfn-greengrass-resourcedefinition-s3machinelearningmodelresourcedata-s3uri)" : String
}
```

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

```
  [DestinationPath](#cfn-greengrass-resourcedefinition-s3machinelearningmodelresourcedata-destinationpath): String
  [OwnerSetting](#cfn-greengrass-resourcedefinition-s3machinelearningmodelresourcedata-ownersetting): 
    ResourceDownloadOwnerSetting
  [S3Uri](#cfn-greengrass-resourcedefinition-s3machinelearningmodelresourcedata-s3uri): String
```

## Properties
<a name="aws-properties-greengrass-resourcedefinition-s3machinelearningmodelresourcedata-properties"></a>

`DestinationPath`  <a name="cfn-greengrass-resourcedefinition-s3machinelearningmodelresourcedata-destinationpath"></a>
The absolute local path of the resource inside the Lambda environment.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`OwnerSetting`  <a name="cfn-greengrass-resourcedefinition-s3machinelearningmodelresourcedata-ownersetting"></a>
The owner setting for the downloaded machine learning resource. For more information, see [Access Machine Learning Resources from Lambda Functions](https://docs.aws.amazon.com/greengrass/v1/developerguide/access-ml-resources.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.  
*Required*: No  
*Type*: [ResourceDownloadOwnerSetting](aws-properties-greengrass-resourcedefinition-resourcedownloadownersetting.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`S3Uri`  <a name="cfn-greengrass-resourcedefinition-s3machinelearningmodelresourcedata-s3uri"></a>
The URI of the source model in an Amazon S3 bucket. The model package must be in `tar.gz` or `.zip` format.  
*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-resourcedefinition-s3machinelearningmodelresourcedata--seealso"></a>
+ [S3MachineLearningModelResourceData](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-s3machinelearningmodelresourcedata.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::ResourceDefinition SageMakerMachineLearningModelResourceData
<a name="aws-properties-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata"></a>

<a name="aws-properties-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata-description"></a>Settings for an Secrets Manager machine learning resource. For more information, see [Perform Machine Learning Inference](https://docs.aws.amazon.com/greengrass/v1/developerguide/ml-inference.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata-inheritance"></a> In an CloudFormation template, `SageMakerMachineLearningModelResourceData` can be used in the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-resourcedatacontainer.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-resourcedatacontainer.html) property type.

## Syntax
<a name="aws-properties-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata-syntax"></a>

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

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

```
{
  "[DestinationPath](#cfn-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata-destinationpath)" : String,
  "[OwnerSetting](#cfn-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata-ownersetting)" : ResourceDownloadOwnerSetting,
  "[SageMakerJobArn](#cfn-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata-sagemakerjobarn)" : String
}
```

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

```
  [DestinationPath](#cfn-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata-destinationpath): String
  [OwnerSetting](#cfn-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata-ownersetting): 
    ResourceDownloadOwnerSetting
  [SageMakerJobArn](#cfn-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata-sagemakerjobarn): String
```

## Properties
<a name="aws-properties-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata-properties"></a>

`DestinationPath`  <a name="cfn-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata-destinationpath"></a>
The absolute local path of the resource inside the Lambda environment.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`OwnerSetting`  <a name="cfn-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata-ownersetting"></a>
The owner setting for the downloaded machine learning resource. For more information, see [Access Machine Learning Resources from Lambda Functions](https://docs.aws.amazon.com/greengrass/v1/developerguide/access-ml-resources.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.  
*Required*: No  
*Type*: [ResourceDownloadOwnerSetting](aws-properties-greengrass-resourcedefinition-resourcedownloadownersetting.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SageMakerJobArn`  <a name="cfn-greengrass-resourcedefinition-sagemakermachinelearningmodelresourcedata-sagemakerjobarn"></a>
The Amazon Resource Name (ARN) of the Amazon SageMaker AI training job that represents the source model.  
*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-resourcedefinition-sagemakermachinelearningmodelresourcedata--seealso"></a>
+ [SageMakerMachineLearningModelResourceData](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-sagemakermachinelearningmodelresourcedata.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::ResourceDefinition SecretsManagerSecretResourceData
<a name="aws-properties-greengrass-resourcedefinition-secretsmanagersecretresourcedata"></a>

<a name="aws-properties-greengrass-resourcedefinition-secretsmanagersecretresourcedata-description"></a>Settings for a secret resource, which references a secret from AWS Secrets Manager. AWS IoT Greengrass stores a local, encrypted copy of the secret on the Greengrass core, where it can be securely accessed by connectors and Lambda functions. For more information, see [Deploy Secrets to the AWS IoT Greengrass Core](https://docs.aws.amazon.com/greengrass/v1/developerguide/secrets.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-resourcedefinition-secretsmanagersecretresourcedata-inheritance"></a> In an CloudFormation template, `SecretsManagerSecretResourceData` can be used in the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-resourcedatacontainer.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinition-resourcedatacontainer.html) property type.

## Syntax
<a name="aws-properties-greengrass-resourcedefinition-secretsmanagersecretresourcedata-syntax"></a>

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

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

```
{
  "[AdditionalStagingLabelsToDownload](#cfn-greengrass-resourcedefinition-secretsmanagersecretresourcedata-additionalstaginglabelstodownload)" : [ String, ... ],
  "[ARN](#cfn-greengrass-resourcedefinition-secretsmanagersecretresourcedata-arn)" : String
}
```

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

```
  [AdditionalStagingLabelsToDownload](#cfn-greengrass-resourcedefinition-secretsmanagersecretresourcedata-additionalstaginglabelstodownload): 
    - String
  [ARN](#cfn-greengrass-resourcedefinition-secretsmanagersecretresourcedata-arn): String
```

## Properties
<a name="aws-properties-greengrass-resourcedefinition-secretsmanagersecretresourcedata-properties"></a>

`AdditionalStagingLabelsToDownload`  <a name="cfn-greengrass-resourcedefinition-secretsmanagersecretresourcedata-additionalstaginglabelstodownload"></a>
The staging labels whose values you want to make available on the core, in addition to `AWSCURRENT`.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ARN`  <a name="cfn-greengrass-resourcedefinition-secretsmanagersecretresourcedata-arn"></a>
The Amazon Resource Name (ARN) of the Secrets Manager secret to make available on the core. The value of the secret's latest version (represented by the `AWSCURRENT` staging label) is included by default.  
*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-resourcedefinition-secretsmanagersecretresourcedata--seealso"></a>
+ [SecretsManagerSecretResourceData](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-secretsmanagersecretresourcedata.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::ResourceDefinitionVersion
<a name="aws-resource-greengrass-resourcedefinitionversion"></a>

The `AWS::Greengrass::ResourceDefinitionVersion` resource represents a resource definition version for AWS IoT Greengrass. A resource definition version contains a list of resources. (In CloudFormation, resources are named *resource instances*.)

**Note**  
To create a resource definition version, you must specify the ID of the resource definition that you want to associate with the version. For information about creating a resource definition, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-resourcedefinition.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-resourcedefinition.html).  
After you create a resource definition version that contains the resources 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-resourcedefinitionversion-syntax"></a>

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

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

```
{
  "Type" : "AWS::Greengrass::ResourceDefinitionVersion",
  "Properties" : {
      "[ResourceDefinitionId](#cfn-greengrass-resourcedefinitionversion-resourcedefinitionid)" : String,
      "[Resources](#cfn-greengrass-resourcedefinitionversion-resources)" : [ ResourceInstance, ... ]
    }
}
```

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

```
Type: AWS::Greengrass::ResourceDefinitionVersion
Properties:
  [ResourceDefinitionId](#cfn-greengrass-resourcedefinitionversion-resourcedefinitionid): String
  [Resources](#cfn-greengrass-resourcedefinitionversion-resources): 
    - ResourceInstance
```

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

`ResourceDefinitionId`  <a name="cfn-greengrass-resourcedefinitionversion-resourcedefinitionid"></a>
The ID of the resource 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)

`Resources`  <a name="cfn-greengrass-resourcedefinitionversion-resources"></a>
The resources in this version.  
*Required*: Yes  
*Type*: Array of [ResourceInstance](aws-properties-greengrass-resourcedefinitionversion-resourceinstance.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-resourcedefinitionversion-return-values"></a>

### Ref
<a name="aws-resource-greengrass-resourcedefinitionversion-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 resource definition version, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/resources/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-resourcedefinitionversion-return-values-fn--getatt"></a>

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



### Resource Definition Version Snippet
<a name="aws-resource-greengrass-resourcedefinitionversion--examples--Resource_Definition_Version_Snippet"></a>

The following snippet defines resource definition and resource definition version resources. The resource definition version references the resource definition and contains each type of resource.

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-resourcedefinitionversion--examples--Resource_Definition_Version_Snippet--json"></a>

```
"TestResourceDefinition": {
    "Type": "AWS::Greengrass::ResourceDefinition",
    "Properties": {
        "Name": "DemoTestResourceDefinition"
    }
},
"TestResourceDefinitionVersion": {
    "Type": "AWS::Greengrass::ResourceDefinitionVersion",
    "Properties": {
        "ResourceDefinitionId": {
            "Ref": "TestResourceDefinition"
        },
        "Resources": [
            {
                "Id": "ResourceId1",
                "Name": "LocalDeviceResource",
                "ResourceDataContainer": {
                    "LocalDeviceResourceData": {
                        "SourcePath": "/dev/TestSourcePath1",
                        "GroupOwnerSetting": {
                            "AutoAddGroupOwner": "false",
                            "GroupOwner": "TestOwner"
                        }
                    }
                }
            },
            {
                "Id": "ResourceId2",
                "Name": "LocalVolumeResourceData",
                "ResourceDataContainer": {
                    "LocalVolumeResourceData": {
                        "SourcePath": "/dev/TestSourcePath2",
                        "DestinationPath": "/volumes/TestDestinationPath2",
                        "GroupOwnerSetting": {
                            "AutoAddGroupOwner": "false",
                            "GroupOwner": "TestOwner"
                        }
                    }
                }
            },
            {
                "Id": "ResourceId3",
                "Name": "SageMakerMachineLearningModelResourceData",
                "ResourceDataContainer": {
                    "SageMakerMachineLearningModelResourceData": {
                        "SageMakerJobArn": {
                            "Fn::Join": [
                                ":",
                                [
                                    "arn:aws:sagemaker",
                                    {
                                        "Ref": "AWS::Region"
                                    },
                                    {
                                        "Ref": "AWS::AccountId"
                                    },
                                    "training-job/testJob"
                                ]
                            ]
                        },
                        "DestinationPath": "/sagemakermodels/TestDestinationPath3"
                    }
                }
            },
            {
                "Id": "ResourceId4",
                "Name": "S3MachineLearningModelResourceData",
                "ResourceDataContainer": {
                    "S3MachineLearningModelResourceData": {
                        "S3Uri": "http://amzn-s3-demo-bucket.s3.amazonaws.com/testUri.zip",
                        "DestinationPath": "/mlModels/TestDestinationPath4"
                    }
                }
            },
            {
                "Id": "ResourceId5",
                "Name": "SecretsManagerSecretResourceData",
                "ResourceDataContainer": {
                    "SecretsManagerSecretResourceData": {
                        "ARN": {
                            "Fn::Join": [
                                ":",
                                [
                                    "arn:aws:secretsmanager",
                                    {
                                        "Ref": "AWS::Region"
                                    },
                                    {
                                        "Ref": "AWS::AccountId"
                                    },
                                    "secret:testARN"
                                ]
                            ]
                        },
                        "AdditionalStagingLabelsToDownload": [
                            "label1",
                            "label2"
                        ]
                    }
                }
            }
        ]
    }
}
```

#### YAML
<a name="aws-resource-greengrass-resourcedefinitionversion--examples--Resource_Definition_Version_Snippet--yaml"></a>

```
TestResourceDefinition:
  Type: 'AWS::Greengrass::ResourceDefinition'
  Properties:
    Name: DemoTestResourceDefinition
    InitialVersion:
      Resources:
        - Id: ResourceId1
          Name: LocalDeviceResource
          ResourceDataContainer:
            LocalDeviceResourceData:
              SourcePath: /dev/TestSourcePath1
              GroupOwnerSetting:
                AutoAddGroupOwner: 'false'
                GroupOwner: TestOwner
        - Id: ResourceId2
          Name: LocalVolumeResourceData
          ResourceDataContainer:
            LocalVolumeResourceData:
              SourcePath: /dev/TestSourcePath2
              DestinationPath: /volumes/TestDestinationPath2
              GroupOwnerSetting:
                AutoAddGroupOwner: 'false'
                GroupOwner: TestOwner
        - Id: ResourceId3
          Name: SageMakerMachineLearningModelResourceData
          ResourceDataContainer:
            SageMakerMachineLearningModelResourceData:
              SageMakerJobArn: !Join 
                - ':'
                - - 'arn:aws:sagemaker'
                  - !Ref 'AWS::Region'
                  - !Ref 'AWS::AccountId'
                  - training-job/testJob
              DestinationPath: /sagemakermodels/TestDestinationPath3
        - Id: ResourceId4
          Name: S3MachineLearningModelResourceData
          ResourceDataContainer:
            S3MachineLearningModelResourceData:
              S3Uri: 'http://<shared id="example-s3-bucket"/>.s3.amazonaws.com/testUri.zip'
              DestinationPath: /mlModels/TestDestinationPath4
        - Id: ResourceId5
          Name: SecretsManagerSecretResourceData
          ResourceDataContainer:
            SecretsManagerSecretResourceData:
              ARN: !Join 
                - ':'
                - - 'arn:aws:secretsmanager'
                  - !Ref 'AWS::Region'
                  - !Ref 'AWS::AccountId'
                  - 'secret:testARN'
              AdditionalStagingLabelsToDownload:
                - label1
                - label2
```

## See also
<a name="aws-resource-greengrass-resourcedefinitionversion--seealso"></a>
+ [CreateResourceDefinitionVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/createresourcedefinitionversion-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::ResourceDefinitionVersion GroupOwnerSetting
<a name="aws-properties-greengrass-resourcedefinitionversion-groupownersetting"></a>

<a name="aws-properties-greengrass-resourcedefinitionversion-groupownersetting-description"></a>Settings that define additional Linux OS group permissions to give to the Lambda function process. You can give the permissions of the Linux group that owns the resource or choose another Linux group. These permissions are in addition to the function's `RunAs` permissions.

<a name="aws-properties-greengrass-resourcedefinitionversion-groupownersetting-inheritance"></a> In an CloudFormation template, `GroupOwnerSetting` is a property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-localdeviceresourcedata.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-localdeviceresourcedata.html) and [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-localvolumeresourcedata.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-localvolumeresourcedata.html) property types.

## Syntax
<a name="aws-properties-greengrass-resourcedefinitionversion-groupownersetting-syntax"></a>

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

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

```
{
  "[AutoAddGroupOwner](#cfn-greengrass-resourcedefinitionversion-groupownersetting-autoaddgroupowner)" : Boolean,
  "[GroupOwner](#cfn-greengrass-resourcedefinitionversion-groupownersetting-groupowner)" : String
}
```

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

```
  [AutoAddGroupOwner](#cfn-greengrass-resourcedefinitionversion-groupownersetting-autoaddgroupowner): Boolean
  [GroupOwner](#cfn-greengrass-resourcedefinitionversion-groupownersetting-groupowner): String
```

## Properties
<a name="aws-properties-greengrass-resourcedefinitionversion-groupownersetting-properties"></a>

`AutoAddGroupOwner`  <a name="cfn-greengrass-resourcedefinitionversion-groupownersetting-autoaddgroupowner"></a>
Indicates whether to give the privileges of the Linux group that owns the resource to the Lambda process. This gives the Lambda process the file access permissions of the Linux group.  
*Required*: Yes  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`GroupOwner`  <a name="cfn-greengrass-resourcedefinitionversion-groupownersetting-groupowner"></a>
The name of the Linux group whose privileges you want to add to the Lambda process. This value is ignored if `AutoAddGroupOwner` is true.  
*Required*: No  
*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-resourcedefinitionversion-groupownersetting--seealso"></a>
+ [GroupOwnerSetting](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-groupownersetting.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::ResourceDefinitionVersion LocalDeviceResourceData
<a name="aws-properties-greengrass-resourcedefinitionversion-localdeviceresourcedata"></a>

<a name="aws-properties-greengrass-resourcedefinitionversion-localdeviceresourcedata-description"></a>Settings for a local device resource, which represents a file under `/dev`. For more information, see [Access Local Resources with Lambda Functions](https://docs.aws.amazon.com/greengrass/v1/developerguide/access-local-resources.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-resourcedefinitionversion-localdeviceresourcedata-inheritance"></a> In an CloudFormation template, `LocalDeviceResourceData` can be used in the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer.html) property type.

## Syntax
<a name="aws-properties-greengrass-resourcedefinitionversion-localdeviceresourcedata-syntax"></a>

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

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

```
{
  "[GroupOwnerSetting](#cfn-greengrass-resourcedefinitionversion-localdeviceresourcedata-groupownersetting)" : GroupOwnerSetting,
  "[SourcePath](#cfn-greengrass-resourcedefinitionversion-localdeviceresourcedata-sourcepath)" : String
}
```

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

```
  [GroupOwnerSetting](#cfn-greengrass-resourcedefinitionversion-localdeviceresourcedata-groupownersetting): 
    GroupOwnerSetting
  [SourcePath](#cfn-greengrass-resourcedefinitionversion-localdeviceresourcedata-sourcepath): String
```

## Properties
<a name="aws-properties-greengrass-resourcedefinitionversion-localdeviceresourcedata-properties"></a>

`GroupOwnerSetting`  <a name="cfn-greengrass-resourcedefinitionversion-localdeviceresourcedata-groupownersetting"></a>
Settings that define additional Linux OS group permissions to give to the Lambda function process.  
*Required*: No  
*Type*: [GroupOwnerSetting](aws-properties-greengrass-resourcedefinitionversion-groupownersetting.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourcePath`  <a name="cfn-greengrass-resourcedefinitionversion-localdeviceresourcedata-sourcepath"></a>
The local absolute path of the device resource. The source path for a device resource can refer only to a character device or block device under `/dev`.  
*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-resourcedefinitionversion-localdeviceresourcedata--seealso"></a>
+ [LocalDeviceResourceData](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-localdeviceresourcedata.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::ResourceDefinitionVersion LocalVolumeResourceData
<a name="aws-properties-greengrass-resourcedefinitionversion-localvolumeresourcedata"></a>

<a name="aws-properties-greengrass-resourcedefinitionversion-localvolumeresourcedata-description"></a>Settings for a local volume resource, which represents a file or directory on the root file system. For more information, see [Access Local Resources with Lambda Functions](https://docs.aws.amazon.com/greengrass/v1/developerguide/access-local-resources.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-resourcedefinitionversion-localvolumeresourcedata-inheritance"></a> In an CloudFormation template, `LocalVolumeResourceData` can be used in the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer.html) property type.

## Syntax
<a name="aws-properties-greengrass-resourcedefinitionversion-localvolumeresourcedata-syntax"></a>

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

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

```
{
  "[DestinationPath](#cfn-greengrass-resourcedefinitionversion-localvolumeresourcedata-destinationpath)" : String,
  "[GroupOwnerSetting](#cfn-greengrass-resourcedefinitionversion-localvolumeresourcedata-groupownersetting)" : GroupOwnerSetting,
  "[SourcePath](#cfn-greengrass-resourcedefinitionversion-localvolumeresourcedata-sourcepath)" : String
}
```

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

```
  [DestinationPath](#cfn-greengrass-resourcedefinitionversion-localvolumeresourcedata-destinationpath): String
  [GroupOwnerSetting](#cfn-greengrass-resourcedefinitionversion-localvolumeresourcedata-groupownersetting): 
    GroupOwnerSetting
  [SourcePath](#cfn-greengrass-resourcedefinitionversion-localvolumeresourcedata-sourcepath): String
```

## Properties
<a name="aws-properties-greengrass-resourcedefinitionversion-localvolumeresourcedata-properties"></a>

`DestinationPath`  <a name="cfn-greengrass-resourcedefinitionversion-localvolumeresourcedata-destinationpath"></a>
The absolute local path of the resource in the Lambda environment.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`GroupOwnerSetting`  <a name="cfn-greengrass-resourcedefinitionversion-localvolumeresourcedata-groupownersetting"></a>
Settings that define additional Linux OS group permissions to give to the Lambda function process.  
*Required*: No  
*Type*: [GroupOwnerSetting](aws-properties-greengrass-resourcedefinitionversion-groupownersetting.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourcePath`  <a name="cfn-greengrass-resourcedefinitionversion-localvolumeresourcedata-sourcepath"></a>
The local absolute path of the volume resource on the host. The source path for a volume resource type cannot start with `/sys`.  
*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-resourcedefinitionversion-localvolumeresourcedata--seealso"></a>
+ [LocalVolumeResourceData](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-localvolumeresourcedata.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::ResourceDefinitionVersion ResourceDataContainer
<a name="aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer"></a>

<a name="aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer-description"></a>A container for resource data, which defines the resource type. The container takes only one of the following supported resource data types: `LocalDeviceResourceData`, `LocalVolumeResourceData`, `SageMakerMachineLearningModelResourceData`, `S3MachineLearningModelResourceData`, or `SecretsManagerSecretResourceData`.

**Note**  
Only one resource type can be defined for a `ResourceDataContainer` instance.

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

## Syntax
<a name="aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer-syntax"></a>

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

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

```
{
  "[LocalDeviceResourceData](#cfn-greengrass-resourcedefinitionversion-resourcedatacontainer-localdeviceresourcedata)" : LocalDeviceResourceData,
  "[LocalVolumeResourceData](#cfn-greengrass-resourcedefinitionversion-resourcedatacontainer-localvolumeresourcedata)" : LocalVolumeResourceData,
  "[S3MachineLearningModelResourceData](#cfn-greengrass-resourcedefinitionversion-resourcedatacontainer-s3machinelearningmodelresourcedata)" : S3MachineLearningModelResourceData,
  "[SageMakerMachineLearningModelResourceData](#cfn-greengrass-resourcedefinitionversion-resourcedatacontainer-sagemakermachinelearningmodelresourcedata)" : SageMakerMachineLearningModelResourceData,
  "[SecretsManagerSecretResourceData](#cfn-greengrass-resourcedefinitionversion-resourcedatacontainer-secretsmanagersecretresourcedata)" : SecretsManagerSecretResourceData
}
```

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

```
  [LocalDeviceResourceData](#cfn-greengrass-resourcedefinitionversion-resourcedatacontainer-localdeviceresourcedata): 
    LocalDeviceResourceData
  [LocalVolumeResourceData](#cfn-greengrass-resourcedefinitionversion-resourcedatacontainer-localvolumeresourcedata): 
    LocalVolumeResourceData
  [S3MachineLearningModelResourceData](#cfn-greengrass-resourcedefinitionversion-resourcedatacontainer-s3machinelearningmodelresourcedata): 
    S3MachineLearningModelResourceData
  [SageMakerMachineLearningModelResourceData](#cfn-greengrass-resourcedefinitionversion-resourcedatacontainer-sagemakermachinelearningmodelresourcedata): 
    SageMakerMachineLearningModelResourceData
  [SecretsManagerSecretResourceData](#cfn-greengrass-resourcedefinitionversion-resourcedatacontainer-secretsmanagersecretresourcedata): 
    SecretsManagerSecretResourceData
```

## Properties
<a name="aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer-properties"></a>

`LocalDeviceResourceData`  <a name="cfn-greengrass-resourcedefinitionversion-resourcedatacontainer-localdeviceresourcedata"></a>
Settings for a local device resource.  
*Required*: No  
*Type*: [LocalDeviceResourceData](aws-properties-greengrass-resourcedefinitionversion-localdeviceresourcedata.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LocalVolumeResourceData`  <a name="cfn-greengrass-resourcedefinitionversion-resourcedatacontainer-localvolumeresourcedata"></a>
Settings for a local volume resource.  
*Required*: No  
*Type*: [LocalVolumeResourceData](aws-properties-greengrass-resourcedefinitionversion-localvolumeresourcedata.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`S3MachineLearningModelResourceData`  <a name="cfn-greengrass-resourcedefinitionversion-resourcedatacontainer-s3machinelearningmodelresourcedata"></a>
Settings for a machine learning resource stored in Amazon S3.  
*Required*: No  
*Type*: [S3MachineLearningModelResourceData](aws-properties-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SageMakerMachineLearningModelResourceData`  <a name="cfn-greengrass-resourcedefinitionversion-resourcedatacontainer-sagemakermachinelearningmodelresourcedata"></a>
Settings for a machine learning resource saved as an SageMaker AI training job.  
*Required*: No  
*Type*: [SageMakerMachineLearningModelResourceData](aws-properties-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SecretsManagerSecretResourceData`  <a name="cfn-greengrass-resourcedefinitionversion-resourcedatacontainer-secretsmanagersecretresourcedata"></a>
Settings for a secret resource.  
*Required*: No  
*Type*: [SecretsManagerSecretResourceData](aws-properties-greengrass-resourcedefinitionversion-secretsmanagersecretresourcedata.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-resourcedefinitionversion-resourcedatacontainer--seealso"></a>
+ [ResourceDataContainer](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-resourcedatacontainer.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::ResourceDefinitionVersion ResourceDownloadOwnerSetting
<a name="aws-properties-greengrass-resourcedefinitionversion-resourcedownloadownersetting"></a>

The owner setting for a downloaded machine learning resource. For more information, see [Access Machine Learning Resources from Lambda Functions](https://docs.aws.amazon.com/greengrass/v1/developerguide/access-ml-resources.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-resourcedefinitionversion-resourcedownloadownersetting-inheritance"></a> In an CloudFormation template, `ResourceDownloadOwnerSetting` is the property type of the `OwnerSetting` property for the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata.html) and [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata.html) property types.

## Syntax
<a name="aws-properties-greengrass-resourcedefinitionversion-resourcedownloadownersetting-syntax"></a>

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

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

```
{
  "[GroupOwner](#cfn-greengrass-resourcedefinitionversion-resourcedownloadownersetting-groupowner)" : String,
  "[GroupPermission](#cfn-greengrass-resourcedefinitionversion-resourcedownloadownersetting-grouppermission)" : String
}
```

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

```
  [GroupOwner](#cfn-greengrass-resourcedefinitionversion-resourcedownloadownersetting-groupowner): String
  [GroupPermission](#cfn-greengrass-resourcedefinitionversion-resourcedownloadownersetting-grouppermission): String
```

## Properties
<a name="aws-properties-greengrass-resourcedefinitionversion-resourcedownloadownersetting-properties"></a>

`GroupOwner`  <a name="cfn-greengrass-resourcedefinitionversion-resourcedownloadownersetting-groupowner"></a>
The group owner of the machine learning resource. This is the group ID (GID) of an existing Linux OS group on the system. The group's permissions are added to the Lambda process.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`GroupPermission`  <a name="cfn-greengrass-resourcedefinitionversion-resourcedownloadownersetting-grouppermission"></a>
The permissions that the group owner has to the machine learning resource. Valid values are `rw` (read-write) or `ro` (read-only).  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::Greengrass::ResourceDefinitionVersion ResourceInstance
<a name="aws-properties-greengrass-resourcedefinitionversion-resourceinstance"></a>

<a name="aws-properties-greengrass-resourcedefinitionversion-resourceinstance-description"></a>A local resource, machine learning resource, or secret resource. For more information, see [Access Local Resources with Lambda Functions](https://docs.aws.amazon.com/greengrass/v1/developerguide/access-local-resources.html), [Perform Machine Learning Inference](https://docs.aws.amazon.com/greengrass/v1/developerguide/ml-inference.html), and [Deploy Secrets to the AWS IoT Greengrass Core](https://docs.aws.amazon.com/greengrass/v1/developerguide/secrets.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

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

## Syntax
<a name="aws-properties-greengrass-resourcedefinitionversion-resourceinstance-syntax"></a>

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

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

```
{
  "[Id](#cfn-greengrass-resourcedefinitionversion-resourceinstance-id)" : String,
  "[Name](#cfn-greengrass-resourcedefinitionversion-resourceinstance-name)" : String,
  "[ResourceDataContainer](#cfn-greengrass-resourcedefinitionversion-resourceinstance-resourcedatacontainer)" : ResourceDataContainer
}
```

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

```
  [Id](#cfn-greengrass-resourcedefinitionversion-resourceinstance-id): String
  [Name](#cfn-greengrass-resourcedefinitionversion-resourceinstance-name): String
  [ResourceDataContainer](#cfn-greengrass-resourcedefinitionversion-resourceinstance-resourcedatacontainer): 
    ResourceDataContainer
```

## Properties
<a name="aws-properties-greengrass-resourcedefinitionversion-resourceinstance-properties"></a>

`Id`  <a name="cfn-greengrass-resourcedefinitionversion-resourceinstance-id"></a>
A descriptive or arbitrary ID for the resource. This value must be unique within the resource 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)

`Name`  <a name="cfn-greengrass-resourcedefinitionversion-resourceinstance-name"></a>
The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Maximum length 128 characters with pattern [a-zA-Z0-9:\$1-]\$1. This must be unique within a Greengrass group.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ResourceDataContainer`  <a name="cfn-greengrass-resourcedefinitionversion-resourceinstance-resourcedatacontainer"></a>
A container for resource data. The container takes only one of the following supported resource data types: `LocalDeviceResourceData`, `LocalVolumeResourceData`, `SageMakerMachineLearningModelResourceData`, `S3MachineLearningModelResourceData`, or `SecretsManagerSecretResourceData`.  
Only one resource type can be defined for a `ResourceDataContainer` instance.
*Required*: Yes  
*Type*: [ResourceDataContainer](aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer.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-resourcedefinitionversion-resourceinstance--seealso"></a>
+ [Resource](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-resource.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::ResourceDefinitionVersion S3MachineLearningModelResourceData
<a name="aws-properties-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata"></a>

<a name="aws-properties-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata-description"></a>Settings for an Amazon S3 machine learning resource. For more information, see [Perform Machine Learning Inference](https://docs.aws.amazon.com/greengrass/v1/developerguide/ml-inference.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata-inheritance"></a> In an CloudFormation template, `S3MachineLearningModelResourceData` can be used in the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer.html) property type.

## Syntax
<a name="aws-properties-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata-syntax"></a>

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

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

```
{
  "[DestinationPath](#cfn-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata-destinationpath)" : String,
  "[OwnerSetting](#cfn-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata-ownersetting)" : ResourceDownloadOwnerSetting,
  "[S3Uri](#cfn-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata-s3uri)" : String
}
```

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

```
  [DestinationPath](#cfn-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata-destinationpath): String
  [OwnerSetting](#cfn-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata-ownersetting): 
    ResourceDownloadOwnerSetting
  [S3Uri](#cfn-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata-s3uri): String
```

## Properties
<a name="aws-properties-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata-properties"></a>

`DestinationPath`  <a name="cfn-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata-destinationpath"></a>
The absolute local path of the resource inside the Lambda environment.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`OwnerSetting`  <a name="cfn-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata-ownersetting"></a>
The owner setting for the downloaded machine learning resource. For more information, see [Access Machine Learning Resources from Lambda Functions](https://docs.aws.amazon.com/greengrass/v1/developerguide/access-ml-resources.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.  
*Required*: No  
*Type*: [ResourceDownloadOwnerSetting](aws-properties-greengrass-resourcedefinitionversion-resourcedownloadownersetting.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`S3Uri`  <a name="cfn-greengrass-resourcedefinitionversion-s3machinelearningmodelresourcedata-s3uri"></a>
The URI of the source model in an Amazon S3 bucket. The model package must be in `tar.gz` or `.zip` format.  
*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-resourcedefinitionversion-s3machinelearningmodelresourcedata--seealso"></a>
+ [S3MachineLearningModelResourceData](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-s3machinelearningmodelresourcedata.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::ResourceDefinitionVersion SageMakerMachineLearningModelResourceData
<a name="aws-properties-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata"></a>

<a name="aws-properties-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata-description"></a>Settings for an Secrets Manager machine learning resource. For more information, see [Perform Machine Learning Inference](https://docs.aws.amazon.com/greengrass/v1/developerguide/ml-inference.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata-inheritance"></a> In an CloudFormation template, `SageMakerMachineLearningModelResourceData` can be used in the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer.html) property type.

## Syntax
<a name="aws-properties-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata-syntax"></a>

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

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

```
{
  "[DestinationPath](#cfn-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata-destinationpath)" : String,
  "[OwnerSetting](#cfn-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata-ownersetting)" : ResourceDownloadOwnerSetting,
  "[SageMakerJobArn](#cfn-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata-sagemakerjobarn)" : String
}
```

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

```
  [DestinationPath](#cfn-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata-destinationpath): String
  [OwnerSetting](#cfn-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata-ownersetting): 
    ResourceDownloadOwnerSetting
  [SageMakerJobArn](#cfn-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata-sagemakerjobarn): String
```

## Properties
<a name="aws-properties-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata-properties"></a>

`DestinationPath`  <a name="cfn-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata-destinationpath"></a>
The absolute local path of the resource inside the Lambda environment.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`OwnerSetting`  <a name="cfn-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata-ownersetting"></a>
The owner setting for the downloaded machine learning resource. For more information, see [Access Machine Learning Resources from Lambda Functions](https://docs.aws.amazon.com/greengrass/v1/developerguide/access-ml-resources.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.  
*Required*: No  
*Type*: [ResourceDownloadOwnerSetting](aws-properties-greengrass-resourcedefinitionversion-resourcedownloadownersetting.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SageMakerJobArn`  <a name="cfn-greengrass-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata-sagemakerjobarn"></a>
The Amazon Resource Name (ARN) of the Amazon SageMaker AI training job that represents the source model.  
*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-resourcedefinitionversion-sagemakermachinelearningmodelresourcedata--seealso"></a>
+ [SageMakerMachineLearningModelResourceData](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-sagemakermachinelearningmodelresourcedata.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::ResourceDefinitionVersion SecretsManagerSecretResourceData
<a name="aws-properties-greengrass-resourcedefinitionversion-secretsmanagersecretresourcedata"></a>

<a name="aws-properties-greengrass-resourcedefinitionversion-secretsmanagersecretresourcedata-description"></a>Settings for a secret resource, which references a secret from AWS Secrets Manager. AWS IoT Greengrass stores a local, encrypted copy of the secret on the Greengrass core, where it can be securely accessed by connectors and Lambda functions. For more information, see [Deploy Secrets to the AWS IoT Greengrass Core](https://docs.aws.amazon.com/greengrass/v1/developerguide/secrets.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.

<a name="aws-properties-greengrass-resourcedefinitionversion-secretsmanagersecretresourcedata-inheritance"></a> In an CloudFormation template, `SecretsManagerSecretResourceData` can be used in the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-resourcedatacontainer.html) property type.

## Syntax
<a name="aws-properties-greengrass-resourcedefinitionversion-secretsmanagersecretresourcedata-syntax"></a>

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

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

```
{
  "[AdditionalStagingLabelsToDownload](#cfn-greengrass-resourcedefinitionversion-secretsmanagersecretresourcedata-additionalstaginglabelstodownload)" : [ String, ... ],
  "[ARN](#cfn-greengrass-resourcedefinitionversion-secretsmanagersecretresourcedata-arn)" : String
}
```

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

```
  [AdditionalStagingLabelsToDownload](#cfn-greengrass-resourcedefinitionversion-secretsmanagersecretresourcedata-additionalstaginglabelstodownload): 
    - String
  [ARN](#cfn-greengrass-resourcedefinitionversion-secretsmanagersecretresourcedata-arn): String
```

## Properties
<a name="aws-properties-greengrass-resourcedefinitionversion-secretsmanagersecretresourcedata-properties"></a>

`AdditionalStagingLabelsToDownload`  <a name="cfn-greengrass-resourcedefinitionversion-secretsmanagersecretresourcedata-additionalstaginglabelstodownload"></a>
The staging labels whose values you want to make available on the core, in addition to `AWSCURRENT`.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ARN`  <a name="cfn-greengrass-resourcedefinitionversion-secretsmanagersecretresourcedata-arn"></a>
The Amazon Resource Name (ARN) of the Secrets Manager secret to make available on the core. The value of the secret's latest version (represented by the `AWSCURRENT` staging label) is included by default.  
*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-resourcedefinitionversion-secretsmanagersecretresourcedata--seealso"></a>
+ [SecretsManagerSecretResourceData](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-secretsmanagersecretresourcedata.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::SubscriptionDefinition
<a name="aws-resource-greengrass-subscriptiondefinition"></a>

The `AWS::Greengrass::SubscriptionDefinition` resource represents a subscription definition for AWS IoT Greengrass. Subscription definitions are used to organize your subscription definition versions.

Subscription definitions can reference multiple subscription definition versions. All subscription definition versions must be associated with a subscription definition. Each subscription definition version can contain one or more subscriptions.

**Note**  
When you create a subscription definition, you can optionally include an initial subscription definition version. To associate a subscription definition version later, create an [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-subscriptiondefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-subscriptiondefinitionversion.html) resource and specify the ID of this subscription definition.  
After you create the subscription definition version that contains the subscriptions 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-subscriptiondefinition-syntax"></a>

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

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

```
{
  "Type" : "AWS::Greengrass::SubscriptionDefinition",
  "Properties" : {
      "[InitialVersion](#cfn-greengrass-subscriptiondefinition-initialversion)" : SubscriptionDefinitionVersion,
      "[Name](#cfn-greengrass-subscriptiondefinition-name)" : String,
      "[Tags](#cfn-greengrass-subscriptiondefinition-tags)" : [ [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html), ... ]
    }
}
```

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

```
Type: AWS::Greengrass::SubscriptionDefinition
Properties:
  [InitialVersion](#cfn-greengrass-subscriptiondefinition-initialversion): 
    SubscriptionDefinitionVersion
  [Name](#cfn-greengrass-subscriptiondefinition-name): String
  [Tags](#cfn-greengrass-subscriptiondefinition-tags): 
    - [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)
```

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

`InitialVersion`  <a name="cfn-greengrass-subscriptiondefinition-initialversion"></a>
The subscription definition version to include when the subscription definition is created. A subscription definition version contains a list of [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinition-subscription.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinition-subscription.html) property types.  
To associate a subscription definition version after the subscription definition is created, create an [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-subscriptiondefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-subscriptiondefinitionversion.html) resource and specify the ID of this subscription definition.
*Required*: No  
*Type*: [SubscriptionDefinitionVersion](aws-properties-greengrass-subscriptiondefinition-subscriptiondefinitionversion.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-greengrass-subscriptiondefinition-name"></a>
The name of the subscription definition.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-greengrass-subscriptiondefinition-tags"></a>
Application-specific metadata to attach to the subscription definition. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tagging Your AWS IoT Greengrass Resources](https://docs.aws.amazon.com/greengrass/v1/developerguide/tagging.html) in the * AWS IoT Greengrass Version 1 Developer Guide *.  
This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in CloudFormation templates.  

```
"Tags": {
    "KeyName0": "value",
    "KeyName1": "value",
    "KeyName2": "value"
}
```
*Required*: No  
*Type*: Array of [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-resource-tags.html)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

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

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

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the subscription definition, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

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-subscriptiondefinition-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

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

#### 
<a name="aws-resource-greengrass-subscriptiondefinition-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the `SubscriptionDefinition`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/subscriptions/1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

`Id`  <a name="Id-fn::getatt"></a>
The ID of the `SubscriptionDefinition`, such as `1234a5b6-78cd-901e-2fgh-3i45j6k178l9`. 

`LatestVersionArn`  <a name="LatestVersionArn-fn::getatt"></a>
The ARN of the last `SubscriptionDefinitionVersion` that was added to the `SubscriptionDefinition`, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/subscriptions/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2`. 

`Name`  <a name="Name-fn::getatt"></a>
The name of the `SubscriptionDefinition`, such as `MySubscriptionDefinition`. 

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



### Subscription Definition Snippet
<a name="aws-resource-greengrass-subscriptiondefinition--examples--Subscription_Definition_Snippet"></a>

The following snippet defines a subscription definition subscription with an initial version that contains a subscription. In this example, the subscription source is an existing device in the group. The target is a function in the group that was 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-subscription-greengrass-group.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-subscription-greengrass-group.html) subscription.

#### JSON
<a name="aws-resource-greengrass-subscriptiondefinition--examples--Subscription_Definition_Snippet--json"></a>

```
"TestSubscriptionDefinition": {
    "Type": "AWS::Greengrass::SubscriptionDefinition",
    "Properties": {
        "Name": "DemoTestSubscriptionDefinition",
        "InitialVersion": {
            "Subscriptions": [
                {
                    "Id": "TestSubscription1",
                    "Source": {
                        "Fn::Join": [
                            ":",
                            [
                                "arn:aws:iot",
                                {
                                    "Ref": "AWS::Region"
                                },
                                {
                                    "Ref": "AWS::AccountId"
                                },
                                "thing/TestDevice1"
                            ]
                        ]
                    },
                    "Subject": "some/topic",
                    "Target": {
                        "Fn::ImportValue": "TestCanaryLambdaVersionArn"
                    }
                }
            ]
        }
    }
}
```

#### YAML
<a name="aws-resource-greengrass-subscriptiondefinition--examples--Subscription_Definition_Snippet--yaml"></a>

```
TestSubscriptionDefinition:
  Type: 'AWS::Greengrass::SubscriptionDefinition'
  Properties:
    Name: DemoTestSubscriptionDefinition
    InitialVersion:
      Subscriptions:
        - Id: TestSubscription1
          Source: !Join 
            - ':'
            - - 'arn:aws:iot'
              - !Ref 'AWS::Region'
              - !Ref 'AWS::AccountId'
              - thing/TestDevice1
          Subject: some/topic
          Target: !ImportValue TestCanaryLambdaVersionArn
```

## See also
<a name="aws-resource-greengrass-subscriptiondefinition--seealso"></a>
+ [CreateSubscriptionDefinition](https://docs.aws.amazon.com/greengrass/v1/apireference/createsubscriptiondefinition-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::SubscriptionDefinition Subscription
<a name="aws-properties-greengrass-subscriptiondefinition-subscription"></a>

<a name="aws-properties-greengrass-subscriptiondefinition-subscription-description"></a>Subscriptions define how MQTT messages can be exchanged between devices, functions, and connectors in the group, and with AWS IoT or the local shadow service. A subscription defines a message source, message target, and a topic (or subject) that's used to route messages from the source to the target. A subscription defines the message flow in one direction, from the source to the target. For two-way communication, you must set up two subscriptions, one for each direction.

<a name="aws-properties-greengrass-subscriptiondefinition-subscription-inheritance"></a> In an CloudFormation template, the `Subscriptions` property of the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinition-subscriptiondefinitionversion.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinition-subscriptiondefinitionversion.html) property type contains a list of `Subscription` property types.

## Syntax
<a name="aws-properties-greengrass-subscriptiondefinition-subscription-syntax"></a>

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

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

```
{
  "[Id](#cfn-greengrass-subscriptiondefinition-subscription-id)" : String,
  "[Source](#cfn-greengrass-subscriptiondefinition-subscription-source)" : String,
  "[Subject](#cfn-greengrass-subscriptiondefinition-subscription-subject)" : String,
  "[Target](#cfn-greengrass-subscriptiondefinition-subscription-target)" : String
}
```

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

```
  [Id](#cfn-greengrass-subscriptiondefinition-subscription-id): String
  [Source](#cfn-greengrass-subscriptiondefinition-subscription-source): String
  [Subject](#cfn-greengrass-subscriptiondefinition-subscription-subject): String
  [Target](#cfn-greengrass-subscriptiondefinition-subscription-target): String
```

## Properties
<a name="aws-properties-greengrass-subscriptiondefinition-subscription-properties"></a>

`Id`  <a name="cfn-greengrass-subscriptiondefinition-subscription-id"></a>
A descriptive or arbitrary ID for the subscription. This value must be unique within the subscription 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)

`Source`  <a name="cfn-greengrass-subscriptiondefinition-subscription-source"></a>
The originator of the message. The value can be a thing ARN, the ARN of a Lambda function alias (recommended) or version, a connector ARN, `cloud` (which represents the AWS IoT cloud), or `GGShadowService`.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Subject`  <a name="cfn-greengrass-subscriptiondefinition-subscription-subject"></a>
The MQTT topic used to route the message.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Target`  <a name="cfn-greengrass-subscriptiondefinition-subscription-target"></a>
The destination of the message. The value can be a thing ARN, the ARN of a Lambda function alias (recommended) or version, a connector ARN, `cloud` (which represents the AWS IoT cloud), or `GGShadowService`.  
*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-subscriptiondefinition-subscription--seealso"></a>
+ [Subscription](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-subscription.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::SubscriptionDefinition SubscriptionDefinitionVersion
<a name="aws-properties-greengrass-subscriptiondefinition-subscriptiondefinitionversion"></a>

<a name="aws-properties-greengrass-subscriptiondefinition-subscriptiondefinitionversion-description"></a> A subscription definition version contains a list of [subscriptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinition-subscription.html).

**Note**  
After you create a subscription definition version that contains the subscriptions 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).

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

## Syntax
<a name="aws-properties-greengrass-subscriptiondefinition-subscriptiondefinitionversion-syntax"></a>

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

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

```
{
  "[Subscriptions](#cfn-greengrass-subscriptiondefinition-subscriptiondefinitionversion-subscriptions)" : [ Subscription, ... ]
}
```

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

```
  [Subscriptions](#cfn-greengrass-subscriptiondefinition-subscriptiondefinitionversion-subscriptions): 
    - Subscription
```

## Properties
<a name="aws-properties-greengrass-subscriptiondefinition-subscriptiondefinitionversion-properties"></a>

`Subscriptions`  <a name="cfn-greengrass-subscriptiondefinition-subscriptiondefinitionversion-subscriptions"></a>
The subscriptions in this version.  
*Required*: Yes  
*Type*: Array of [Subscription](aws-properties-greengrass-subscriptiondefinition-subscription.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-subscriptiondefinition-subscriptiondefinitionversion--seealso"></a>
+ [SubscriptionDefinitionVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-subscriptiondefinitionversion.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::SubscriptionDefinitionVersion
<a name="aws-resource-greengrass-subscriptiondefinitionversion"></a>

The `AWS::Greengrass::SubscriptionDefinitionVersion` resource represents a subscription definition version for AWS IoT Greengrass. A subscription definition version contains a list of subscriptions.

**Note**  
To create a subscription definition version, you must specify the ID of the subscription definition that you want to associate with the version. For information about creating a subscription definition, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-subscriptiondefinition.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-subscriptiondefinition.html).  
After you create a subscription definition version that contains the subscriptions 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-subscriptiondefinitionversion-syntax"></a>

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

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

```
{
  "Type" : "AWS::Greengrass::SubscriptionDefinitionVersion",
  "Properties" : {
      "[SubscriptionDefinitionId](#cfn-greengrass-subscriptiondefinitionversion-subscriptiondefinitionid)" : String,
      "[Subscriptions](#cfn-greengrass-subscriptiondefinitionversion-subscriptions)" : [ Subscription, ... ]
    }
}
```

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

```
Type: AWS::Greengrass::SubscriptionDefinitionVersion
Properties:
  [SubscriptionDefinitionId](#cfn-greengrass-subscriptiondefinitionversion-subscriptiondefinitionid): String
  [Subscriptions](#cfn-greengrass-subscriptiondefinitionversion-subscriptions): 
    - Subscription
```

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

`SubscriptionDefinitionId`  <a name="cfn-greengrass-subscriptiondefinitionversion-subscriptiondefinitionid"></a>
The ID of the subscription 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)

`Subscriptions`  <a name="cfn-greengrass-subscriptiondefinitionversion-subscriptions"></a>
The subscriptions in this version.  
*Required*: Yes  
*Type*: Array of [Subscription](aws-properties-greengrass-subscriptiondefinitionversion-subscription.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-subscriptiondefinitionversion-return-values"></a>

### Ref
<a name="aws-resource-greengrass-subscriptiondefinitionversion-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 subscription definition version, such as `arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/subscriptions/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-subscriptiondefinitionversion-return-values-fn--getatt"></a>

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



### Subscription Definition Version Snippet
<a name="aws-resource-greengrass-subscriptiondefinitionversion--examples--Subscription_Definition_Version_Snippet"></a>

The following snippet defines subscription definition and subscription definition version subscriptions. The subscription definition version references the subscription definition and contains a subscription. In this example, the subscription source is an existing device in the group. The target is a function in the group that was 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-subscription-greengrass-group.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-subscription-greengrass-group.html) subscription.

#### JSON
<a name="aws-resource-greengrass-subscriptiondefinitionversion--examples--Subscription_Definition_Version_Snippet--json"></a>

```
"TestSubscriptionDefinition": {
    "Type": "AWS::Greengrass::SubscriptionDefinition",
    "Properties": {
        "Name": "DemoTestSubscriptionDefinition"
    }
},
"TestSubscriptionDefinitionVersion": {
    "Type": "AWS::Greengrass::SubscriptionDefinitionVersion",
    "Properties": {
        "SubscriptionDefinitionId": {
            "Ref": "TestSubscriptionDefinition"
        },
        "Subscriptions": [
            {
                "Id": "TestSubscription1",
                "Source": {
                    "Fn::Join": [
                        ":",
                        [
                            "arn:aws:iot",
                            {
                                "Ref": "AWS::Region"
                            },
                            {
                                "Ref": "AWS::AccountId"
                            },
                            "thing/TestDevice1"
                        ]
                    ]
                },
                "Subject": "some/topic",
                "Target": {
                    "Fn::ImportValue": "TestCanaryLambdaVersionArn"
                }
            }
        ]
    }
}
```

#### YAML
<a name="aws-resource-greengrass-subscriptiondefinitionversion--examples--Subscription_Definition_Version_Snippet--yaml"></a>

```
TestSubscriptionDefinition:
  Type: 'AWS::Greengrass::SubscriptionDefinition'
  Properties:
    Name: DemoTestSubscriptionDefinition
TestSubscriptionDefinitionVersion:
  Type: 'AWS::Greengrass::SubscriptionDefinitionVersion'
  Properties:
    SubscriptionDefinitionId: !Ref TestSubscriptionDefinition
    Subscriptions:
      - Id: TestSubscription1
        Source: !Join 
          - ':'
          - - 'arn:aws:iot'
            - !Ref 'AWS::Region'
            - !Ref 'AWS::AccountId'
            - thing/TestDevice1
        Subject: some/topic
        Target: !ImportValue TestCanaryLambdaVersionArn
```

## See also
<a name="aws-resource-greengrass-subscriptiondefinitionversion--seealso"></a>
+ [CreateSubscriptionDefinitionVersion](https://docs.aws.amazon.com/greengrass/v1/apireference/createsubscriptiondefinitionversion-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::SubscriptionDefinitionVersion Subscription
<a name="aws-properties-greengrass-subscriptiondefinitionversion-subscription"></a>

<a name="aws-properties-greengrass-subscriptiondefinitionversion-subscription-description"></a>Subscriptions define how MQTT messages can be exchanged between devices, functions, and connectors in the group, and with AWS IoT or the local shadow service. A subscription defines a message source, message target, and a topic (or subject) that's used to route messages from the source to the target. A subscription defines the message flow in one direction, from the source to the target. For two-way communication, you must set up two subscriptions, one for each direction.

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

## Syntax
<a name="aws-properties-greengrass-subscriptiondefinitionversion-subscription-syntax"></a>

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

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

```
{
  "[Id](#cfn-greengrass-subscriptiondefinitionversion-subscription-id)" : String,
  "[Source](#cfn-greengrass-subscriptiondefinitionversion-subscription-source)" : String,
  "[Subject](#cfn-greengrass-subscriptiondefinitionversion-subscription-subject)" : String,
  "[Target](#cfn-greengrass-subscriptiondefinitionversion-subscription-target)" : String
}
```

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

```
  [Id](#cfn-greengrass-subscriptiondefinitionversion-subscription-id): String
  [Source](#cfn-greengrass-subscriptiondefinitionversion-subscription-source): String
  [Subject](#cfn-greengrass-subscriptiondefinitionversion-subscription-subject): String
  [Target](#cfn-greengrass-subscriptiondefinitionversion-subscription-target): String
```

## Properties
<a name="aws-properties-greengrass-subscriptiondefinitionversion-subscription-properties"></a>

`Id`  <a name="cfn-greengrass-subscriptiondefinitionversion-subscription-id"></a>
A descriptive or arbitrary ID for the subscription. This value must be unique within the subscription 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)

`Source`  <a name="cfn-greengrass-subscriptiondefinitionversion-subscription-source"></a>
The originator of the message. The value can be a thing ARN, the ARN of a Lambda function alias (recommended) or version, a connector ARN, `cloud` (which represents the AWS IoT cloud), or `GGShadowService`.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Subject`  <a name="cfn-greengrass-subscriptiondefinitionversion-subscription-subject"></a>
The MQTT topic used to route the message.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Target`  <a name="cfn-greengrass-subscriptiondefinitionversion-subscription-target"></a>
The destination of the message. The value can be a thing ARN, the ARN of a Lambda function alias (recommended) or version, a connector ARN, `cloud` (which represents the AWS IoT cloud), or `GGShadowService`.  
*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-subscriptiondefinitionversion-subscription--seealso"></a>
+ [Subscription](https://docs.aws.amazon.com/greengrass/v1/apireference/definitions-subscription.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/) 