Campaign
Source:
src/AWS/IoTFleetWise/Campaign.ts
An AWS IoT FleetWise campaign — the orchestration of data-collection
rules that the Edge Agent uses to decide which signals to collect from
a Fleet or Vehicle and where to deliver them.
Campaigns are created in WAITING_FOR_APPROVAL status; set
autoApprove: true to have the provider approve them into RUNNING.
Only the description and extra dimensions are mutable — every other
change replaces the campaign. AWS IoT FleetWise is allowlist-gated and
offered in us-east-1/eu-central-1 only.
Creating a Campaign
Section titled “Creating a Campaign”Time-Based Collection to S3
const campaign = yield* Campaign("SpeedTelemetry", { signalCatalogArn: catalog.signalCatalogArn, targetArn: fleet.fleetArn, collectionScheme: { timeBasedCollectionScheme: { period: "10 seconds" }, }, signalsToCollect: [{ name: "Vehicle.Speed" }], dataDestinationConfigs: [ { s3Config: { bucketArn: bucket.bucketArn } }, ], autoApprove: true,});Condition-Based Collection
const campaign = yield* Campaign("HardBraking", { signalCatalogArn: catalog.signalCatalogArn, targetArn: fleet.fleetArn, collectionScheme: { conditionBasedCollectionScheme: { expression: "$variable.`Vehicle.Speed` > 120.0", minimumTriggerInterval: "5 seconds", triggerMode: "RISING_EDGE", }, }, signalsToCollect: [ { name: "Vehicle.Speed", minimumSamplingInterval: "500 millis" }, ], postTriggerCollectionDuration: "30 seconds", dataDestinationConfigs: [ { s3Config: { bucketArn: bucket.bucketArn } }, ],});