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
-
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. -
Download the AwsJavaSdk-Iotfleetwise-2.0.zip file.
-
Unzip the
AwsJavaSdk-Iotfleetwise-2.0.zip
file to get theAwsJavaSdk-Iotfleetwise-2.0.jar
file. -
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. -
Verify that
iotfleetwise
has been added in your dependency file. For Apache Maven, check thepom.xml
file. -
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
withEU_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)
-
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. -
Download the AwsSdkPythonCli-Iotfleetwise.zip file.
-
Unzip the
AwsSdkPythonCli-Iotfleetwise.zip
file to get theAwsSdkPythonCli-Iotfleetwise
folder. -
Navigate to the
AwsSdkPythonCli-Iotfleetwise
directory where you see theboto3-1.20.13-py3-none-any.whl
file. -
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
-
Download the iotfleetwise-preview.zip file.
-
Navigate to the directory where you downloaded the
iotfleetwise-preview.zip
file. -
Unzip the file to get the
iotfleetwise-preview.json
file. -
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.