

AWS IoT FleetWise will no longer be open to new customers as of April 30, 2026. Existing AWS IoT FleetWise customers can continue using the service. The [Guidance for Connected Mobility on AWS](https://aws.amazon.com/solutions/guidance/connected-mobility-on-aws/) provides guidance on how to develop and deploy modular services for connected mobility solutions that can be used to achieve equivalent capabilities as AWS IoT FleetWise.

# Store and forward campaign data
<a name="store-and-forward"></a>

**Important**  
Access to certain AWS IoT FleetWise features is currently gated. For more information, see [AWS Region and feature availability in AWS IoT FleetWise](fleetwise-regions.md).

Use data partitions within campaigns to temporarily store signal data on the Edge for vehicles and fleets. By configuring upload and storage options for data partitions, you can optimize your ideal conditions for data forwarding to your designated data destinations (like an Amazon S3 bucket). For example, you can configure the data partition to store data on a vehicle until it connects to Wi-Fi. Then, once the vehicle connects, the campaign triggers the data in that particular partition to be sent to the cloud. Alternatively, you can collect data using AWS IoT Jobs.

**Topics**
+ [Create data partitions](create-campaign-data-partitions.md)
+ [Upload campaign data](update-campaign-cli-data-partitions.md)
+ [Upload data using AWS IoT Jobs](update-campaign-cli-data-partitions-jobs.md)

# Create data partitions
<a name="create-campaign-data-partitions"></a>

**Important**  
Access to certain AWS IoT FleetWise features is currently gated. For more information, see [AWS Region and feature availability in AWS IoT FleetWise](fleetwise-regions.md).

A data partition in a campaign temporarily stores signal data. You configure when and how to forward the data to the cloud. 

A data partition works by first designating a particular set of data using the `dataPartitionId` for a campaign. Then, you can further define partition storage options such as maximum size, minimum time to keep the data partition live (on disk), and where to store the data on the Edge. You can determine the storage location on the vehicle using `storageLocation`. The storage location determines the folder name for the data partition under the campaign storage folder. The campaign storage folder is under a folder named after the vehicle name under a persistency path defined in the Edge config file. This is the absolute path of the storage location: `{persistency_path} / {vehicle_name} / {campaign_name} / {storage_location}`.

The spooling mode set to `TO_DISK` specifies that the partitioned data should be saved to a disk on the vehicle. Data storage for data partitions operates on a FIFO (first in, first out) basis. If you delete a campaign, you also delete the data in the associated data partition. If you don't specify a data partition for connectivity on/off use cases, AWS IoT FleetWise still stores data in a ring buffer on the vehicle when there is no connectivity. When connectivity resumes, AWS IoT FleetWise uploads the data to the cloud. This behavior is configurable in the Edge Agent for AWS IoT FleetWise software.

**Important**  
If your data partition exceeds your set maximum storage limit, newer data overwrites older data when the partition reaches the maximum size. Lost data on the Edge isn't recoverable. Storage size is determined by your Edge storage limit.  
When data is uploaded to the cloud, it can be removed after the minimum time to live passes. Set the minimum time to live appropriately to avoid unintended deletion.

Upload options determine variable expressions and condition language. If upload options are specified, you must also specify storage options. You can also request that signals in data partitions are uploaded into the cloud. For more information, see [Upload campaign data](update-campaign-cli-data-partitions.md).

After data partition conditions are defined, `signalsToCollect` helps specify which signals to account for in the data partition. You can either specify IDs for data partitions, or set the `dataPartitionId` to `default` to use an established default data partition. A signal without a specified `dataPartitionId` will be associated with the default `dataPartition`.

**To create a data partition**

Using the following example, create a campaign with a data partition storage condition. This example campaign is configured to store vehicle data in Amazon Timestream.

1. Replace *campaign-name* with the name of the campaign that you're creating.

1. (Optional) Provide a description.

1. Replace *role-arn* with the Amazon Resource Name (ARN) of the task execution role that grants AWS IoT FleetWise permission to deliver data to the Timestream table.

1. Replace *table-arn* with the ARN of the Timestream table.

1. Replace *signal-catalog-arn* with the ARN of the signal catalog.

1. Replace *data-partition-id* both for the `dataPartitions` ID and as the ID to associate with `signalsToCollect`. First, replace the ID of the data partition to use in the signal. For `signalsToCollect`, the ID must match one of the IDs provided in `dataPartitions`.
**Note**  
Establish a default data partition for a campaign by using `default` as the ID.

1. Replace *target-arn* with the ARN of a fleet or vehicle that you created.

```
{
    "name": "campaign-name",
    "description": "Measurement of SOC, SOH, thermal, and power optimization for Fleet 2704",
    "targetArn": "target-arn",
    "collectionScheme": {
        "conditionBasedCollectionScheme": {
            "conditionLanguageVersion": 1,
            "expression": "$variable.`Vehicle.BMS` > 50",
            "minimumTriggerIntervalMs": 1000,
            "triggerMode": "ALWAYS"
        }
    },
    "compression": "SNAPPY",
    "dataDestinationConfigs": [{
        "timestreamConfig": {
            "executionRoleArn": "role-arn",
            "timestreamTableArn": "table-arn"
        }
    }],
    "dataPartitions": [{
        "id": "data-partition-id",
        "storageOptions": {
            "maximumSize": {
                "unit": "GB",
                "value": 1024
            },
            "minimumTimeToLive": {
                "unit": "WEEKS",
                "value": 6
            },
            "storageLocation": "string"
        },
        "uploadOptions": {
            "conditionLanguageVersion": 1,
            "expression": "$variable.`Vehicle.BMS.PowerOptimization` > 90"
        }
    }],
    "signalCatalogArn": "signal-catalog-arn",
    "signalsToCollect": [{
        "dataPartitionId": "data-partition-id",
        "maxSampleCount": 50000,
        "minimumSamplingIntervalMs": 100,
        "name": "Below-90-percent"
    }],
    "spoolingMode": "TO_DISK",
    "tags": [{
        "Key": "BMS",
        "Value": "Under-90"
    }]
}
```

After meeting all specified conditions, the partitioned data forwards to the cloud, enabling the collection and storage of new partitioned signals.

Next, you'll call the `UpdateCampaign` API to deploy it to the Edge Agent for AWS IoT FleetWise software. For more information, see [Upload campaign data](update-campaign-cli-data-partitions.md).

# Upload campaign data
<a name="update-campaign-cli-data-partitions"></a>

**Important**  
Access to certain AWS IoT FleetWise features is currently gated. For more information, see [AWS Region and feature availability in AWS IoT FleetWise](fleetwise-regions.md).

There are two ways to upload campaign data on the Edge:
+ Campaigns that meet your upload conditions will automatically upload data to the cloud after they are approved. To approve a campaign, use the `updateCampaign` API operation. 
+ Through AWS IoT Jobs, you can force data to upload even when specified conditions are not met. For more information, see [Upload data using AWS IoT Jobs](update-campaign-cli-data-partitions-jobs.md).

**To upload campaign data using the `UpdateCampaign` API operation**

After you create the campaign, the campaign status displays as `WAITING_FOR_APPROVAL` until you change the `action` to `APPROVED`.
+ Use the following sample to update the campaign `action` by calling on the [UpdateCampaign](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_UpdateCampaign.html) API operation.

  ```
  {
     "action": "APPROVED",
     "dataExtraDimensions": [ "string" ],
     "description": "string",
     "name": "string"
  }
  ```

# Upload data using AWS IoT Jobs
<a name="update-campaign-cli-data-partitions-jobs"></a>

**Important**  
Access to certain AWS IoT FleetWise features is currently gated. For more information, see [AWS Region and feature availability in AWS IoT FleetWise](fleetwise-regions.md).

With AWS IoT Jobs, you can configure campaigns to upload stored vehicle data to the cloud whenever you need it.

**To create a job document for your campaign**
+ Use the following example to create a job document for the campaign. A job document is a .json file that contains information about vehicles or fleets required to perform a job. For more information on creating job document, see [Create and manage jobs by using the AWS CLI](https://docs.aws.amazon.com/iot/latest/developerguide/manage-job-cli.html) in the *AWS IoT Developer Guide*.

  To request that only one vehicle uploads data, set the job target to the AWS IoT thing that's associated with the vehicle. To request that multiple vehicles (in the same campaign) upload data, create a thing group of all things corresponding with the vehicles, and then set the job target to the thing group.

  ```
  {
    "version": "1.0",
    "parameters": {
       "campaignArn": ${aws:iot:parameter:campaignArn},
       "endTime": ${aws:iot:parameter:endTime}
    }
  }
  ```

  1. Replace `CampaignArn` with the Amazon Resource Name (ARN) of a campaign in the same Region and account. The campaign ARN is required.

  1. (Optional) Replace `endTime` with the timestamp of data collected on the vehicle in ISO 8601 UTC format (without milliseconds). For example, `2024-03-05T23:00:00Z`. The timestamp is exclusive and determines the last datapoint to be uploaded. If you omit `endTime`, the Edge Agent software continues to upload until all of a campaign's stored data is uploaded. After all data is uploaded, it updates the [job execution status](https://docs.aws.amazon.com/iot/latest/developerguide/iot-jobs-lifecycle.html#iot-job-execution-states) to `SUCCEEDED`. The job's [state](https://docs.aws.amazon.com/iot/latest/developerguide/iot-jobs-lifecycle.html#iot-jobs-states) updates to `COMPLETED`.

**To create a job using a managed job template**

1. Choose **IoT-IoTFleetWise-CollectCampaignData** from the list of managed templates. For more information, see [Create a job from AWS managed templates](https://docs.aws.amazon.com/iot/latest/developerguide/job-template-manage-console-create.html) in the *AWS IoT Developer Guide*.

1. The managed template has the `CampaignArn` and `endTime` parameters.

   1. Replace `CampaignArn` with the Amazon Resource Name (ARN) of a campaign in the same Region and account. The campaign ARN is required.

   1. (Optional) Replace `endTime` with the timestamp of data collected on the vehicle in ISO 8601 UTC format (without milliseconds). For example, `2024-03-05T23:00:00Z`. The timestamp is exclusive and determines the last datapoint to be uploaded. If you omit `endTime`, the Edge Agent software continues to upload until all of a campaign's stored data is uploaded. After all data is uploaded, it updates the [job execution status](https://docs.aws.amazon.com/iot/latest/developerguide/iot-jobs-lifecycle.html#iot-job-execution-states) to `SUCCEEDED`. The job's [state](https://docs.aws.amazon.com/iot/latest/developerguide/iot-jobs-lifecycle.html#iot-jobs-states) updates to `COMPLETED`.

For related troubleshooting topics, see [Store and forward issues](troubleshooting-campaign.md).

For more information on AWS IoT Jobs, see [Jobs](https://docs.aws.amazon.com/iot/latest/developerguide/iot-jobs.html) in the *AWS IoT Developer Guide*.