Preview AWS CLI and AWS SDKs - AWS IoT FleetWise

Preview AWS CLI and AWS SDKs

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.

Because AWS IoT FleetWise is in preview, you must download the AWS CLI and SDK resources from the following links to use the feature in your scripts and applications.

  • To install AWS SDK for Java 2.x

    1. From a command prompt, run java --version to determine if Java 8 or later is installed. If you don't have it installed, follow the instructions to install Java 8.

    2. Download the AwsJavaSdk-Iotfleetwise-2.0.zip file.

    3. Unzip the AwsJavaSdk-Iotfleetwise-2.0.zip file to get the AwsJavaSdk-Iotfleetwise-2.0.jar file.

    4. Use the following information to add a dependency to the AwsJavaSdk-Iotfleetwise-2.0.jar file that you downloaded.

      groupId: software.amazon.awssdk artifactId: iotfleetwise version: 2.0

      For Apache Maven projects, follow the instructions on the Guide to installing 3rd party JARs or Frequently Asked Technical Questions page on the Apache Maven Project website.

    5. Verify that iotfleetwise has been added in your dependency file. For Apache Maven, check the pom.xml file.

    6. Add the following dependencies for Apache Maven projects.

      <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>aws-core</artifactId> </dependency> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>aws-json-protocol</artifactId> </dependency> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>apache-client</artifactId> </dependency>

    For more information about how to set up AWS SDK for Java 2.x with other build systems, see Setting up in the AWS SDK for Java 2.x Developer Guide.

    To import the client, add the following.

    import software.amazon.awssdk.services.iotfleetwise.IotfleetwiseClient;

    To instantiate the the client, add the following.

    Replace US_EAST_1 with EU_CENTRAL_1 if you want to work with AWS IoT FleetWise in Europe (Frankfurt).

    final IotfleetwiseClient client = IotfleetwiseClient.builder() .region(Region.US_EAST_1) .build();
  • To install AWS SDK for Python (Boto3)

    1. From a command prompt, run python3 -V to determine if Python 3.6 or later is installed. If you don't have it installed, follow the instructions to install Python 3.

    2. Download the AwsSdkPythonCli-Iotfleetwise.zip file.

    3. Unzip the AwsSdkPythonCli-Iotfleetwise.zip file to get the AwsSdkPythonCli-Iotfleetwise folder.

    4. Navigate to the AwsSdkPythonCli-Iotfleetwise directory where you see the boto3-1.20.13-py3-none-any.whl file.

    5. To install AWS SDK for Python (Boto3), run the following command.

      python3 -m pip install boto3-1.20.13-py3-none-any.whl

    For more information about how to use AWS SDK for Python (Boto), see the AWS SDK for Python (Boto) Documentation.

Configuring the AWS CLI

To enable AWS IoT FleetWise commands in the AWS CLI, complete these steps.

From a command prompt, run aws --version to determine if the AWS CLI is installed. If you don't have it installed, follow the instructions to install the AWS CLI.

To enable the AWS IoT FleetWise API in the AWS CLI

  1. Download the iotfleetwise-preview.zip file.

  2. Navigate to the directory where you downloaded the iotfleetwise-preview.zip file.

  3. Unzip the file to get the iotfleetwise-preview.json file.

  4. From a command prompt, run the following command.

    aws configure add-model --service-name iotfleetwise --service-model file://iotfleetwise-preview.json

The aws iotfleetwise AWS CLI commands are now available.