검증 제품군 실행을 위한 사전 요구 사항 AWS IoT Greengrass - AWS IoT Greengrass

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

검증 제품군 실행을 위한 사전 요구 사항 AWS IoT Greengrass

이 섹션에서는 AWS IoT Device Tester (IDT) 를 사용하기 위한 사전 요구 사항을 설명합니다. AWS IoT Greengrass

for의 최신 버전을 다운로드하십시오. AWS IoT Device TesterAWS 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.zip 파일에 다운로드합니다. 버전을 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 AWS IoT Greengrass V2용으로 사용하려면 먼저 다음 단계를 수행해야 합니다.

  1. 를 설정하십시오 AWS 계정. 이미 가지고 있다면 2단계로 건너뛰세요. AWS 계정

  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 계정 루트 사용자a가 생성됩니다. 루트 사용자에게는 계정의 모든 AWS 서비스 및 리소스 액세스 권한이 있습니다. 보안 모범 사례는 사용자에게 관리 액세스 권한을 할당하고, 루트 사용자만 사용하여 루트 사용자 액세스 권한이 필요한 작업을 수행하는 것입니다.

다음 옵션 중 하나를 선택하여 관리 사용자를 생성합니다.

관리자를 관리하는 방법 한 가지 선택 목적 By 다른 방법
IAM Identity Center에서

(권장)

단기 보안 인증 정보를 사용하여 AWS에 액세스합니다.

이는 보안 모범 사례와 일치합니다. 모범 사례에 대한 자세한 내용은 IAM 사용 설명서IAM 보안 모범 사례를 참조하세요.

AWS IAM Identity Center 사용 설명서의 시작하기 지침을 따르세요. 사용 AWS IAM Identity CenterAWS Command Line Interface 설명서에서 사용하도록 AWS CLI 구성하여 프로그래밍 액세스를 구성하십시오.
IAM에서

(권장되지 않음)

장기 보안 인증 정보를 사용하여 AWS에 액세스합니다. IAM 사용 설명서의 첫 IAM 관리 사용자 및 사용자 그룹 만들기에 나온 지침을 따릅니다. IAM 사용 설명서에 나온 IAM 사용자의 액세스 키 관리 단계를 수행하여 프로그래밍 방식의 액세스를 구성합니다.

2단계: IDT에 대한 권한 구성

이 단계에서는 IDT for AWS IoT Greengrass V2가 테스트를 실행하고 IDT 사용 데이터를 수집하는 데 사용하는 권한을 구성합니다. AWS Management Consoleor AWS Command Line Interface (AWS CLI) 를 사용하여 IAM 정책을 만들고 IDT용 테스트 사용자를 만든 다음 정책을 사용자에게 연결할 수 있습니다. 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를 설치하는 동안 생성된 사물 이름 및 사물 그룹으로 바꾸어 권한을 추가합니다.

      • 명령문과 명령문의 PassRole 및 RoleAlias를 DUT에 roleAliasResources passRoleForResources 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 역할을 테스트 대상 디바이스의 토큰 교환 역할로 사용하려면 정책의 명령문과 roleAliasResources 설명문을 업데이트하여 사용자 지정 IAM 역할 리소스를 허용해야 합니다. passRoleForResources

    4. 정책 검토를 선택합니다.

    5. 이름에서 IDTGreengrassIAMPermissions을 입력합니다. Summary(요약) 아래에서 정책에 의해 부여된 권한을 검토합니다.

    6. 정책 생성(Create policy)을 선택합니다.

  3. IAM 사용자를 만들고 AWS IoT Greengrass용 IDT에 필요한 권한을 연결합니다.

    1. IAM 사용자를 생성합니다. IAM 사용 설명서에서 IAM 사용자 생성(콘솔)의 1~5단계를 따르십시오.

    2. IAM 사용자에게 권한을 연결합니다.

      1. Set permissions(권한 설정) 페이지에서 Attach existing policies to user directly(사용자에게 직접 기존 정책 연결)를 선택합니다.

      2. 이전 단계에서 만든 IDTGreengrassIAMPermissions 정책을 검색합니다. 확인란을 선택합니다.

    3. 다음: 태그를 선택합니다.

    4. Next: Review(다음: 검토)를 선택하여 선택 사항의 요약을 봅니다.

    5. 사용자 생성을 선택합니다.

    6. 사용자의 액세스 키(액세스 키 ID와 비밀 액세스 키)를 보려면 암호와 액세스 키 옆에 있는 Show(표시)를 선택합니다. 액세스 키를 저장하려면 Download .csv(csv 다운로드)를 선택한 후 안전한 위치에 파일을 저장합니다. 나중에 이 정보를 사용하여 AWS 자격 증명 파일을 구성합니다.

  4. 다음 단계: 물리적 장치를 구성합니다.

  1. 컴퓨터에 설치하고 구성하세요 (아직 설치되지 않은 AWS CLI 경우). AWS Command Line Interface 사용 설명서 AWS CLI설치 단계를 따르십시오.

    참고

    명령줄 셸에서 AWS 서비스와 상호 작용하는 데 사용할 수 있는 오픈 소스 도구입니다. AWS CLI

  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 명령문에서 ThingName과 ThingGroup을 교체하여 권한을 추가합니다.

      • 명령문과 명령문의 PassRole 및 RoleAlias를 DUT에 roleAliasResources passRoleForResources 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 역할을 테스트 대상 디바이스의 토큰 교환 역할로 사용하려면 정책의 명령문과 roleAliasResources 설명문을 업데이트하여 사용자 지정 IAM 역할 리소스를 허용해야 합니다. passRoleForResources

    3. 다음 명령을 실행하여 이라는 고객 관리형 정책을 생성합니다. IDTGreengrassIAMPermissions 이전 단계에서 만든 JSON 파일의 전체 policy.json 경로로 바꾸십시오.

      aws iam create-policy --policy-name IDTGreengrassIAMPermissions --policy-document file://policy.json
  3. IAM 사용자를 만들고 AWS IoT Greengrass용 IDT에 필요한 권한을 연결합니다.

    1. IAM 사용자를 생성합니다. 이 예제 설정에서 사용자의 이름은 IDTGreengrassUser입니다.

      aws iam create-user --user-name IDTGreengrassUser
    2. 2단계에서 생성한 IDTGreengrassIAMPermissions 정책을 IAM 사용자에게 연결합니다. <account-id>명령의 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 수집할 권한을 부여합니다. 이 권한을 생략하면 이러한 지표는 수집되지 않습니다.