Create an AWS IoT FleetWise vehicle - AWS IoT FleetWise

Create an AWS IoT FleetWise vehicle

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

Important

Before you start, check the following:

Create a vehicle (console)

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

Important

Before you start, check the following:

To create a vehicle
  1. Open the AWS IoT FleetWise console.

  2. On the navigation pane, choose Vehicles.

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

Step 1: Define vehicle properties

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.

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

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

  4. (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.

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

  6. Choose Next.

Step 2: Configure vehicle certificate

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).

  2. Choose Next.

Step 3: Attach policies to certificate

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.

  2. Choose Next.

Step 4: Review and create

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)

When you create a vehicle, you must use a vehicle model that is associated with a decoder manifest. You can use the CreateVehicle API operation to create a vehicle. The following example uses the AWS CLI.

Important

Before you start, check the following:

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.

  • 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 (_), 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

    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" } }