安裝程式佈建資源的最低 IAM 政策 - AWS IoT Greengrass

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

安裝程式佈建資源的最低 IAM 政策

安裝 AWS IoT Greengrass Core 軟體時,您可以佈建必要的 AWS 資源,例如裝置的 AWS IoT 物件和 IAM 角色。您也可以將本機開發工具部署到裝置。安裝程式需要 AWS 認證,以便它可以在您的 AWS 帳戶. 如需詳細資訊,請參閱 安裝 AWS IoT Greengrass 核心軟體

下列範例原則包含安裝程式佈建這些資源所需的最小動作集。如果您指定安裝程式的--provision引數,則需要這些權限。以您的識別碼取代帳戶AWS 帳戶 識別碼,並將 Greengrassv2 TokenExchangeRole 取代為您以安裝程式引數指定的權杖交換角色名稱。--tes-role-name

注意

只有在您為安裝程式指定--deploy-dev-tools引數時,才需要DeployDevTools原則陳述式。

Greengrass nucleus v2.5.0 and later
{ "Version": "2012-10-17", "Statement": [ { "Sid": "CreateTokenExchangeRole", "Effect": "Allow", "Action": [ "iam:AttachRolePolicy", "iam:CreatePolicy", "iam:CreateRole", "iam:GetPolicy", "iam:GetRole", "iam:PassRole" ], "Resource": [ "arn:aws:iam::account-id:role/GreengrassV2TokenExchangeRole", "arn:aws:iam::account-id:policy/GreengrassV2TokenExchangeRoleAccess", "arn:aws:iam::aws:policy/GreengrassV2TokenExchangeRoleAccess" ] }, { "Sid": "CreateIoTResources", "Effect": "Allow", "Action": [ "iot:AddThingToThingGroup", "iot:AttachPolicy", "iot:AttachThingPrincipal", "iot:CreateKeysAndCertificate", "iot:CreatePolicy", "iot:CreateRoleAlias", "iot:CreateThing", "iot:CreateThingGroup", "iot:DescribeEndpoint", "iot:DescribeRoleAlias", "iot:DescribeThingGroup", "iot:GetPolicy" ], "Resource": "*" }, { "Sid": "DeployDevTools", "Effect": "Allow", "Action": [ "greengrass:CreateDeployment", "iot:CancelJob", "iot:CreateJob", "iot:DeleteThingShadow", "iot:DescribeJob", "iot:DescribeThing", "iot:DescribeThingGroup", "iot:GetThingShadow", "iot:UpdateJob", "iot:UpdateThingShadow" ], "Resource": "*" } ] }
Earlier than v2.5.0
{ "Version": "2012-10-17", "Statement": [ { "Sid": "CreateTokenExchangeRole", "Effect": "Allow", "Action": [ "iam:AttachRolePolicy", "iam:CreatePolicy", "iam:CreateRole", "iam:GetPolicy", "iam:GetRole", "iam:PassRole" ], "Resource": [ "arn:aws:iam::account-id:role/GreengrassV2TokenExchangeRole", "arn:aws:iam::account-id:policy/GreengrassV2TokenExchangeRoleAccess", "arn:aws:iam::aws:policy/GreengrassV2TokenExchangeRoleAccess" ] }, { "Sid": "CreateIoTResources", "Effect": "Allow", "Action": [ "iot:AddThingToThingGroup", "iot:AttachPolicy", "iot:AttachThingPrincipal", "iot:CreateKeysAndCertificate", "iot:CreatePolicy", "iot:CreateRoleAlias", "iot:CreateThing", "iot:CreateThingGroup", "iot:DescribeEndpoint", "iot:DescribeRoleAlias", "iot:DescribeThingGroup", "iot:GetPolicy" ], "Resource": "*" }, { "Sid": "DeployDevTools", "Effect": "Allow", "Action": [ "greengrass:CreateDeployment", "iot:CancelJob", "iot:CreateJob", "iot:DeleteThingShadow", "iot:DescribeJob", "iot:DescribeThing", "iot:DescribeThingGroup", "iot:GetThingShadow", "iot:UpdateJob", "iot:UpdateThingShadow" ], "Resource": "*" } ] }