Skip to content
GitHubXDiscord

Application

The Application resource lets you manage AWS IoTFleetHub Applications for monitoring and managing fleets of IoT devices.

Create a basic IoTFleetHub application with essential properties.

import AWS from "alchemy/aws/control";
const basicApplication = await AWS.IoTFleetHub.Application("basicFleetHubApp", {
ApplicationName: "BasicFleetHubApplication",
RoleArn: "arn:aws:iam::123456789012:role/MyIoTFleetHubRole",
ApplicationDescription: "A simple IoTFleetHub application for managing IoT devices"
});

Configure a more advanced application with tags for better resource management.

const advancedApplication = await AWS.IoTFleetHub.Application("advancedFleetHubApp", {
ApplicationName: "AdvancedFleetHubApplication",
RoleArn: "arn:aws:iam::123456789012:role/MyIoTFleetHubRole",
ApplicationDescription: "An advanced application with additional configurations.",
Tags: [
{ Key: "Environment", Value: "Production" },
{ Key: "Department", Value: "IoT" }
]
});

Create a new application that adopts an existing resource to avoid conflicts.

const adoptExistingApplication = await AWS.IoTFleetHub.Application("adoptFleetHubApp", {
ApplicationName: "AdoptedFleetHubApplication",
RoleArn: "arn:aws:iam::123456789012:role/MyIoTFleetHubRole",
adopt: true // Adopts the existing resource if it already exists
});

Create an application with a custom IAM role that grants specific permissions.

const customRoleApplication = await AWS.IoTFleetHub.Application("customRoleFleetHubApp", {
ApplicationName: "CustomRoleFleetHubApplication",
RoleArn: "arn:aws:iam::123456789012:role/CustomIoTFleetHubRole",
ApplicationDescription: "Application with a custom IAM role for specific access.",
Tags: [
{ Key: "AccessLevel", Value: "Admin" }
]
});