Skip to content
GitHubXDiscordRSS

Tracker

Learn how to create, update, and manage AWS Location Trackers using Alchemy Cloud Control.

The Tracker resource allows you to manage AWS Location Trackers for tracking the location of devices and assets in real-time.

Create a basic location tracker with required properties and a common optional property.

import AWS from "alchemy/aws/control";
const basicTracker = await AWS.Location.Tracker("basicTracker", {
TrackerName: "MyDeviceTracker",
Description: "Tracks the location of my devices",
EventBridgeEnabled: true
});

Configure a tracker with encryption settings and position filtering.

const advancedTracker = await AWS.Location.Tracker("advancedTracker", {
TrackerName: "SecureDeviceTracker",
Description: "Tracks devices with secure settings",
KmsKeyId: "arn:aws:kms:us-east-1:123456789012:key/abcd1234-efgh-5678-ijkl-9876543210mn",
KmsKeyEnableGeospatialQueries: true,
PositionFiltering: "TimeBased"
});

Create a tracker with tags for better resource organization.

const taggedTracker = await AWS.Location.Tracker("taggedTracker", {
TrackerName: "TaggedDeviceTracker",
Description: "Tracks devices with tagging",
Tags: [
{ Key: "Environment", Value: "Production" },
{ Key: "Team", Value: "Development" }
]
});

Adopt an existing tracker instead of failing if it already exists.

const adoptTracker = await AWS.Location.Tracker("adoptTracker", {
TrackerName: "ExistingDeviceTracker",
adopt: true
});