MCPcopy Index your code
hub / github.com/aws/aws-iot-device-sdk-java-v2

github.com/aws/aws-iot-device-sdk-java-v2 @v1.33.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.33.0 ↗ · + Follow
3,783 symbols 8,482 edges 433 files 1,097 documented · 29%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

AWS IoT Device SDK for Java v2

The AWS IoT Device SDK for Java v2 connects your Java applications and devices to the AWS IoT platform. It handles the complexities of secure communication, authentication, and device management so you can focus on your IoT solution. The SDK makes it easy to use AWS IoT services like Device Shadows, Jobs, Fleet Provisioning, and Commands.

Supported Platforms: Linux, Windows 11+, macOS 14+, Android API level 24+ (Android 7.0+)

Note: The SDK is known to work on older platform versions, but we only guarantee compatibility for the platforms listed above.

Topics: * Features * Installation * Minimum Requirements * Consuming IoT Device SDK * Getting Started * Samples * MQTT5 User Guide * Specifics * Getting Help * Resources

Features

The primary purpose of the AWS IoT Device SDK for Java v2 is to simplify the process of connecting devices to AWS IoT Core and interacting with AWS IoT services on various platforms. The SDK provides:

Supported AWS IoT Core services

Installation

The recommended way to use the AWS IoT Device SDK for Java v2 in your project is to consume it from Maven Central.

Minimum Requirements

To develop applications that use AWS IoT Device SDK for Java v2, you need: * Java 8+ (Download and Install Java) * Java JDK 8+ (Download and Install JDK) * A build tool such as Maven

See detailed setup instructions for more information.

Consuming IoT Device SDK from Maven in your application

Add the following to your pom.xml dependencies:

<dependency>
  <groupId>software.amazon.awssdk.iotdevicesdk</groupId>
  <artifactId>aws-iot-device-sdk</artifactId>
  <version>1.33.0</version>
</dependency>

Replace 1.33.0 in <version>1.33.0</version> with the latest release version for the SDK. Look up the latest SDK version here: https://github.com/aws/aws-iot-device-sdk-java-v2/releases

Building AWS IoT SDK from source

See the Development Guide for detailed instructions on building from source and using local builds.

Getting Started

To get started with the AWS IoT Device SDK for Java v2:

  1. Add the SDK to your project - See the Installation section for Maven dependency details

  2. Choose your connection method - The SDK supports multiple authentication methods including X.509 certificates, AWS credentials, and custom authentication. MQTT5 User Guide connection section and MQTT5 X509 sample provide more guidance

  3. Follow a complete example - Check out the samples directory

  4. Learn MQTT5 features - For advanced usage and configuration options, see the MQTT5 User Guide

Samples

Check out the samples directory for working code examples that demonstrate: - Basic MQTT connection and messaging - AWS IoT Device Shadow operations - AWS IoT Jobs - AWS IoT Fleet provisioning: basic and with CSR - AWS IoT Commands

The samples provide ready-to-run code with detailed setup instructions for each authentication method and use case.

Specifics

Mac-Only TLS 1.3

By default, macOS uses Apple Secure Transport as the TLS implementation, which supports up to TLS 1.2. To enable TLS 1.3 on macOS, set the environment variable AWS_CRT_USE_NON_FIPS_TLS_13=1 before running your application. This switches the TLS backend to s2n-tls with aws-lc at runtime.

[!IMPORTANT] Enabling AWS_CRT_USE_NON_FIPS_TLS_13 trades FIPS compliance and macOS Keychain/PKCS#12 integration for TLS 1.3 support. This variable has no effect on Linux or Windows.

Mac Keychain

When using the default Apple Secure Transport backend, once a private key is used with a certificate, that certificate-key pair is imported into the Mac Keychain. All subsequent uses of that certificate will use the stored private key and ignore anything passed in programmatically. When a stored private key from the Keychain is used, the following will be logged at the "info" log level:

static: certificate has an existing certificate-key pair that was previously imported into the Keychain.
 Using key from Keychain instead of the one provided.

Getting Help

The best way to interact with our team is through GitHub. * Open discussion: Share ideas and solutions with the SDK community * Search issues: Find created issues for answers based on a topic * Create an issue: New feature request or file a bug

If you have a support plan with AWS Support, you can also create a new support case.

Resources

Check out our resources for additional guidance too before opening an issue:

License

This library is licensed under the Apache 2.0 License.

Latest released version: v1.33.0

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 3,285
Class 429
Enum 33
Function 23
Interface 13

Languages

Java99%
Python1%
Kotlin1%

Modules by API surface

sdk/greengrass/greengrass-client/src/event-stream-rpc-java/client/software/amazon/awssdk/aws/greengrass/GreengrassCoreIPCClientV2.java96 symbols
sdk/src/main/java/software/amazon/awssdk/iot/AwsIotMqtt5ClientBuilder.java55 symbols
sdk/greengrass/greengrass-client/src/event-stream-rpc-java/model/software/amazon/awssdk/aws/greengrass/GreengrassCoreIPCServiceModel.java42 symbols
sdk/src/main/java/software/amazon/awssdk/iot/AwsIotMqttConnectionBuilder.java41 symbols
sdk/greengrass/greengrass-client/src/event-stream-rpc-java/model/software/amazon/awssdk/aws/greengrass/model/PublishToIoTCoreRequest.java38 symbols
sdk/greengrass/greengrass-client/src/event-stream-rpc-java/client/software/amazon/awssdk/aws/greengrass/GreengrassCoreIPCClient.java37 symbols
sdk/greengrass/greengrass-client/src/event-stream-rpc-java/client/software/amazon/awssdk/aws/greengrass/GreengrassCoreIPC.java36 symbols
sdk/greengrass/greengrass-client/src/event-stream-rpc-java/model/software/amazon/awssdk/aws/greengrass/model/MQTTMessage.java34 symbols
sdk/greengrass/event-stream-rpc-model/src/test/java/software/amazon/awssdk/awstest/model/MessageData.java34 symbols
sdk/greengrass/event-stream-rpc-model/src/main/java/software/amazon/awssdk/eventstreamrpc/EventStreamRPCServiceModel.java33 symbols
sdk/greengrass/greengrass-client/src/event-stream-rpc-java/model/software/amazon/awssdk/aws/greengrass/model/CreateLocalDeploymentRequest.java31 symbols
sdk/tests/v2serviceclients/CommandsTests.java29 symbols

For agents

$ claude mcp add aws-iot-device-sdk-java-v2 \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page