Create multiple vehicles (AWS CLI) - AWS IoT FleetWise

Create multiple vehicles (AWS CLI)

AWS IoT FleetWise is in preview release and is subject to change. We recommend that you use the service only with test data, and not in production environments.

While AWS IoT FleetWise is in preview, you must download the preview AWS SDK and AWS CLI to use the API operations for this service. These API operations aren't available in the public AWS SDK or AWS CLI. For more information, see Preview AWS CLI and AWS SDKs.

You can use the BatchCreateVehicle API operation to create multiple vehicles at one time. The following example uses the AWS CLI.

To create multiple vehicles, run the following command.

Replace file-name with the name of the JSON file that contains the configurations of multiple vehicles.

aws iotfleetwise batch-create-vehicle --cli-input-json file://file-name.json

Example vehicle configurations

{ "vehicles": [ ... { "associationBehavior": "associationBehavior", "vehicleId": "vehicle-ID", "modelManifestArn": "model-manifest-ARN", "decoderManifestArn": "decoder-manifest-ARN", "attributes": { ... "key": "value" } }, { "associationBehavior": "associationBehavior", "vehicleId": "vehicle-ID", "modelManifestArn": "model-manifest-ARN", "decoderManifestArn": "decoder-manifest-ARN", "attributes": { ... "key": "value" } } ] }

You can create up to 10 vehicles for each batch operation. For more information about the vehicle configuration, see Create a vehicle (AWS CLI).