Skip to content

ComponentVersion

Source: src/AWS/GreengrassV2/ComponentVersion.ts

An IoT Greengrass V2 component version created from an inline recipe. Components are software modules that run on Greengrass core devices.

Component versions are immutable in the cloud: any change to the recipe replaces the component version (a new name/version pair is registered and the previous one is deleted). Only tags are mutable in place.

Component from an inline JSON recipe

import * as GreengrassV2 from "alchemy/AWS/GreengrassV2";
const component = yield* GreengrassV2.ComponentVersion("Hello", {
recipe: JSON.stringify({
RecipeFormatVersion: "2020-01-25",
ComponentName: "com.example.Hello",
ComponentVersion: "1.0.0",
ComponentDescription: "Prints a greeting",
ComponentPublisher: "Example",
Manifests: [
{
Platform: { os: "linux" },
Lifecycle: { run: "echo hello" },
},
],
}),
});

Tagged component version

const component = yield* GreengrassV2.ComponentVersion("Hello", {
recipe,
tags: { team: "edge" },
});