AWS IoT Greengrass 入門指南

1. 文件訊息

文件版本 1.0
日期
描述 已發布文件

2. 概述

2.1 引言

2.2 關於 AWS IoT Greengrass

要了解有關 AWS IoT Greengrass 的更多信息,請參閱工作原理新增功能

3. 硬體描述

3.1 數據表

請參閱數據表

3.2 其他硬體參考

請參閱裝置頁面,以了解更多產品詳情。

3.3 用戶提供的項目

不適用。

3.4 第三方可購買項目

不適用。

4. 搭建開發環境

AWS IoT Greengrass 同時支援 Windows 和 Linux:https://docs.aws.amazon.com/greengrass/v2/developerguide/operating-system-feature-support-matrix.html

請參閱開發者指南,以了解所需的工具和正確設定:https://docs.aws.amazon.com/greengrass/v2/developerguide/what-is-iot-greengrass.html

建議安裝以下工具/SDK:

5. 設定硬體

請參考設備的使用手冊進行硬體設定。

6. 設定您的 AWS 帳戶和權限

請參閱 AWS 線上文件「設定您的 AWS 帳號」:https://docs.aws.amazon.com/iot/latest/developerguide/setting-up.html

請依照以下步驟建立您的帳戶和用戶,即可開始使用:

• 註冊 AWS 帳戶:

https://docs.aws.amazon.com/iot/latest/developerguide/setting-up.html#aws-registration

• 建立使用者並授予其適當的權限:

https://docs.aws.amazon.com/iot/latest/developerguide/setting-up.html#create-iam-user

• 開啟 AWS IoT 主控台:

https://docs.aws.amazon.com/iot/latest/developerguide/setting-up.html#iot-console-signin

7. 在 AWS IoT 中建立資源

請參閱以下說明,以了解如何建立 AWS IoT 資源:https://docs.aws.amazon.com/iot/latest/developerguide/create-iot-resources.html

請依照以下各節中概述的步驟為您的設備配置資源:

  • 建立 AWS IoT 策略
  • 創建一個對象

8. 安裝 AWS 命令​​列介面

若要在您的主機上安裝 AWS CLI,請參考以下說明:https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

要完成本指南中的說明,需要安裝 CLI。安裝 AWS CLI 後,請依照以下說明進行設定:https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-config

根據您的 AWS 帳戶,設定存取金鑰 ID、秘密存取金鑰和 AWS 區域的對應值。您也可以根據需要將輸出格式設定為“json”。

9. 安裝 AWS IoT Greengrass

請依照線上指南使用自動設定安裝進行操作。請參考以下步驟中的說明:

設定設備環境

向裝置提供 AWS 憑證。 對於開發環境,您可以使用「使用 IAM 使用者的長期憑證」選項。以下範例展示如何操作:

  • export AWS_ACCESS_KEY_ID=<您的使用者的存取金鑰 ID>
  • export AWS_SECRET_ACCESS_KEY=<您的使用者的秘密存取金鑰>

下載 AWS IoT Greengrass Core 軟體

安裝 AWS IoT Greengrass Core 軟體

10. 建立一個 Hello World 元件

在 AWS IoT Greengrass v2 中,可以在邊緣裝置上建立元件並上傳到雲端,反之亦然。

若要在您的裝置上建立、部署、測試、更新和管理簡單元件,請按照「建立 Hello World 元件」部分下的說明進行操作:

https://docs.aws.amazon.com/greengrass/v2/developerguide/getting-started.html

若要將元件上傳到雲端,請按照「上傳元件」部分下的說明進行操作:

https://docs.aws.amazon.com/greengrass/v2/developerguide/upload-first-component.html

10.1 部署元件

請按照以下網址的線上說明進行操作:部署您的組件,以部署並驗證您的組件是否正在部署。

11. 故障排除

有關 AWS IoT Greengrass 的一般故障排除技巧,請參閱:https://docs.aws.amazon.com/greengrass/v2/developerguide/troubleshooting.html

如需針對特定設備的故障排除指南,請直接發送郵件至 techsupport@premioinc.com