AWS IoT Greengrass 認定スイートを実行するための前提条件 - AWS IoT Greengrass

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

AWS IoT Greengrass 認定スイートを実行するための前提条件

このセクションでは、 AWS IoT Device Tester (IDT) を使用するための前提条件について説明します AWS IoT Greengrass。

AWS IoT Device Tester for の最新バージョンをダウンロードする AWS IoT Greengrass

IDT の最新バージョンをダウンロードし、ファイルシステム上で読み取り/書き込みのアクセス許可を持っている場所 (<device-tester-extract-location>) に抽出します。

注記

複数のユーザーが NFS ディレクトリや Windows ネットワーク共有フォルダなどの共有場所から IDT を実行することはお勧めしません。IDT パッケージをローカルドライブに展開し、ローカルワークステーションで IDT バイナリを実行することをお勧めします。

Windows では、パスの長さは 260 文字に制限されています。Windows を使用している場合は、パスが 260 文字以内になるようにして、IDT をルートディレクトリ (C:\ または D:\ など) に展開します。

AWS IoT Greengrass ソフトウェアをダウンロードする

IDT for AWS IoT Greengrass V2 は、特定のバージョンの との互換性についてデバイスをテストします AWS IoT Greengrass。次のコマンドを実行して、 AWS IoT Greengrass Core ソフトウェアを という名前のファイルにダウンロードしますaws.greengrass.nucleus.zipversion を IDT バージョンのサポートされている nucleus コンポーネントのバージョンに置き換えます。

Linux or Unix
curl -s https://d2s8p88vqu9w66.cloudfront.net/releases/greengrass-version.zip > aws.greengrass.nucleus.zip
Windows Command Prompt (CMD)
curl -s https://d2s8p88vqu9w66.cloudfront.net/releases/greengrass-version.zip > aws.greengrass.nucleus.zip
PowerShell
iwr -Uri https://d2s8p88vqu9w66.cloudfront.net/releases/greengrass-version.zip -OutFile aws.greengrass.nucleus.zip

ダウンロードした aws.greengrass.nucleus.zip ファイルを <device-tester-extract-location>/products/ フォルダに配置します。

注記

同じオペレーティングシステムとアーキテクチャのこのディレクトリに複数のファイルを配置しないでください。

の作成と設定 AWS アカウント

AWS IoT Device Tester for AWS IoT Greengrass V2 を使用する前に、次のステップを実行する必要があります。

  1. をセットアップします AWS アカウント。が既にある場合は AWS アカウント、ステップ 2 に進みます。

  2. IDT 用のアクセス許可を設定する。

これらのアカウントのアクセス許可により、IDT はユーザーに代わって AWS サービスにアクセスし、 AWS IoT モノや AWS IoT Greengrass コンポーネントなどの AWS リソースを作成できます。

これらのリソースを作成するために、IDT for AWS IoT Greengrass V2 は config.json ファイルで設定された AWS 認証情報を使用して、ユーザーに代わって API コールを行います。これらのリソースは、テスト中にさまざまなタイミングでプロビジョニングされます。

注記

ほとんどのテストは AWS 無料利用枠の対象となりますが、 AWS アカウントアカウントにサインアップするときにクレジットカードを提供する必要があります。詳細については、「 アカウントが無料利用枠の対象であるのに、支払い方法が必要なのはなぜですか?」を参照してください。

ステップ 1: をセットアップする AWS アカウント

このステップでは、 AWS アカウントを作成して設定します。 AWS アカウントを既にお持ちの場合は、ステップ 2: IDT 用のアクセス許可を設定する に進んでください。

がない場合は AWS アカウント、次の手順を実行して作成します。

にサインアップするには AWS アカウント
  1. https://portal.aws.amazon.com/billing/signup を開きます。

  2. オンラインの手順に従います。

    サインアップ手順の一環として、通話呼び出しを受け取り、電話キーパッドで検証コードを入力するように求められます。

    にサインアップすると AWS アカウント、 AWS アカウントのルートユーザー が作成されます。ルートユーザーには、アカウントのすべての AWS のサービス とリソースへのアクセス権があります。セキュリティのベストプラクティスとして、ユーザーに管理アクセスを割り当て、ルートユーザーのみを使用してルートユーザーアクセスが必要なタスクを実行してください。

管理者ユーザーを作成するには、以下のいずれかのオプションを選択します。

管理者を管理する方法を 1 つ選択します 目的 方法 以下の操作も可能
IAM Identity Center 内

(推奨)

短期の認証情報を使用して AWSにアクセスします。

これはセキュリティのベストプラクティスと一致しています。ベストプラクティスの詳細については、IAM ユーザーガイドの「IAM でのセキュリティのベストプラクティス」を参照してください。

AWS IAM Identity Center ユーザーガイドの「開始方法」の手順に従います。 AWS Command Line Interface ユーザーガイドを使用する AWS CLI ように を設定 AWS IAM Identity Centerして、プログラムによるアクセスを設定します。
IAM 内

(非推奨)

長期認証情報を使用して AWSにアクセスする。 「IAM ユーザーガイド」の「緊急アクセス用の IAM ユーザーを作成する」の手順に従います。 「IAM ユーザーガイド」の「IAM ユーザーのアクセスキーを管理する」でプログラムによるアクセスを設定します。

ステップ 2: IDT 用のアクセス許可を設定する

このステップでは、IDT for AWS IoT Greengrass V2 がテストを実行し、IDT 使用状況データを収集するために使用するアクセス許可を設定します。AWS Management Consoleまたは AWS Command Line Interface (AWS CLI) を使用して、IDT 用の IAM ポリシーとテストユーザーを作成し、そのユーザーにポリシーをアタッチできます。IDT 用のテストユーザーをすでに作成している場合は、IDT テストを実行するようにデバイスを設定する に進みます。

  1. IAM コンソールにサインインします。

  2. 特定のアクセス許可を持つロールを作成するためのアクセス許可を付与するカスタマー管理ポリシーを作成します。

    1. ナビゲーションペインで ポリシーを選択してから ポリシーの作成を選択します。

    2. PreInstalled を使用していない場合は、[JSON] タブで、プレースホルダーの内容を次のポリシーに置き換えます。PreInstalled を使用している場合は、次のステップに進みます。

      { "Version":"2012-10-17", "Statement":[ { "Sid":"passRoleForResources", "Effect":"Allow", "Action":"iam:PassRole", "Resource":"arn:aws:iam::*:role/idt-*", "Condition":{ "StringEquals":{ "iam:PassedToService":[ "iot.amazonaws.com", "lambda.amazonaws.com", "greengrass.amazonaws.com" ] } } }, { "Sid":"lambdaResources", "Effect":"Allow", "Action":[ "lambda:CreateFunction", "lambda:PublishVersion", "lambda:DeleteFunction", "lambda:GetFunction" ], "Resource":[ "arn:aws:lambda:*:*:function:idt-*" ] }, { "Sid":"iotResources", "Effect":"Allow", "Action":[ "iot:CreateThing", "iot:DeleteThing", "iot:DescribeThing", "iot:CreateThingGroup", "iot:DeleteThingGroup", "iot:DescribeThingGroup", "iot:AddThingToThingGroup", "iot:RemoveThingFromThingGroup", "iot:AttachThingPrincipal", "iot:DetachThingPrincipal", "iot:UpdateCertificate", "iot:DeleteCertificate", "iot:CreatePolicy", "iot:AttachPolicy", "iot:DetachPolicy", "iot:DeletePolicy", "iot:GetPolicy", "iot:Publish", "iot:TagResource", "iot:ListThingPrincipals", "iot:ListAttachedPolicies", "iot:ListTargetsForPolicy", "iot:ListThingGroupsForThing", "iot:ListThingsInThingGroup", "iot:CreateJob", "iot:DescribeJob", "iot:DescribeJobExecution", "iot:CancelJob" ], "Resource":[ "arn:aws:iot:*:*:thing/idt-*", "arn:aws:iot:*:*:thinggroup/idt-*", "arn:aws:iot:*:*:policy/idt-*", "arn:aws:iot:*:*:cert/*", "arn:aws:iot:*:*:topic/idt-*", "arn:aws:iot:*:*:job/*" ] }, { "Sid":"s3Resources", "Effect":"Allow", "Action":[ "s3:GetObject", "s3:PutObject", "s3:DeleteObjectVersion", "s3:DeleteObject", "s3:CreateBucket", "s3:ListBucket", "s3:ListBucketVersions", "s3:DeleteBucket", "s3:PutObjectTagging", "s3:PutBucketTagging" ], "Resource":"arn:aws:s3::*:idt-*" }, { "Sid":"roleAliasResources", "Effect":"Allow", "Action":[ "iot:CreateRoleAlias", "iot:DescribeRoleAlias", "iot:DeleteRoleAlias", "iot:TagResource", "iam:GetRole" ], "Resource":[ "arn:aws:iot:*:*:rolealias/idt-*", "arn:aws:iam::*:role/idt-*" ] }, { "Sid":"idtExecuteAndCollectMetrics", "Effect":"Allow", "Action":[ "iot-device-tester:SendMetrics", "iot-device-tester:SupportedVersion", "iot-device-tester:LatestIdt", "iot-device-tester:CheckVersion", "iot-device-tester:DownloadTestSuite" ], "Resource":"*" }, { "Sid":"genericResources", "Effect":"Allow", "Action":[ "greengrass:*", "iot:GetThingShadow", "iot:UpdateThingShadow", "iot:ListThings", "iot:DescribeEndpoint", "iot:CreateKeysAndCertificate" ], "Resource":"*" }, { "Sid":"iamResourcesUpdate", "Effect":"Allow", "Action":[ "iam:CreateRole", "iam:DeleteRole", "iam:CreatePolicy", "iam:DeletePolicy", "iam:AttachRolePolicy", "iam:DetachRolePolicy", "iam:TagRole", "iam:TagPolicy", "iam:GetPolicy", "iam:ListAttachedRolePolicies", "iam:ListEntitiesForPolicy" ], "Resource":[ "arn:aws:iam::*:role/idt-*", "arn:aws:iam::*:policy/idt-*" ] } ] }
    3. PreInstalled を使用している場合は、[JSON] タブで、プレースホルダーの内容を次のポリシーに置き換えます。必ず次のことを行ってください。

      • iotResources ステートメント内の thingNamethingGroup を、テスト対象デバイス (DUT) への Greengrass のインストール中に作成されたモノの名前とモノのグループに置き換えて、許可を追加します。

      • roleAliasResources ステートメントおよび passRoleForResources ステートメントの passRoleroleAlias を、DUT への Greengrass のインストール中に作成されたロールに置き換えます。

      { "Version":"2012-10-17", "Statement":[ { "Sid":"passRoleForResources", "Effect":"Allow", "Action":"iam:PassRole", "Resource":"arn:aws:iam::*:role/passRole", "Condition":{ "StringEquals":{ "iam:PassedToService":[ "iot.amazonaws.com", "lambda.amazonaws.com", "greengrass.amazonaws.com" ] } } }, { "Sid":"lambdaResources", "Effect":"Allow", "Action":[ "lambda:CreateFunction", "lambda:PublishVersion", "lambda:DeleteFunction", "lambda:GetFunction" ], "Resource":[ "arn:aws:lambda:*:*:function:idt-*" ] }, { "Sid":"iotResources", "Effect":"Allow", "Action":[ "iot:CreateThing", "iot:DeleteThing", "iot:DescribeThing", "iot:CreateThingGroup", "iot:DeleteThingGroup", "iot:DescribeThingGroup", "iot:AddThingToThingGroup", "iot:RemoveThingFromThingGroup", "iot:AttachThingPrincipal", "iot:DetachThingPrincipal", "iot:UpdateCertificate", "iot:DeleteCertificate", "iot:CreatePolicy", "iot:AttachPolicy", "iot:DetachPolicy", "iot:DeletePolicy", "iot:GetPolicy", "iot:Publish", "iot:TagResource", "iot:ListThingPrincipals", "iot:ListAttachedPolicies", "iot:ListTargetsForPolicy", "iot:ListThingGroupsForThing", "iot:ListThingsInThingGroup", "iot:CreateJob", "iot:DescribeJob", "iot:DescribeJobExecution", "iot:CancelJob" ], "Resource":[ "arn:aws:iot:*:*:thing/thingName", "arn:aws:iot:*:*:thinggroup/thingGroup", "arn:aws:iot:*:*:policy/idt-*", "arn:aws:iot:*:*:cert/*", "arn:aws:iot:*:*:topic/idt-*", "arn:aws:iot:*:*:job/*" ] }, { "Sid":"s3Resources", "Effect":"Allow", "Action":[ "s3:GetObject", "s3:PutObject", "s3:DeleteObjectVersion", "s3:DeleteObject", "s3:CreateBucket", "s3:ListBucket", "s3:ListBucketVersions", "s3:DeleteBucket", "s3:PutObjectTagging", "s3:PutBucketTagging" ], "Resource":"arn:aws:s3::*:idt-*" }, { "Sid":"roleAliasResources", "Effect":"Allow", "Action":[ "iot:CreateRoleAlias", "iot:DescribeRoleAlias", "iot:DeleteRoleAlias", "iot:TagResource", "iam:GetRole" ], "Resource":[ "arn:aws:iot:*:*:rolealias/roleAlias", "arn:aws:iam::*:role/idt-*" ] }, { "Sid":"idtExecuteAndCollectMetrics", "Effect":"Allow", "Action":[ "iot-device-tester:SendMetrics", "iot-device-tester:SupportedVersion", "iot-device-tester:LatestIdt", "iot-device-tester:CheckVersion", "iot-device-tester:DownloadTestSuite" ], "Resource":"*" }, { "Sid":"genericResources", "Effect":"Allow", "Action":[ "greengrass:*", "iot:GetThingShadow", "iot:UpdateThingShadow", "iot:ListThings", "iot:DescribeEndpoint", "iot:CreateKeysAndCertificate" ], "Resource":"*" }, { "Sid":"iamResourcesUpdate", "Effect":"Allow", "Action":[ "iam:CreateRole", "iam:DeleteRole", "iam:CreatePolicy", "iam:DeletePolicy", "iam:AttachRolePolicy", "iam:DetachRolePolicy", "iam:TagRole", "iam:TagPolicy", "iam:GetPolicy", "iam:ListAttachedRolePolicies", "iam:ListEntitiesForPolicy" ], "Resource":[ "arn:aws:iam::*:role/idt-*", "arn:aws:iam::*:policy/idt-*" ] } ] }
      注記

      テスト対象のデバイスのトークン交換ロールとしてカスタム IAM ロールを使用する場合は、カスタム IAM ロールリソースを許可するように、ポリシーの roleAliasResources ステートメントと passRoleForResources ステートメントを必ず更新してください。

    4. [ポリシーの確認] を選択します。

    5. [Name] (名前) に IDTGreengrassIAMPermissions と入力します。[概要] で、ポリシーによって付与されたアクセス許可を確認します。

    6. [Create policy] を選択します。

  3. IAM ユーザーを作成し、IDT for AWS IoT Greengrassに必要なアクセス許可をアタッチします。

    1. IAM ユーザーを作成します。IAM ユーザーガイドの IAM ユーザーの作成 (コンソール) のステップ 1 ~ 5 に従います。

    2. アクセス許可を IAM ユーザーにアタッチします。

      1. [Set permissions] ページで、[Attach existing policies to user directly] を選択します。

      2. 前のステップで作成した IDTGreengrassIAMPermissions ポリシーを検索します。チェックボックスをオンにします。

    3. [Next: Tags] (次へ: タグ) を選択します。

    4. [Next: Review] (次へ: レビュー) を選択して、選択内容の概要を表示します。

    5. [ユーザーの作成] を選択します。

    6. ユーザーのアクセスキー (アクセスキー ID とシークレットアクセスキー) を表示するには、パスワードとアクセスキーの横にある [Show (表示)] を選択します。アクセスキーを保存するには、[Download .csv] を選択し、安全な場所にファイルを保存します。この情報を後で使用して、 AWS 認証情報ファイルを設定します。

  4. 次のステップ: 物理デバイスを設定します。

  1. コンピュータに をインストールし、まだインストール AWS CLI されていない場合は設定します。AWS Command Line Interface ユーザーガイドの AWS CLIのインストールのステップに従います。

    注記

    AWS CLI は、コマンドラインシェルから サービスとやり取り AWS するために使用できるオープンソースツールです。

  2. IDT と AWS IoT Greengrass ロールを管理するためのアクセス許可を付与するカスタマー管理ポリシーを作成します。

    1. PreInstalled を使用していない場合は、テキストエディタを開き、次のポリシーコンテンツを JSON ファイルに保存します。PreInstalled を使用している場合は、次のステップに進みます。

      { "Version":"2012-10-17", "Statement":[ { "Sid":"passRoleForResources", "Effect":"Allow", "Action":"iam:PassRole", "Resource":"arn:aws:iam::*:role/idt-*", "Condition":{ "StringEquals":{ "iam:PassedToService":[ "iot.amazonaws.com", "lambda.amazonaws.com", "greengrass.amazonaws.com" ] } } }, { "Sid":"lambdaResources", "Effect":"Allow", "Action":[ "lambda:CreateFunction", "lambda:PublishVersion", "lambda:DeleteFunction", "lambda:GetFunction" ], "Resource":[ "arn:aws:lambda:*:*:function:idt-*" ] }, { "Sid":"iotResources", "Effect":"Allow", "Action":[ "iot:CreateThing", "iot:DeleteThing", "iot:DescribeThing", "iot:CreateThingGroup", "iot:DeleteThingGroup", "iot:DescribeThingGroup", "iot:AddThingToThingGroup", "iot:RemoveThingFromThingGroup", "iot:AttachThingPrincipal", "iot:DetachThingPrincipal", "iot:UpdateCertificate", "iot:DeleteCertificate", "iot:CreatePolicy", "iot:AttachPolicy", "iot:DetachPolicy", "iot:DeletePolicy", "iot:GetPolicy", "iot:Publish", "iot:TagResource", "iot:ListThingPrincipals", "iot:ListAttachedPolicies", "iot:ListTargetsForPolicy", "iot:ListThingGroupsForThing", "iot:ListThingsInThingGroup", "iot:CreateJob", "iot:DescribeJob", "iot:DescribeJobExecution", "iot:CancelJob" ], "Resource":[ "arn:aws:iot:*:*:thing/idt-*", "arn:aws:iot:*:*:thinggroup/idt-*", "arn:aws:iot:*:*:policy/idt-*", "arn:aws:iot:*:*:cert/*", "arn:aws:iot:*:*:topic/idt-*", "arn:aws:iot:*:*:job/*" ] }, { "Sid":"s3Resources", "Effect":"Allow", "Action":[ "s3:GetObject", "s3:PutObject", "s3:DeleteObjectVersion", "s3:DeleteObject", "s3:CreateBucket", "s3:ListBucket", "s3:ListBucketVersions", "s3:DeleteBucket", "s3:PutObjectTagging", "s3:PutBucketTagging" ], "Resource":"arn:aws:s3::*:idt-*" }, { "Sid":"roleAliasResources", "Effect":"Allow", "Action":[ "iot:CreateRoleAlias", "iot:DescribeRoleAlias", "iot:DeleteRoleAlias", "iot:TagResource", "iam:GetRole" ], "Resource":[ "arn:aws:iot:*:*:rolealias/idt-*", "arn:aws:iam::*:role/idt-*" ] }, { "Sid":"idtExecuteAndCollectMetrics", "Effect":"Allow", "Action":[ "iot-device-tester:SendMetrics", "iot-device-tester:SupportedVersion", "iot-device-tester:LatestIdt", "iot-device-tester:CheckVersion", "iot-device-tester:DownloadTestSuite" ], "Resource":"*" }, { "Sid":"genericResources", "Effect":"Allow", "Action":[ "greengrass:*", "iot:GetThingShadow", "iot:UpdateThingShadow", "iot:ListThings", "iot:DescribeEndpoint", "iot:CreateKeysAndCertificate" ], "Resource":"*" }, { "Sid":"iamResourcesUpdate", "Effect":"Allow", "Action":[ "iam:CreateRole", "iam:DeleteRole", "iam:CreatePolicy", "iam:DeletePolicy", "iam:AttachRolePolicy", "iam:DetachRolePolicy", "iam:TagRole", "iam:TagPolicy", "iam:GetPolicy", "iam:ListAttachedRolePolicies", "iam:ListEntitiesForPolicy" ], "Resource":[ "arn:aws:iam::*:role/idt-*", "arn:aws:iam::*:policy/idt-*" ] } ] }
    2. PreInstalled を使用している場合は、テキストエディタを開き、次のポリシーコンテンツを JSON ファイルに保存します。必ず次のことを行ってください。

      • テスト対象デバイス (DUT) への Greengrass のインストール中に作成された iotResources ステートメント内の thingNamethingGroup を置き換えて、許可を追加します。

      • roleAliasResources ステートメントおよび passRoleForResources ステートメントの passRoleroleAlias を、DUT への Greengrass のインストール中に作成されたロールに置き換えます。

      { "Version":"2012-10-17", "Statement":[ { "Sid":"passRoleForResources", "Effect":"Allow", "Action":"iam:PassRole", "Resource":"arn:aws:iam::*:role/passRole", "Condition":{ "StringEquals":{ "iam:PassedToService":[ "iot.amazonaws.com", "lambda.amazonaws.com", "greengrass.amazonaws.com" ] } } }, { "Sid":"lambdaResources", "Effect":"Allow", "Action":[ "lambda:CreateFunction", "lambda:PublishVersion", "lambda:DeleteFunction", "lambda:GetFunction" ], "Resource":[ "arn:aws:lambda:*:*:function:idt-*" ] }, { "Sid":"iotResources", "Effect":"Allow", "Action":[ "iot:CreateThing", "iot:DeleteThing", "iot:DescribeThing", "iot:CreateThingGroup", "iot:DeleteThingGroup", "iot:DescribeThingGroup", "iot:AddThingToThingGroup", "iot:RemoveThingFromThingGroup", "iot:AttachThingPrincipal", "iot:DetachThingPrincipal", "iot:UpdateCertificate", "iot:DeleteCertificate", "iot:CreatePolicy", "iot:AttachPolicy", "iot:DetachPolicy", "iot:DeletePolicy", "iot:GetPolicy", "iot:Publish", "iot:TagResource", "iot:ListThingPrincipals", "iot:ListAttachedPolicies", "iot:ListTargetsForPolicy", "iot:ListThingGroupsForThing", "iot:ListThingsInThingGroup", "iot:CreateJob", "iot:DescribeJob", "iot:DescribeJobExecution", "iot:CancelJob" ], "Resource":[ "arn:aws:iot:*:*:thing/thingName", "arn:aws:iot:*:*:thinggroup/thingGroup", "arn:aws:iot:*:*:policy/idt-*", "arn:aws:iot:*:*:cert/*", "arn:aws:iot:*:*:topic/idt-*", "arn:aws:iot:*:*:job/*" ] }, { "Sid":"s3Resources", "Effect":"Allow", "Action":[ "s3:GetObject", "s3:PutObject", "s3:DeleteObjectVersion", "s3:DeleteObject", "s3:CreateBucket", "s3:ListBucket", "s3:ListBucketVersions", "s3:DeleteBucket", "s3:PutObjectTagging", "s3:PutBucketTagging" ], "Resource":"arn:aws:s3::*:idt-*" }, { "Sid":"roleAliasResources", "Effect":"Allow", "Action":[ "iot:CreateRoleAlias", "iot:DescribeRoleAlias", "iot:DeleteRoleAlias", "iot:TagResource", "iam:GetRole" ], "Resource":[ "arn:aws:iot:*:*:rolealias/roleAlias", "arn:aws:iam::*:role/idt-*" ] }, { "Sid":"idtExecuteAndCollectMetrics", "Effect":"Allow", "Action":[ "iot-device-tester:SendMetrics", "iot-device-tester:SupportedVersion", "iot-device-tester:LatestIdt", "iot-device-tester:CheckVersion", "iot-device-tester:DownloadTestSuite" ], "Resource":"*" }, { "Sid":"genericResources", "Effect":"Allow", "Action":[ "greengrass:*", "iot:GetThingShadow", "iot:UpdateThingShadow", "iot:ListThings", "iot:DescribeEndpoint", "iot:CreateKeysAndCertificate" ], "Resource":"*" }, { "Sid":"iamResourcesUpdate", "Effect":"Allow", "Action":[ "iam:CreateRole", "iam:DeleteRole", "iam:CreatePolicy", "iam:DeletePolicy", "iam:AttachRolePolicy", "iam:DetachRolePolicy", "iam:TagRole", "iam:TagPolicy", "iam:GetPolicy", "iam:ListAttachedRolePolicies", "iam:ListEntitiesForPolicy" ], "Resource":[ "arn:aws:iam::*:role/idt-*", "arn:aws:iam::*:policy/idt-*" ] } ] }
      注記

      テスト対象のデバイスのトークン交換ロールとしてカスタム IAM ロールを使用する場合は、カスタム IAM ロールリソースを許可するように、ポリシーの roleAliasResources ステートメントと passRoleForResources ステートメントを必ず更新してください。

    3. 次のコマンドを実行して、IDTGreengrassIAMPermissions という名前でカスタマー管理ポリシーを作成します。policy.json を前のステップで作成した JSON ファイルへのフルパスに置き換えます。

      aws iam create-policy --policy-name IDTGreengrassIAMPermissions --policy-document file://policy.json
  3. IAM ユーザーを作成し、IDT for AWS IoT Greengrassに必要なアクセス許可をアタッチします。

    1. IAM ユーザーを作成します。このセットアップ例では、ユーザーは IDTGreengrassUser という名前になります。

      aws iam create-user --user-name IDTGreengrassUser
    2. ステップ 2 で作成した IDTGreengrassIAMPermissions ポリシーを IAM ユーザーにアタッチします。コマンドの <account-id> を の ID に置き換えます AWS アカウント。

      aws iam attach-user-policy --user-name IDTGreengrassUser --policy-arn arn:aws:iam::<account-id>:policy/IDTGreengrassIAMPermissions
  4. ユーザーのシークレットアクセスキーを作成します。

    aws iam create-access-key --user-name IDTGreengrassUser

    この出力は安全な場所に保存してください。この情報は、後で AWS 認証情報ファイルの設定に使用します。

  5. 次のステップ: 物理デバイスを設定します。

AWS IoT Device Tester アクセス許可

以下のポリシーでは、 AWS IoT Device Tester アクセス許可について説明します。

AWS IoT Device Tester では、バージョンチェックと自動更新機能にこれらのアクセス許可が必要です。

  • iot-device-tester:SupportedVersion

    サポートされている製品、テストスイート、IDT バージョンのリストを取得する AWS IoT Device Tester 許可を付与。

  • iot-device-tester:LatestIdt

    ダウンロード可能な最新の IDT バージョンを取得する AWS IoT Device Tester 許可を付与。

  • iot-device-tester:CheckVersion

    IDT、テストスイート、製品のバージョンの互換性をチェックする AWS IoT Device Tester 許可を付与。

  • iot-device-tester:DownloadTestSuite

    テストスイートの更新をダウンロードする AWS IoT Device Tester 許可を付与。

AWS IoT Device Tester は、オプションのメトリクスレポートにも次のアクセス許可を使用します。

  • iot-device-tester:SendMetrics

    AWS IoT Device Tester 内部使用状況に関するメトリクスを収集 AWS するためのアクセス許可を付与します。この権限を省略すると、これらのメトリックは収集されません。