

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.

# Manage AWS IoT FleetWise vehicles
<a name="vehicles"></a>

Vehicles are instances of vehicle models. Vehicles must be created from a vehicle model and associated with a decoder manifest. Vehicles uploads one or more data streams to the cloud. For example, a vehicle can send mileage, engine temperature, and state of heater data to the cloud. Every vehicle contains the following information: 

`vehicleName`  
An ID that identifies the vehicle.  
Do not add personally identifiable information (PII) or other confidential or sensitive information in your vehicle name. Vehicle names are accessible by other AWS services, including Amazon CloudWatch. Vehicle names aren't intended to be used for private or sensitive data.

`modelManifestARN`  
The Amazon Resource Name (ARN) of a vehicle model (model manifest). Every vehicle is created from a vehicle model. Vehicles created from the same vehicle model consist of the same group of signals inherited from the vehicle model. These signals are defined and standardized in the signal catalog.

`decoderManifestArn`  
The ARN of the decoder manifest. A decoder manifest provides decoding information that AWS IoT FleetWise can use to transform raw signal data (binary data) into human-readable values. A decoder manifest must be associated with a vehicle model. AWS IoT FleetWise uses the same decoder manifest to decode raw data from vehicles created based on the same vehicle model.

`attributes`  
Attributes are key-value pairs that contain static information. Vehicles can contain attributes inherited from the vehicle model. You can add additional attributes to distinguish an individual vehicle from other vehicles created from the same vehicle model. For example, if you have a black car, you can specify the following value for an attribute: `{"color": "black"}`.  
Attributes must be defined in the associated vehicle model before you can add them to individual vehicles.

For more information about vehicle models, decoder manifests, and attributes, see [Model AWS IoT FleetWise vehicles](vehicle-modeling.md).

AWS IoT FleetWise provides the following API operations that you can use to create and manage vehicles.
+ [CreateVehicle](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_CreateVehicle.html) – Creates a new vehicle.
+ [BatchCreateVehicle](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_BatchCreateVehicle.html) – Creates one or more new vehicles.
+ [UpdateVehicle](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_UpdateVehicle.html) – Updates an existing vehicle.
+ [BatchUpdateVehicle](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_BatchUpdateVehicle.html) – Updates one or more existing vehicles.
+ [DeleteVehicle](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_DeleteVehicle.html) – Deletes an existing vehicle.
+ [ListVehicles](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_ListVehicles.html) – Retrieves a paginated list of summaries of all vehicles.
+ [GetVehicle](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_GetVehicle.html) – Retrieves information about a vehicle.

**Topics**
+ [Provision AWS IoT FleetWise vehicles](provision-vehicles.md)
+ [Reserved topics in AWS IoT FleetWise](reserved-topics.md)
+ [Create an AWS IoT FleetWise vehicle](create-vehicle.md)
+ [Create multiple AWS IoT FleetWise vehicles](create-vehicles-cli.md)
+ [Update an AWS IoT FleetWise vehicle](update-vehicle-cli.md)
+ [Update multiple AWS IoT FleetWise vehicles](update-vehicles-cli.md)
+ [Delete an AWS IoT FleetWise vehicle](delete-vehicle.md)
+ [Get AWS IoT FleetWise vehicle information](get-vehicle-information-cli.md)

# Provision AWS IoT FleetWise vehicles
<a name="provision-vehicles"></a>

The Edge Agent for AWS IoT FleetWise software running in your vehicle collects and transfers data to the cloud. AWS IoT FleetWise integrates with AWS IoT Core to support secure communication between the Edge Agent software and the cloud through MQTT. Each vehicle corresponds to an AWS IoT thing. You can use an existing AWS IoT thing to create a vehicle or set AWS IoT FleetWise to automatically create an AWS IoT thing for your vehicle. For more information, see [Create an AWS IoT FleetWise vehicle](create-vehicle.md).

AWS IoT Core supports [authentication](https://docs.aws.amazon.com/iot/latest/developerguide/authentication.html) and [authorization](https://docs.aws.amazon.com/iot/latest/developerguide/iot-authorization.html) that help securely control access to AWS IoT FleetWise resources. Vehicles can use X.509 certificates to get authenticated (signed in) to use AWS IoT FleetWise and AWS IoT Core policies to get authorized (have permissions) to perform specified actions.

## Authenticate vehicles
<a name="authenticate-vehicle"></a>

You can create AWS IoT Core policies to authenticate your vehicles.

**To authenticate your vehicle**
+ To create an AWS IoT Core policy, run the following command.
  + Replace *policy-name* with the name of the policy that you want to create.
  + Replace *file-name* with the name of the JSON file that contains the AWS IoT Core policy.

  ```
  aws iot create-policy --policy-name policy-name --policy-document file://file-name.json 
  ```

### Example AWS IoT Core policy
<a name="automate-vehicle-example-policy"></a>

Before you use the example policy, do the following:
+ Replace *us-east-1* with the AWS Region where you created AWS IoT FleetWise resources.
+ Replace *111122223333* with your AWS account ID.

This example includes topics reserved by AWS IoT FleetWise. You must add the topics to the policy. For more information, see [Reserved topics in AWS IoT FleetWise](reserved-topics.md).

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "iot:Connect"
            ],
            "Resource": [
                "arn:aws:iot:us-east-1:111122223333:client/${iot:Connection.Thing.ThingName}"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "iot:Publish"
            ],
            "Resource": [
                "arn:aws:iot:us-east-1:111122223333:topic/$aws/iotfleetwise/vehicles/${iot:Connection.Thing.ThingName}/checkins",
                "arn:aws:iot:us-east-1:111122223333:topic/$aws/iotfleetwise/vehicles/${iot:Connection.Thing.ThingName}/signals"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "iot:Subscribe"
            ],
            "Resource": [
                "arn:aws:iot:us-east-1:111122223333:topicfilter/$aws/iotfleetwise/vehicles/${iot:Connection.Thing.ThingName}/collection_schemes",
                "arn:aws:iot:us-east-1:111122223333:topicfilter/$aws/iotfleetwise/vehicles/${iot:Connection.Thing.ThingName}/decoder_manifests"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "iot:Receive"
            ],
            "Resource": [
                "arn:aws:iot:us-east-1:111122223333:topic/$aws/iotfleetwise/vehicles/${iot:Connection.Thing.ThingName}/collection_schemes",
                "arn:aws:iot:us-east-1:111122223333:topic/$aws/iotfleetwise/vehicles/${iot:Connection.Thing.ThingName}/decoder_manifests"
            ]
        }
    ]
}
```

------

## Authorize vehicles
<a name="authorize-vehicles"></a>

You can create X.509 certificates to authorize your vehicles.

**To authorize your vehicle**
**Important**  
We recommend that you create a new certificate for each vehicle.

1. To create an RSA key pair and issue an X.509 certificate, run the following command.
   + Replace *cert* with the name of the file that saves the command output contents of certificatePem.
   + Replace *public-key* with the name of the file that saves the command output contents of keyPair.PublicKey.
   + Replace *private-key* with the name of the file that saves the command output contents of keyPair.PrivateKey.

   ```
   aws iot create-keys-and-certificate \
       --set-as-active \
       --certificate-pem-outfile cert.pem \
       --public-key-outfile public-key.key" \
       --private-key-outfile  private-key.key"
   ```

1. Copy the Amazon Resource Name (ARN) of the certificate from the output.

1. To attach the policy to the certificate, run the following command.
   + Replace *policy-name* with the name of the AWS IoT Core policy that you created.
   + Replace *certificate-arn* with the ARN of the certificate that you copied.

   ```
   aws iot attach-policy \
       --policy-name policy-name\
       --target "certificate-arn"
   ```

1. To attach the certificate to the thing, run the following command.
   + Replace *thing-name* with the name of your AWS IoT thing or the ID of your vehicle.
   + Replace *certificate-arn* with the ARN of the certificate that you copied.

   ```
   aws iot attach-thing-principal \
       --thing-name thing-name \
       --principal "certificate-arn"
   ```

# Reserved topics in AWS IoT FleetWise
<a name="reserved-topics"></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).

AWS IoT FleetWise reserves the use of the following topics. If the reserved topic allows, you can subscribe or publish to it. However, you can't create new topics that begin with a dollar sign (\$1). If you use unsupported publish or subscribe operations with reserved topics, it can result in the connection ending.


| Topic | Client operation allowed | Description | 
| --- | --- | --- | 
|  `$aws/iotfleetwise/vehicles/vehicleName/checkins`  |  Publish  |  The Edge Agent software publishes vehicle status information to this topic. Vehicle status information is exchanged in protocol buffers (Protobuf) format. For more information, see the [https://github.com/aws/aws-iot-fleetwise-edge/blob/main/docs/dev-guide/edge-agent-dev-guide.md#data-models](https://github.com/aws/aws-iot-fleetwise-edge/blob/main/docs/dev-guide/edge-agent-dev-guide.md#data-models).  | 
|  `$aws/iotfleetwise/vehicles/vehicleName/signals`  |  Publish  |  The Edge Agent software publishes signals to this topic. Signal information is exchanged in protocol buffers (Protobuf) format. For more information, see the [https://github.com/aws/aws-iot-fleetwise-edge/blob/main/docs/dev-guide/edge-agent-dev-guide.md#data-models](https://github.com/aws/aws-iot-fleetwise-edge/blob/main/docs/dev-guide/edge-agent-dev-guide.md#data-models).  | 
|  `$aws/iotfleetwise/vehicles/vehicleName/collection_schemes`  |  Subscribe  |  AWS IoT FleetWise publishes data collection schemes to this topic. Vehicles consume these data collection schemes.  | 
|  `$aws/iotfleetwise/vehicles/vehicleName/decoder_manifests`  |  Subscribe  |  AWS IoT FleetWise publishes decoder manifests to this topic. Vehicles consume these decoder manifests.  | 
|  `$aws/iotfleetwise/vehicles/vehicleName/command/request`  |  Subscribe  |  AWS IoT FleetWise publishes requests to execute commands to this topic. Vehicles then consume these command requests.  | 
|  `$aws/iotfleetwise/vehicles/vehicleName/command/response`  |  Publish  |  The Edge Agent software publishes command responses from the vehicle to this topic. Command responses are exchanged in protocol buffers (Protobuf) format. For more information, see the [https://github.com/aws/aws-iot-fleetwise-edge/blob/main/docs/dev-guide/edge-agent-dev-guide.md#data-models](https://github.com/aws/aws-iot-fleetwise-edge/blob/main/docs/dev-guide/edge-agent-dev-guide.md#data-models).  | 
|  `$aws/iotfleetwise/vehicles/vehicleName/command/notification`  |  Subscribe  |  AWS IoT FleetWise publishes command status updates to this topic. The notifications are sent in a JSON format.  | 
|  `$aws/iotfleetwise/vehicles/$vehicle_name/last_known_states/config`   |  Subscribe  |  AWS IoT FleetWise publishes state template configurations to this topic. Vehicles consume these state template configurations.  | 
|  `$aws/iotfleetwise/vehicles/$vehicle_name/last_known_states/data`   |  Publish  |  The Edge Agent software publishes data collected from the signals to this topic.  | 
|  `$aws/iotfleetwise/vehicles/$vehicle_name/last_known_state/$state_template_name/data`   |  Subscribe  |  AWS IoT FleetWise publishes data collected from the signals configured in the specified `$state_template_name` to this topic. The updates can be partial. For example, if a state template association contains multiple signals with the on-change update strategy, then only the signals that have changed are contained in a given message. Signal information is exchanged in protocol buffers (Protobuf) format. For more information, see the [https://github.com/aws/aws-iot-fleetwise-edge/blob/main/docs/dev-guide/edge-agent-dev-guide.md#data-models](https://github.com/aws/aws-iot-fleetwise-edge/blob/main/docs/dev-guide/edge-agent-dev-guide.md#data-models).  | 

# Create an AWS IoT FleetWise vehicle
<a name="create-vehicle"></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).

You can use the AWS IoT FleetWise console or API to create a vehicle.

**Important**  
Before you start, check the following:  
You must have a vehicle model and the status of the vehicle model must be `ACTIVE`. For more information, see [Manage AWS IoT FleetWise vehicle modelsVehicle models](vehicle-models.md).
Your vehicle model must be associated with a decoder manifest, and the status of the decoder manifest must be `ACTIVE`. For more information, see [Manage AWS IoT FleetWise decoder manifests](decoder-manifests.md).

**Topics**
+ [Create a vehicle (console)](#create-vehicle-console)
+ [Create a vehicle (AWS CLI)](#create-vehicle-cli)

## Create a vehicle (console)
<a name="create-vehicle-console"></a>

You can use the AWS IoT FleetWise console to create a vehicle.

**To create a vehicle**

1. Open the [AWS IoT FleetWise console](https://console.aws.amazon.com/iotfleetwise).

1. On the navigation pane, choose **Vehicles**.

1. On the vehicle summary page, choose **Create vehicle**, and then do the following steps.

**Topics**
+ [Step 1: Define vehicle properties](#define-vehicle-properties-console)
+ [Step 2: Configure vehicle certificate](#define-vehicle-certificate-console)
+ [Step 3: Attach policies to certificate](#attach-vehicle-policy-console)
+ [Step 4: Review and create](#review-and-create-vehicle-console)

### Step 1: Define vehicle properties
<a name="define-vehicle-properties-console"></a>

In this step, you name the vehicle and associate it with the model manifest and decoder manifest.

1. Enter a unique name for the vehicle.
**Important**  
A vehicle corresponds to an AWS IoT thing. If a thing already exists with that name, choose **Associate the vehicle with an IoT thing** to update the thing with the vehicle. Or, choose a different vehicle name and AWS IoT FleetWise will automatically create a new thing for the vehicle.

1. Choose a vehicle model (model manifest) from the list.

1. Choose a decoder manifest from the list. The decoder manifest is associated with the vehicle model.

1. (Optional) To associate vehicle attributes, choose **Add attributes**. If you skip this step, you must add attributes after the vehicle is created before you can deploy it to campaigns.

1. (Optional) To associate tags with the vehicle, choose **Add new tag**. You can also add tags after the vehicle is created.

1. Choose **Next**.

### Step 2: Configure vehicle certificate
<a name="define-vehicle-certificate-console"></a>

To use your vehicle as an AWS IoT thing, you must configure a vehicle certificate with an attached policy. If you skip this step, you must configure a certificate after the vehicle is created before you can deploy it to campaigns.

1. Choose **Auto-generate a new certificate (recommended)**.

1. Choose **Next**.

### Step 3: Attach policies to certificate
<a name="attach-vehicle-policy-console"></a>

Attach a policy to the certificate you configured in the previous step.

1. For **Policies**, enter an existing policy name. To create a new policy, choose **Create policy**.

1. Choose **Next**.

### Step 4: Review and create
<a name="review-and-create-vehicle-console"></a>

Verify the configurations for the vehicle, and then choose **Create vehicle**.

**Important**  
After the vehicle is created, you must download the certificate and keys. You'll use the certificate and private key to connect the vehicle in the Edge Agent for AWS IoT FleetWise software.

## Create a vehicle (AWS CLI)
<a name="create-vehicle-cli"></a>

When you create a vehicle, you must use a vehicle model that is associated with a decoder manifest. You can use the [CreateVehicle](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_CreateVehicle.html) API operation to create a vehicle. The following example uses the AWS CLI.

To create a vehicle, run the following command.

Replace *file-name* with the name of the .json file that contains the vehicle configuration.

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

**Example – vehicle configuration**  
+ (Optional) The `associationBehavior` value can be one of the following:
  + `CreateIotThing` – When your vehicle is created, AWS IoT FleetWise automatically creates an AWS IoT thing with the name of your vehicle ID for your vehicle.
  + `ValidateIotThingExists` – Use an existing AWS IoT thing to create a vehicle.

    To create an AWS IoT thing, run the following command. Replace *thing-name* with the name of the thing you want to create.

    ```
    aws iot create-thing --thing-name thing-name
    ```

  If it's not specified, AWS IoT FleetWise automatically creates an AWS IoT thing for your vehicle.
**Important**  
Make sure that the AWS IoT thing is provisioned after the vehicle is created. For more information, see [Provision AWS IoT FleetWise vehicles](provision-vehicles.md).
+ Replace *vehicle-name* with one of the following.
  + The name of your AWS IoT thing if `associationBehavior` is configured to `ValidateIotThingExists`.
  + The ID of the vehicle to create if `associationBehavior` is configured to `CreateIotThing`.

    The vehicle ID can have 1–100 characters. Valid characters: a–z, A–Z, 0–9, dash (‐), underscore (\$1), and colon (:).
+ Replace *model-manifest-ARN* with the ARN of your vehicle model (model manifest).
+ Replace *decoder-manifest-ARN* with the ARN of the decoder manifest associated with the specified vehicle model.
+ (Optional) You can add additional attributes to distinguish this vehicle from other vehicles created from the same vehicle model. For example, if you have an electric car, you can specify the following value for an attribute: `{"fuelType": "electric"}`.
**Important**  <a name="update-attributes-requirement"></a>
Attributes must be defined in the associated vehicle model before you can add them to individual vehicles.

```
{
    "associationBehavior": "associationBehavior",
    "vehicleName": "vehicle-name", 
    "modelManifestArn": "model-manifest-ARN",
    "decoderManifestArn": "decoder-manifest-ARN",           
    "attributes": {
        "key": "value"
    }
}
```

**Example – associate a state template with the vehicle**  
You can associate [state templates](state-templates.md) with the vehicle to allow collection of state updates from the vehicle in the cloud by using the `stateTemplates` field.   
In this example, `stateTemplateUpdateStrategy` can be one of:  
+ `periodic`: allows you to specify a fixed rate at which Edge Agent software will send signal updates to the cloud (Edge Agent software will send updates even if the signal value hasn't changed between updates).
+ `onChange`: Edge Agent software will send signal updates whenever the signal changes.

```
aws iotfleetwise create-vehicle --cli-input-json file://create-vehicle.json
```
Where the `create-vehicle.json` file contains (for example):  

```
{
    "associationBehavior": "associationBehavior",
    "vehicleName": "vehicle-name", 
    "modelManifestArn": "model-manifest-ARN",
    "decoderManifestArn": "decoder-manifest-ARN",           
    "attributes": {
        "key": "value"
    },
    "stateTemplates": [ 
        {
            "identifier": "state-template-name",
            "stateTemplateUpdateStrategy": {
                "periodic": {
                    "stateTemplateUpdateRate": {
                        "unit": "SECOND",
                        "value": 10
                    }
                }
            }
        }
    ]
}
```

If you [enabled encryption](key-management.md) using a customer managed AWS KMS key, include the following policy statement so that your role can invoke the `CreateVehicle` API operation. 

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "kms:GenerateDataKey*",
                "kms:Decrypt"
            ],
            "Resource": [
                "arn:aws:kms:us-east-1:111122223333:key/KMS_KEY_ID"
            ]
        }
    ]
}
```

------

# Create multiple AWS IoT FleetWise vehicles
<a name="create-vehicles-cli"></a>

You can use the [BatchCreateVehicle](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_BatchCreateVehicle.html) 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",
                "vehicleName": "vehicle-name", 
                "modelManifestArn": "model-manifest-ARN",
                "decoderManifestArn": "decoder-manifest-ARN",           
                "attributes": {
                    "key": "value"
                }
        },
        {
                "associationBehavior": "associationBehavior",
                "vehicleName": "vehicle-name", 
                "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 an AWS IoT FleetWise vehicle](create-vehicle.md).

If you [enabled encryption](key-management.md) using a customer managed AWS KMS key, include the following policy statement so that your role can invoke the `BatchCreateVehicle` API operation. 

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "kms:GenerateDataKey*",
                "kms:Decrypt"
            ],
            "Resource": [
                "arn:aws:kms:us-east-1:111122223333:key/KMS_KEY_ID"
            ]
        }
    ]
}
```

------

# Update an AWS IoT FleetWise vehicle
<a name="update-vehicle-cli"></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).

You can use the [UpdateVehicle](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_UpdateVehicle.html) API operation to update an existing vehicle. The following example uses the AWS CLI.

To update a vehicle, run the following command.

Replace *file-name* with the name of the .json file that contains the configuration of your vehicle.

```
aws iotfleetwise update-vehicle --cli-input-json file://file-name.json
```

**Example – vehicle configuration**  
+ Replace *vehicle-name* with the ID of the vehicle that you want to update.
+ (Optional) Replace *model-manifest-ARN* with the ARN of the vehicle model (model manifest) that you use to replace the vehicle model in use.
+ (Optional) Replace *decoder-manifest-ARN* with the ARN of your decoder manifest associated with the new vehicle model that you specified.
+ (Optional) Replace *attribute-update-mode* with vehicle attributes.
  + `Merge` – Merge new attributes into existing attributes by updating existing attributes with new values and adding new attributes if they don't exist.

    For example, if a vehicle has the following attributes: `{"color": "black", "fuelType": "electric"}`, and you update the vehicle with the following attributes: `{"color": "", "fuelType": "gasoline", "model": "x"}`, the updated vehicle has the following attributes: `{"fuelType": "gasoline", "model": "x"}`.
  + `Overwrite` – Replace existing attributes with new attributes.

    For example, if a vehicle has the following attributes: `{"color": "black", "fuelType": "electric"}`, and you update the vehicle with the `{"model": "x"}` attribute, the updated vehicle has the `{"model": "x"}` attribute.

  This is required if attributes are present in the input.
+ (Optional) To add new attributes or update existing ones with new values, configure `attributes`. For example, if you have an electric car, you can specify the following value for an attribute: `{"fuelType": "electric"}`.

  To delete attributes, configure `attributeUpdateMode` to `Merge`.
**Important**  <a name="update-attributes-requirement"></a>
Attributes must be defined in the associated vehicle model before you can add them to individual vehicles.

```
 { 
         "vehicleName": "vehicle-name",
         "modelManifestArn": "model-manifest-arn",
         "decoderManifestArn": "decoder-manifest-arn",
         "attributeUpdateMode": "attribute-update-mode"
         }         
}
```

**Example – add or remove state templates associated with the vehicle**  
You can associate additional state templates or remove existing associations from the vehicle using the following fields:  
+ `stateTemplatesToAdd` 
+ `stateTemplatesToRemove` 

```
aws iotfleetwise update-vehicle --cli-input-json file://update-vehicle.json
```
Where the `update-vehicle.json` file contains (for example):  

```
{
    "vehicleName": "vehicle-name",
    "modelManifestArn": "model-manifest-arn",
    "decoderManifestArn": "decoder-manifest-arn",
    "attributeUpdateMode": "attribute-update-mode",
    "stateTemplatesToAdd": [ 
        {
            "identifier": "state-template-name",
            "stateTemplateUpdateStrategy": {
                "onChange": {}
            }
        }
    ],
    "stateTemplatesToRemove": ["state-template-name"]            
}
```

If you [enabled encryption](key-management.md) using a customer managed AWS KMS key, include the following policy statement so that your role can invoke the `UpdateVehicle` API operation. 

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "kms:GenerateDataKey*",
                "kms:Decrypt"
            ],
            "Resource": [
                "arn:aws:kms:us-east-1:111122223333:key/KMS_KEY_ID"
            ]
        }
    ]
}
```

------

# Update multiple AWS IoT FleetWise vehicles
<a name="update-vehicles-cli"></a>

You can use the [BatchUpdateVehicle](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_BatchUpdateVehicle.html) API operation to update multiple existing vehicles at one time. The following example uses the AWS CLI.

To update 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-update-vehicle --cli-input-json file://file-name.json
```

**Example – vehicle configurations**  

```
{
   "vehicles": [ 
      { 
         "vehicleName": "vehicle-name",
         "modelManifestArn": "model-manifest-arn",         
         "decoderManifestArn": "decoder-manifest-arn",         
         "mergeAttributes": true,         
         "attributes": {                    
         "key": "value"
         }     
      }, 
      { 
         "vehicleName": "vehicle-name",         
         "modelManifestArn": "model-manifest-arn",         
         "decoderManifestArn": "decoder-manifest-arn",         
         "mergeAttributes": true,         
         "attributes": {                     
         "key": "value"
         }     
      }
   ]
}
```

You can update up to 10 vehicles for each batch operation. For more information about the configuration of each vehicle, see [Update an AWS IoT FleetWise vehicle](update-vehicle-cli.md).

If you [enabled encryption](key-management.md) using a customer managed AWS KMS key, include the following policy statement so that your role can invoke the `BatchUpdateVehicle` API operation. 

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "kms:GenerateDataKey*",
                "kms:Decrypt"
            ],
            "Resource": [
                "arn:aws:kms:us-east-1:111122223333:key/KMS_KEY_ID"
            ]
        }
    ]
}
```

------

# Delete an AWS IoT FleetWise vehicle
<a name="delete-vehicle"></a>

You can use the AWS IoT FleetWise console or API to delete vehicles.

**Important**  
After a vehicle is deleted, AWS IoT FleetWise automatically removes the vehicle from the associated fleets and campaigns. For more information, see [Manage fleets in AWS IoT FleetWise](fleets.md) and [Collect AWS IoT FleetWise data with campaigns](campaigns.md). However, the vehicle still exists as a thing or is still associated with a thing in AWS IoT Core. For instructions on deleting a thing, see [Delete a thing](https://docs.aws.amazon.com/iot/latest/developerguide/thing-registry.html#delete-thing) in the *AWS IoT Core Developer Guide*.

## Delete a vehicle (console)
<a name="delete-vehicle-console"></a>

You can use the AWS IoT FleetWise console to delete a vehicle.

**To delete a vehicle**

1. <a name="fleetwise-open-console"></a>Open the [AWS IoT FleetWise console](https://console.aws.amazon.com/iotfleetwise).

1. On the navigation pane, choose **Vehicles**.

1. On the **Vehicles** page, select the button next to the vehicle you want to delete.

1. Choose **Delete**.

1. In **Delete **vehicle-name****, enter the name of the vehicle, and then choose **Delete**.

## Delete a vehicle (AWS CLI)
<a name="delete-vehicle-cli"></a>

You can use the [DeleteVehicle](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_DeleteVehicle.html) API operation to delete a vehicle. The following example uses AWS CLI.

To delete a vehicle, run the following command.

Replace *vehicle-name* with the ID of the vehicle that you want to delete.

```
aws iotfleetwise delete-vehicle --vehicle-name vehicle-name
```

### Verify vehicle deletion
<a name="verify-vehicle-deletion"></a>

You can use the [ListVehicles](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_ListVehicles.html) API operation to verify if a vehicle was deleted. The following example uses the AWS CLI.

To retrieve a paginated list of summaries of all vehicles, run the following command.

```
aws iotfleetwise list-vehicles
```

If you [enabled encryption](key-management.md) using a customer managed AWS KMS key, include the following policy statement so that your role can invoke the `ListVehicles` API operation. 

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "kms:Decrypt"
            ],
            "Resource": [
                "arn:aws:kms:us-east-1:111122223333:key/KMS_KEY_ID"
            ]
        }
    ]
}
```

------

# Get AWS IoT FleetWise vehicle information
<a name="get-vehicle-information-cli"></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).

You can use the [GetVehicle](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_GetVehicle.html) API operation to retrieve vehicle information. The following example uses the AWS CLI.

To retrieve the metadata of a vehicle, run the following command.

Replace *vehicle-name* with the ID of the vehicle that you want to retrieve.

```
aws iotfleetwise get-vehicle --vehicle-name vehicle-name
```

**Note**  
This operation is [eventually consistent](https://web.stanford.edu/class/cs345d-01/rl/eventually-consistent.pdf). In other words, changes to the vehicle might not be reflected immediately.

You can use the [GetVehicleStatus](https://docs.aws.amazon.com/iot-fleetwise/latest/APIReference/API_GetVehicleStatus.html) API operation to retrieve the status of resources associated with a vehicle. The following example uses the AWS CLI.

To retrieve the status of resources associated with a vehicle, run the following command.
+ Replace *vehicle-name* with the ID of the vehicle which the resources are associated with.
+ Replace *type* with the type of the resource whose status you want to retrieve. Valid values for `type` are `CAMPAIGN`, `STATE_TEMPLATE`, and `DECODER`.

```
aws iotfleetwise get-vehicle-status --vehicle-name vehicle-name --type type
```

If you [enabled encryption](key-management.md) using a customer managed AWS KMS key, include the following policy statement so that your role can invoke the `GetVehicle` or `GetVehicleStatus` API operations. 

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "kms:Decrypt"
            ],
            "Resource": [
                "arn:aws:kms:us-east-1:111122223333:key/KMS_KEY_ID"
            ]
        }
    ]
}
```

------