Delete an AWS IoT FleetWise vehicle
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 and Collect AWS IoT FleetWise data with campaigns. 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 in the AWS IoT Core Developer Guide.
Delete a vehicle (console)
You can use the AWS IoT FleetWise console to delete a vehicle.
To delete a vehicle
-
Open the AWS IoT FleetWise console
. -
On the navigation pane, choose Vehicles.
-
On the Vehicles page, select the button next to the vehicle you want to delete.
-
Choose Delete.
-
In Delete
vehicle-name
, enter the name of the vehicle, and then choose Delete.
Delete a vehicle (AWS CLI)
You can use the DeleteVehicle 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
You can use the ListVehicles 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 using a customer managed AWS KMS key, include the following policy statement so that your role can invoke the ListVehicles
API operation.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "kms:Decrypt" ], "Resource": [ "arn:aws:kms:
KMS_KEY_REGION
:KMS_KEY_ACCOUNT_ID
:key/KMS_KEY_ID
" ] }, ] }