AWS::GreengrassV2::ComponentVersion - AWS CloudFormation

AWS::GreengrassV2::ComponentVersion

Creates a component. Components are software that run on AWS 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 AWS 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 AWS IoT Greengrass component recipe reference in the AWS 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 AWS Lambda function that runs on AWS 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 AWS IoT Greengrass V1 to AWS IoT Greengrass V2.

    This function accepts Lambda functions in all supported versions of Python, Node.js, and Java runtimes. AWS 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 AWS 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 AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see Tag your AWS IoT Greengrass Version 2 resources in the AWS 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 AWS 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.