-
Notifications
You must be signed in to change notification settings - Fork 102
Improve readme #580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Improve readme #580
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,88 +1,119 @@ | ||
| # AWS IoT Device SDK for JavaScript v2 | ||
|
|
||
| This document provides information about the AWS IoT device SDK for Javascript V2. This SDK is built on the [AWS Common Runtime](https://docs.aws.amazon.com/sdkref/latest/guide/common-runtime.html) | ||
| The AWS IoT Device SDK for JavaScript v2 connects your JavaScript 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, and Fleet Provisioning. | ||
|
|
||
| *__Jump To:__* | ||
| **Supported Platforms**: Linux, Windows 11+, macOS 14+ | ||
|
|
||
| > **Note**: The SDK is known to work on older platform versions, but we only guarantee compatibility for the platforms listed above. | ||
|
|
||
| *__Topics:__* | ||
| * [Features](#features) | ||
| * [Installation](#installation) | ||
| * [Samples](https://github.com/aws/aws-iot-device-sdk-js-v2/tree/main/samples) | ||
| * [Mac-Only TLS Behavior](#mac-only-tls-behavior) | ||
| * [Getting Help](#getting-help) | ||
| * [FAQ](https://github.com/aws/aws-iot-device-sdk-js-v2/blob/main/documents/FAQ.md) | ||
| * [API Docs](https://aws.github.io/aws-iot-device-sdk-js-v2/) | ||
| * [Minimum Requirements](#minimum-requirements) | ||
| * [Installing from npm](#installing-from-npm) | ||
| * [Getting Started](#getting-started) | ||
| * [Samples](samples) | ||
| * [MQTT5 User Guide](https://github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md) | ||
| * [Migration Guide from the AWS IoT SDK for JavaScript v1](./documents/MIGRATION_GUIDE.md) | ||
| * [Getting Help](#getting-help) | ||
| * [Resources](#resources) | ||
|
|
||
| ## Features | ||
|
|
||
| The primary purpose of the AWS IoT Device SDK for JavaScript 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: | ||
|
|
||
| * Integrated service clients for AWS IoT Core services | ||
| * Secure device connections to AWS IoT Core using MQTT protocol including MQTT 5.0 | ||
| * Support for [multiple authentication methods and connection types](https://github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md#how-to-create-an-mqtt5-client-based-on-desired-connection-method) | ||
|
|
||
| #### Supported AWS IoT Core services | ||
|
|
||
| * The [AWS IoT Device Shadow](https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html) service manages device state information in the cloud. | ||
| * The [AWS IoT Jobs](https://docs.aws.amazon.com/iot/latest/developerguide/iot-jobs.html) service sends remote operations to connected devices. | ||
| * The [AWS IoT fleet provisioning](https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html) service generates and delivers device certificates automatically. | ||
|
|
||
| ## Installation | ||
|
|
||
| The recommended way to use the AWS IoT Device SDK for JavaScript v2 in your project is to install it from npm. | ||
|
|
||
| ### Minimum Requirements | ||
|
|
||
| For use with Node, the following are required: | ||
| * Node v14+ | ||
| * Run `node -v` to check Node version. | ||
| * CMake 3.1+ | ||
| To develop applications with the AWS IoT Device SDK for JavaScript v2, you need: | ||
|
|
||
| * Node.js v14+ | ||
| * Run `node -v` to check Node version | ||
|
|
||
| See [detailed setup instructions](./documents/PREREQUISITES.md) for more information. | ||
|
|
||
| ### Installing from npm | ||
|
|
||
| [Step-by-step instructions](https://github.com/aws/aws-iot-device-sdk-js-v2/blob/main/documents/PREREQUISITES.md) | ||
| Navigate to your JavaScript project directory and install the SDK: | ||
|
|
||
| ### Build SDK in existing project with NPM | ||
| ``` sh | ||
| # Navigate to the Javascript project you want to add the | ||
| # Javascript V2 SDK to. | ||
| cd <your javascript project here> | ||
| # Install the V2 SDK. | ||
| ```bash | ||
| cd <your-javascript-project> | ||
| npm install aws-iot-device-sdk-v2 | ||
| # Now you can use the Javascript V2 SDK in your project. | ||
| ``` | ||
|
|
||
| ### Build the V2 SDK from source | ||
| ### Building from source | ||
|
|
||
| ``` sh | ||
| # Create a workspace directory to hold all the SDK files. | ||
| mkdir sdk-workspace | ||
| cd sdk-workspace | ||
| See the [Development Guide](./documents/DEVELOPING.md) for detailed instructions on building from source and using local builds. | ||
|
|
||
| # Clone the repository to access the samples. | ||
| git clone https://github.com/aws/aws-iot-device-sdk-js-v2.git | ||
| ## Getting Started | ||
|
|
||
| # Install the SDK. | ||
| cd aws-iot-device-sdk-js-v2 | ||
| npm install | ||
| To get started with the AWS IoT Device SDK for JavaScript v2: | ||
|
|
||
| # Then you can run the samples following the instructions in the samples README. | ||
| ``` | ||
| 1. **Install the SDK** - See the [Installation](#installation) section for installation 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](https://github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md#connecting-to-aws-iot-core) provides more guidance | ||
|
|
||
| 3. **Follow a complete example** - Check out the [samples](samples) directory | ||
|
|
||
| 4. **Learn MQTT5 features** - For advanced usage and configuration options, see the [MQTT5 User Guide](https://github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md) | ||
|
|
||
| The samples provide ready-to-run code with detailed setup instructions for each authentication method and use case. | ||
|
|
||
| ## Samples | ||
|
|
||
| [Samples README](https://github.com/aws/aws-iot-device-sdk-js-v2/blob/main/samples/README.md) | ||
| Check out the [samples](samples) directory for working code examples that demonstrate: | ||
| - [Basic MQTT connection and messaging](./samples/node/pub_sub_mqtt5) | ||
| - [AWS IoT Device Shadow operations](./samples/node/service_clients/shadow) | ||
| - [AWS IoT Jobs](./samples/node/service_clients/jobs) | ||
| - [AWS IoT Fleet provisioning](./samples/node/service_clients/fleet_provisioning) | ||
|
|
||
| The samples provide ready-to-run code with detailed setup instructions for each authentication method and use case. | ||
|
|
||
| ## Getting Help | ||
|
|
||
| ### Mac-Only TLS Behavior | ||
| The best way to interact with our team is through GitHub. | ||
| * Open [discussion](https://github.com/aws/aws-iot-device-sdk-js-v2/discussions): Share ideas and solutions with the SDK community | ||
| * Search [issues](https://github.com/aws/aws-iot-device-sdk-js-v2/issues): Find created issues for answers based on a topic | ||
| * Create an [issue](https://github.com/aws/aws-iot-device-sdk-js-v2/issues/new/choose): New feature request or file a bug | ||
|
|
||
| If you have a support plan with [AWS Support](https://aws.amazon.com/premiumsupport/), you can also create a new support case. | ||
|
|
||
| #### Mac-Only TLS Behavior | ||
|
|
||
| Please note that on Mac, 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. Beginning in v1.7.3, 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. | ||
| 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. You can open a [discussion](https://github.com/aws/aws-iot-device-sdk-js-v2/discussions) for guidance questions or an [issue](https://github.com/aws/aws-iot-device-sdk-js-v2/issues/new/choose) for bug reports, or feature requests. You may also find help on community resources such as [StackOverFlow](https://stackoverflow.com/questions/tagged/aws-iot) with the tag [#aws-iot](https://stackoverflow.com/questions/tagged/aws-iot) or if you have a support plan with [AWS Support](https://aws.amazon.com/premiumsupport/), you can also create a new support case. | ||
| ## Resources | ||
|
|
||
| Please make sure to check out our resources too before opening an issue: | ||
| Check out our resources for additional guidance too before opening an issue: | ||
|
|
||
| * [FAQ](https://github.com/aws/aws-iot-device-sdk-js-v2/blob/main/documents/FAQ.md) | ||
| * [API Docs](https://aws.github.io/aws-iot-device-sdk-js-v2/) | ||
| * [IoT Guide](https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html) ([source](https://github.com/awsdocs/aws-iot-docs)) | ||
| * [FAQ](./documents/FAQ.md) | ||
| * [AWS IoT Core Developer Guide](https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html) | ||
| * [MQTT5 User Guide](https://github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md) | ||
| * Check for similar [Issues](https://github.com/aws/aws-iot-device-sdk-js-v2/issues) | ||
| * [API Docs](https://aws.github.io/aws-iot-device-sdk-js-v2/) | ||
| * [AWS IoT Core Documentation](https://docs.aws.amazon.com/iot/) | ||
| * [Dev Blog](https://aws.amazon.com/blogs/?awsf.blog-master-iot=category-internet-of-things%23amazon-freertos%7Ccategory-internet-of-things%23aws-greengrass%7Ccategory-internet-of-things%23aws-iot-analytics%7Ccategory-internet-of-things%23aws-iot-button%7Ccategory-internet-of-things%23aws-iot-device-defender%7Ccategory-internet-of-things%23aws-iot-device-management%7Ccategory-internet-of-things%23aws-iot-platform) | ||
| * Integration with AWS IoT Services such as | ||
| [Device Shadow](https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html) | ||
| and [Jobs](https://docs.aws.amazon.com/iot/latest/developerguide/iot-jobs.html) | ||
| is provided by code that been generated from a model of the service. | ||
| * [Contributions Guidelines](https://github.com/aws/aws-iot-device-sdk-js-v2/blob/main/documents/CONTRIBUTING.md) | ||
| * [Dev Blog](https://aws.amazon.com/blogs/iot/category/internet-of-things/) | ||
| * [Migration Guide from the AWS IoT SDK for JavaScript v1](./documents/MIGRATION_GUIDE.md) | ||
| * [Contributions Guidelines](./documents/CONTRIBUTING.md) | ||
|
|
||
| ## License | ||
|
|
||
| This library is licensed under the [Apache 2.0 License](https://github.com/aws/aws-iot-device-sdk-js-v2/blob/main/documents/LICENSE). | ||
| This library is licensed under the [Apache 2.0 License](./documents/LICENSE). | ||
|
|
||
| Latest released version: v1.23.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Development Guide | ||
|
|
||
| This document provides instructions for building and developing with the AWS IoT Device SDK for JavaScript v2. | ||
|
|
||
| ## Building from source | ||
|
|
||
| ```bash | ||
| # Create a workspace directory to hold all the SDK files | ||
| mkdir sdk-workspace | ||
| cd sdk-workspace | ||
|
|
||
| # Clone the repository | ||
| git clone https://github.com/aws/aws-iot-device-sdk-js-v2.git | ||
| cd aws-iot-device-sdk-js-v2 | ||
|
|
||
| # Install dependencies | ||
| npm install | ||
| ``` | ||
|
|
||
| The SDK version will be `1.0.0-dev`, so just specify this version in your application config. Alternatively, you can change the version in the [package.json](../package.json#L3) file. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.