AWS IoT Greengrass 검증 제품군을 실행하기 위한 사전 조건 - AWS IoT Greengrass

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

AWS IoT Greengrass 검증 제품군을 실행하기 위한 사전 조건

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

용의 최신 버전 다운로드 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 코어 소프트웨어를 라는 파일에 다운로드합니다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 for 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 계정 루트 사용자이 생성됩니다. 루트 사용자에게는 계정의 모든 AWS 서비스 및 리소스에 액세스할 권한이 있습니다. 보안 모범 사례는 사용자에게 관리 액세스 권한을 할당하고, 루트 사용자만 사용하여 루트 사용자 액세스 권한이 필요한 작업을 수행하는 것입니다.

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

관리자를 관리하는 방법 한 가지 선택 목적 By 다른 방법
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 탭에서 다음 정책으로 자리 표시자 내용을 바꿉니다. 다음을 확인합니다.

      • 테스트 중 디바이스(DUT)에 Greengrass가 설치되는 동안 생성된 사물 이름과 사물 그룹으로 iotResources 문의 thingNamethingGroup을 바꾸어 권한을 추가합니다.

      • DUT에 Greengrass가 설치되는 동안 생성된 역할로 roleAliasResources 문과 passRoleForResources 문의 passRoleroleAlias를 바꿉니다.

      { "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. 이름에서 IDTGreengrassIAMPermissions을 입력합니다. Summary(요약) 아래에서 정책에 의해 부여된 권한을 검토합니다.

    6. 정책 생성을 선택합니다.

  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 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을 바꾸어 권한을 추가합니다.

      • DUT에 Greengrass가 설치되는 동안 생성된 역할로 roleAliasResources 문과 passRoleForResources 문의 passRoleroleAlias를 바꿉니다.

      { "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라는 고객 관리형 정책을 생성합니다. 이전 단계에서 생성한 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로 바꿉니다 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 를 수집할 수 있는 권한을 부여합니다. 이 권한을 생략하면 이러한 지표가 수집되지 않습니다.