AWS::GreengrassV2::ComponentVersion - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AWS::GreengrassV2::ComponentVersion

Creates a component. Components are software that run on Amazon IoT Greengrass core devices. After you develop and test a component on your core device, you can use this operation to upload your component to Amazon IoT Greengrass. Then, you can deploy the component to other core devices.

You can use this operation to do the following:

  • Create components from recipes

    Create a component from a recipe, which is a file that defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform capability. For more information, see Amazon IoT Greengrass component recipe reference in the Amazon IoT Greengrass V2 Developer Guide.

    To create a component from a recipe, specify inlineRecipe when you call this operation.

  • Create components from Lambda functions

    Create a component from an Amazon Lambda function that runs on Amazon IoT Greengrass. This creates a recipe and artifacts from the Lambda function's deployment package. You can use this operation to migrate Lambda functions from Amazon IoT Greengrass V1 to Amazon IoT Greengrass V2.

    This function accepts Lambda functions in all supported versions of Python, Node.js, and Java runtimes. Amazon IoT Greengrass doesn't apply any additional restrictions on deprecated Lambda runtime versions.

    To create a component from a Lambda function, specify lambdaFunction when you call this operation.

Syntax

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

JSON

{ "Type" : "AWS::GreengrassV2::ComponentVersion", "Properties" : { "InlineRecipe" : String, "LambdaFunction" : LambdaFunctionRecipeSource, "Tags" : {Key: Value, ...} } }

YAML

Type: AWS::GreengrassV2::ComponentVersion Properties: InlineRecipe: String LambdaFunction: LambdaFunctionRecipeSource Tags: Key: Value

Properties

InlineRecipe

The recipe to use to create the component. The recipe defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform compatibility.

You must specify either InlineRecipe or LambdaFunction.

Required: No

Type: String

Update requires: Replacement

LambdaFunction

The parameters to create a component from a Lambda function.

You must specify either InlineRecipe or LambdaFunction.

Required: No

Type: LambdaFunctionRecipeSource

Update requires: Replacement

Tags

Application-specific metadata to attach to the component version. You can use tags in IAM policies to control access to Amazon IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see Tag your Amazon IoT Greengrass Version 2 resources in the Amazon IoT Greengrass V2 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 Amazon CloudFormation templates.

"Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value" }

Required: No

Type: Object of String

Pattern: ^(?!aws:)[a-zA-Z+-=._:/]{1,128}$

Maximum: 256

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Arn.

For more information about using the Ref function, see Ref.

Fn::GetAtt

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 Fn::GetAtt.

Arn

The ARN of the component version.

ComponentName

The name of the component.

ComponentVersion

The version of the component.