選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

將以身分為基礎的政策 (IAM 政策) 用於 Amazon Redshift - Amazon Redshift

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

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

將以身分為基礎的政策 (IAM 政策) 用於 Amazon Redshift

這個主題提供以身分為基礎的政策範例,在該政策中帳戶管理員可以將許可政策連接至 IAM 身分 (即使用者、群組和角色)。

重要

建議您先檢閱簡介主題,其中說明基本概念及有何選項可供您管理對 Amazon Redshift 資源的存取。如需詳細資訊,請參閱管理 Amazon Redshift 資源存取許可的概觀

以下顯示許可政策範例。此政策允許使用者建立、刪除、修改和重新啟動所有叢集,然後拒絕刪除或修改叢集識別符在 AWS 區域 us-west-2和 AWS 帳戶 production中以 開頭的任何叢集的許可123456789012

{ "Version": "2012-10-17", "Statement": [ { "Sid":"AllowClusterManagement", "Action": [ "redshift:CreateCluster", "redshift:DeleteCluster", "redshift:ModifyCluster", "redshift:RebootCluster" ], "Resource": [ "*" ], "Effect": "Allow" }, { "Sid":"DenyDeleteModifyProtected", "Action": [ "redshift:DeleteCluster", "redshift:ModifyCluster" ], "Resource": [ "arn:aws:redshift:us-west-2:123456789012:cluster:production*" ], "Effect": "Deny" } ] }

此政策具有兩個陳述式:

  • 第一個陳述式會將某使用者的許可授予給另一位使用者,讓該使用者得以建立、刪除、修改叢集和將它們重新開機。陳述式指定萬用字元 (*) 做為Resource值,以便政策套用至根 AWS 帳戶擁有的所有 Amazon Redshift 資源。

  • 第二個陳述式會拒絕對叢集的刪除或修改許可。此陳述式會為包含萬用字元 (*) 的 Resource 值指定叢集 Amazon Resource Name (ARN)。因此,此陳述式適用於叢集識別符開頭為 的根 AWS 帳戶擁有的所有 Amazon Redshift 叢集production

AWS Amazon Redshift 的 受管政策

AWS 提供由 建立和管理的獨立 IAM 政策,以解決許多常見的使用案例 AWS。受管政策授與常見使用案例中必要的許可,讓您免於查詢需要哪些許可。如需詳細資訊,請參閱《IAM 使用者指南》中的 AWS 受管政策

您也能建立專屬的自訂 IAM 政策,以允許 Amazon Redshift API 操作與資源的相關許可。您可以將這些自訂政策附加至需要這些許可的 IAM 角色或群組。

下列各節說明 AWS 受管政策,您可以將這些政策連接到您帳戶中的使用者,並且專屬於 Amazon Redshift。

AmazonRedshiftReadOnlyAccess

授予 AWS 帳戶所有 Amazon Redshift 資源的唯讀存取權。

您可以在 IAM 主控台上找到 AmazonRedshiftReadOnlyAccess 政策,並在《AWS 受管政策參考指南》中找到 AmazonRedshiftReadOnlyAccess

AmazonRedshiftFullAccess

授予 AWS 帳戶所有 Amazon Redshift 資源的完整存取權。此外,這個政策還會授予所有 Amazon Redshift Serverless 資源的完整存取權。

您可以在 IAM 主控台上找到 AmazonRedshiftFullAccess 政策,並在《AWS 受管政策參考指南》中找到 AmazonRedshiftFullAccess

AmazonRedshiftQueryEditor

授予 Amazon Redshift 主控台上查詢編輯器的完整存取權。

您可以在 IAM 主控台上找到 AmazonRedshiftQueryEditor 政策,並在《AWS 受管政策參考指南》中找到 AmazonRedshiftQueryEditor

AmazonRedshiftDataFullAccess

授予 AWS 帳戶 Amazon Redshift Data API 操作和資源的完整存取權。

您可以在 IAM 主控台上找到 AmazonRedshiftDataFullAccess 政策,並在《AWS 受管政策參考指南》中找到 AmazonRedshiftDataFullAccess

AmazonRedshiftQueryEditorV2FullAccess

授予 Amazon Redshift 查詢編輯器 v2 操作和資源的完整存取權。此政策也會授予其他必要服務的存取權。

您可以在 IAM 主控台上找到 AmazonRedshiftQueryEditorV2FullAccess 政策,並在《AWS 受管政策參考指南》中找到 AmazonRedshiftQueryEditorV2FullAccess

AmazonRedshiftQueryEditorV2NoSharing

授予使用 Amazon Redshift 查詢編輯器 v2 的能力,而不共用資源。此政策也會授予其他必要服務的存取權。使用此政策的主體無法標記其資源 (例如查詢),以便與相同 AWS 帳戶中的其他主體共用。

您可以在 IAM 主控台上找到 AmazonRedshiftQueryEditorV2NoSharing 政策,並在《AWS 受管政策參考指南》中找到 AmazonRedshiftQueryEditorV2NoSharing

AmazonRedshiftQueryEditorV2ReadSharing

授予使用 Amazon Redshift 查詢編輯器 v2 的能力,並可有限度地共用資源。此政策也會授予其他必要服務的存取權。使用此政策的主體可以標記其資源 (例如查詢),以便與相同 AWS 帳戶中的其他主體共用。獲得授予的主體可以讀取與其團隊共用的資源,但無法更新這些資源。

您可以在 IAM 主控台上找到 AmazonRedshiftQueryEditorV2ReadSharing 政策,並在《AWS 受管政策參考指南》中找到 AmazonRedshiftQueryEditorV2ReadSharing

AmazonRedshiftQueryEditorV2ReadWriteSharing

授予使用 Amazon Redshift 查詢編輯器 v2 的能力,並可共用資源。此政策也會授予其他必要服務的存取權。使用此政策的主體可以標記其資源 (例如查詢),以便與相同 AWS 帳戶中的其他主體共用。獲得授予的主體可以讀取和更新與其團隊共用的資源。

您可以在 IAM 主控台上找到 AmazonRedshiftQueryEditorV2ReadWriteSharing 政策,並在《AWS 受管政策參考指南》中找到 AmazonRedshiftQueryEditorV2ReadWriteSharing

AmazonRedshiftServiceLinkedRolePolicy

您無法將 AmazonRedshiftServiceLinkedRolePolicy 附加至您的 IAM 實體。此政策會附加至服務連結角色,可讓 Amazon Redshift 存取帳戶資源。如需詳細資訊,請參閱為 Amazon Redshift 使用服務連結角色

您可以在 IAM 主控台上找到 AmazonRedshiftServiceLinkedRolePolicy 政策,並在《AWS 受管政策參考指南》中找到 AmazonRedshiftServiceLinkedRolePolicy

AmazonRedshiftAllCommandsFullAccess

授予相關能力,而能夠使用從 Amazon Redshift 主控台建立的 IAM 角色,並將其設定為叢集的預設值,以便執行 COPY (從 Amazon S3)、UNLOAD、CREATE EXTERNAL SCHEMA、CREATE EXTERNAL FUNCTION 和 CREATE MODEL 命令。此政策也會授予許可,以執行相關服務的 SELECT 陳述式,例如 Amazon S3、CloudWatch Logs、Amazon SageMaker AI 或 AWS Glue。

您可以在 IAM 主控台上找到 AmazonRedshiftAllCommandsFullAccess 政策,並在《AWS 受管政策參考指南》中找到 AmazonRedshiftAllCommandsFullAccess

您也能建立專屬的自訂 IAM 政策,以允許 Amazon Redshift API 操作與資源的相關許可。您可以將這些自訂政策附加至需要這些許可的 IAM 角色或群組。

AWS 受管政策的 Amazon Redshift 更新

檢視自此服務開始追蹤 Amazon Redshift AWS 受管政策更新以來的詳細資訊。如需有關此頁面變更的自動提醒,請訂閱 Amazon Redshift 文件歷史記錄頁面上的 RSS 摘要。

變更 描述 日期

AmazonRedshiftServiceLinkedRolePolicy – 更新現有政策

glue:GetCatalogglue:GetCatalogs 動作的許可已新增至受管政策。新增它們會授予從中取得目錄資訊的許可 AWS Glue。

2024 年 12 月 3 日

AmazonRedshiftServiceLinkedRolePolicy – 更新現有政策

servicequotas:GetServiceQuota 動作的許可已新增至受管政策。這提供存取配額或限制的許可。

2024 年 3 月 8 日

AmazonRedshiftQueryEditorV2FullAccess – 更新現有政策

redshift-serverless:ListNamespacesredshift-serverless:ListWorkgroups 動作的許可已新增至受管政策。新增它們會授予許可,以列出 Amazon Redshift 資料倉儲中的無伺服器命名空間和無伺服器工作群組。

2024 年 2 月 21 日

AmazonRedshiftQueryEditorV2NoSharing – 更新現有政策

redshift-serverless:ListNamespacesredshift-serverless:ListWorkgroups 動作的許可已新增至受管政策。新增它們會授予許可,以列出 Amazon Redshift 資料倉儲中的無伺服器命名空間和無伺服器工作群組。

2024 年 2 月 21 日

AmazonRedshiftQueryEditorV2ReadSharing – 更新現有政策

redshift-serverless:ListNamespacesredshift-serverless:ListWorkgroups 動作的許可已新增至受管政策。新增它們會授予許可,以列出 Amazon Redshift 資料倉儲中的無伺服器命名空間和無伺服器工作群組。

2024 年 2 月 21 日

AmazonRedshiftQueryEditorV2ReadWriteSharing – 更新現有政策

redshift-serverless:ListNamespacesredshift-serverless:ListWorkgroups 動作的許可已新增至受管政策。新增它們會授予許可,以列出 Amazon Redshift 資料倉儲中的無伺服器命名空間和無伺服器工作群組。

2024 年 2 月 21 日

AmazonRedshiftReadOnlyAccess – 更新現有政策

redshift:ListRecommendations 動作的許可已新增至受管政策。這會授予列出 Amazon Redshift Advisor 建議的許可。

2024 年 2 月 7 日

AmazonRedshiftServiceLinkedRolePolicy – 更新現有政策

ec2:AssignIpv6Addressesec2:UnassignIpv6Addresses 動作的許可已新增至受管政策。新增這兩個動作可准許指派和取消指派 IP 地址。

2023 年 10 月 31 日

AmazonRedshiftQueryEditorV2NoSharing – 更新現有政策

sqlworkbench:GetAutocompletionMetadatasqlworkbench:GetAutocompletionResource 動作的許可已新增至受管政策。新增這兩個動作可准許產生和擷取資料庫資訊,以便在編輯查詢時自動完成 SQL。

2023 年 8 月 16 日

AmazonRedshiftQueryEditorV2ReadSharing – 更新現有政策

sqlworkbench:GetAutocompletionMetadatasqlworkbench:GetAutocompletionResource 動作的許可已新增至受管政策。新增這兩個動作可准許產生和擷取資料庫資訊,以便在編輯查詢時自動完成 SQL。

2023 年 8 月 16 日

AmazonRedshiftQueryEditorV2ReadWriteSharing – 更新現有政策

sqlworkbench:GetAutocompletionMetadatasqlworkbench:GetAutocompletionResource 動作的許可已新增至受管政策。新增這兩個動作可准許產生和擷取資料庫資訊,以便在編輯查詢時自動完成 SQL。

2023 年 8 月 16 日

AmazonRedshiftServiceLinkedRolePolicy – 更新現有政策

在 上 AWS Secrets Manager 建立和管理秘密的動作許可會新增至 受管政策。已新增的許可如下:

  • secretsmanager:GetRandomPassword

  • secretsmanager:DescribeSecret

  • secretsmanager:PutSecretValue

  • secretsmanager:UpdateSecret

  • secretsmanager:UpdateSecretVersionStage

  • secretsmanager:RotateSecret

  • secretsmanager:DeleteSecret

2023 年 8 月 14 日

AmazonRedshiftServiceLinkedRolePolicy – 更新現有政策

Amazon EC2 上用來建立和管理安全群組與路由規則的動作許可已從受管政策中移除。這些許可與建立子網路和 VPC 有關。已移除的許可如下:

  • ec2:AuthorizeSecurityGroupEgress

  • ec2:AuthorizeSecurityGroupIngress

  • ec2:UpdateSecurityGroupRuleDescriptionsEgress

  • ec2:ReplaceRouteTableAssociation

  • ec2:CreateRouteTable

  • ec2:AttachInternetGateway

  • ec2:UpdateSecurityGroupRuleDescriptionsIngress

  • ec2:AssociateRouteTable

  • ec2:RevokeSecurityGroupIngress

  • ec2:CreateRoute

  • ec2:CreateSecurityGroup

  • ec2:RevokeSecurityGroupEgress

  • ec2:ModifyVpcAttribute

  • ec2:CreateSubnet

  • ec2:CreateInternetGateway

  • ec2:CreateVpc

這些許可與 Purpose:RedshiftMigrateToVpc 資源標籤相關聯。這個標籤將許可的適用範圍限制在 Amazon EC2 Classic 到 Amazon EC2 VPC 的遷移任務。如需資源標籤的詳細資訊,請參閱使用標籤控制對 AWS 資源的存取
2023 年 5 月 8 日

AmazonRedshiftDataFullAccess – 更新現有政策

redshift:GetClusterCredentialsWithIAM 動作的許可已新增至受管政策。新增此項目可准許取得增強型臨時憑證,讓指定的 AWS 帳戶存取 Amazon Redshift 資料庫。

2023 年 4 月 7 日

AmazonRedshiftServiceLinkedRolePolicy – 更新現有政策

Amazon EC2 上用於建立和管理安全群組規則的動作許可已新增至受管政策。這些安全群組和規則特別與 Amazon Redshift aws:RequestTag/Redshift 資源標籤相關聯。這會將許可的適用範圍限制在特定的 Amazon Redshift 資源。

2023 年 4 月 6 日

AmazonRedshiftQueryEditorV2NoSharing – 更新現有政策

sqlworkbench:GetSchemaInference 動作的許可已新增至受管政策。新增此項目可准許取得從檔案中推斷出的資料欄和資料類型。

2023 年 3 月 21 日

AmazonRedshiftQueryEditorV2ReadSharing – 更新現有政策

sqlworkbench:GetSchemaInference 動作的許可已新增至受管政策。新增此項目可准許取得從檔案中推斷出的資料欄和資料類型。

2023 年 3 月 21 日

AmazonRedshiftQueryEditorV2ReadWriteSharing – 更新現有政策

sqlworkbench:GetSchemaInference 動作的許可已新增至受管政策。新增此項目可准許取得從檔案中推斷出的資料欄和資料類型。

2023 年 3 月 21 日

AmazonRedshiftQueryEditorV2NoSharing – 更新現有政策

sqlworkbench:AssociateNotebookWithTab 動作的許可已新增至受管政策。新增此項目可准許建立和更新連結至使用者自有筆記本的標籤。

2023 年 2 月 2 日

AmazonRedshiftQueryEditorV2ReadSharing – 更新現有政策

sqlworkbench:AssociateNotebookWithTab 動作的許可已新增至受管政策。新增此項目可准許建立和更新連結至使用者自有筆記本或連結至與其共用之筆記本的標籤。

2023 年 2 月 2 日

AmazonRedshiftQueryEditorV2ReadWriteSharing – 更新現有政策

sqlworkbench:AssociateNotebookWithTab 動作的許可已新增至受管政策。新增此項目可准許建立和更新連結至使用者自有筆記本或連結至與其共用之筆記本的標籤。

2023 年 2 月 2 日

AmazonRedshiftQueryEditorV2NoSharing – 更新現有政策

為了授予使用筆記本的許可,Amazon Redshift 已新增下列動作的許可:

  • sqlworkbench:ListNotebooks

  • sqlworkbench:CreateNotebook

  • sqlworkbench:DuplicateNotebook

  • sqlworkbench:CreateNotebookFromVersion

  • sqlworkbench:ImportNotebook

  • sqlworkbench:GetNotebook

  • sqlworkbench:UpdateNotebook

  • sqlworkbench:DeleteNotebook

  • sqlworkbench:CreateNotebookCell

  • sqlworkbench:DeleteNotebookCell

  • sqlworkbench:UpdateNotebookCellContent

  • sqlworkbench:UpdateNotebookCellLayout

  • sqlworkbench:BatchGetNotebookCell

  • sqlworkbench:ListNotebookVersions

  • sqlworkbench:CreateNotebookVersion

  • sqlworkbench:GetNotebookVersion

  • sqlworkbench:DeleteNotebookVersion

  • sqlworkbench:RestoreNotebookVersion

  • sqlworkbench:ExportNotebook

2022 年 10 月 17 日

AmazonRedshiftQueryEditorV2ReadSharing – 更新現有政策

為了授予使用筆記本的許可,Amazon Redshift 已新增下列動作的許可:

  • sqlworkbench:ListNotebooks

  • sqlworkbench:CreateNotebook

  • sqlworkbench:DuplicateNotebook

  • sqlworkbench:CreateNotebookFromVersion

  • sqlworkbench:ImportNotebook

  • sqlworkbench:GetNotebook

  • sqlworkbench:UpdateNotebook

  • sqlworkbench:DeleteNotebook

  • sqlworkbench:CreateNotebookCell

  • sqlworkbench:DeleteNotebookCell

  • sqlworkbench:UpdateNotebookCellContent

  • sqlworkbench:UpdateNotebookCellLayout

  • sqlworkbench:BatchGetNotebookCell

  • sqlworkbench:ListNotebookVersions

  • sqlworkbench:CreateNotebookVersion

  • sqlworkbench:GetNotebookVersion

  • sqlworkbench:DeleteNotebookVersion

  • sqlworkbench:RestoreNotebookVersion

  • sqlworkbench:ExportNotebook

2022 年 10 月 17 日

AmazonRedshiftQueryEditorV2ReadWriteSharing – 更新現有政策

為了授予使用筆記本的許可,Amazon Redshift 已新增下列動作的許可:

  • sqlworkbench:ListNotebooks

  • sqlworkbench:CreateNotebook

  • sqlworkbench:DuplicateNotebook

  • sqlworkbench:CreateNotebookFromVersion

  • sqlworkbench:ImportNotebook

  • sqlworkbench:GetNotebook

  • sqlworkbench:UpdateNotebook

  • sqlworkbench:DeleteNotebook

  • sqlworkbench:CreateNotebookCell

  • sqlworkbench:DeleteNotebookCell

  • sqlworkbench:UpdateNotebookCellContent

  • sqlworkbench:UpdateNotebookCellLayout

  • sqlworkbench:BatchGetNotebookCell

  • sqlworkbench:ListNotebookVersions

  • sqlworkbench:CreateNotebookVersion

  • sqlworkbench:GetNotebookVersion

  • sqlworkbench:DeleteNotebookVersion

  • sqlworkbench:RestoreNotebookVersion

  • sqlworkbench:ExportNotebook

2022 年 10 月 17 日

AmazonRedshiftServiceLinkedRolePolicy – 更新現有政策

Amazon Redshift 已新增命名空間 AWS/Redshift 以允許將指標發佈到 CloudWatch。

2022 年 9 月 7 日

AmazonRedshiftQueryEditorV2NoSharing – 更新現有政策

Amazon Redshift 已新增動作 sqlworkbench:ListQueryExecutionHistorysqlworkbench:GetQueryExecutionHistory 的許可。這可准許查看查詢歷史記錄。

2022 年 8 月 30 日

AmazonRedshiftQueryEditorV2ReadSharing – 更新現有政策

Amazon Redshift 已新增動作 sqlworkbench:ListQueryExecutionHistorysqlworkbench:GetQueryExecutionHistory 的許可。這可准許查看查詢歷史記錄。

2022 年 8 月 30 日

AmazonRedshiftQueryEditorV2ReadWriteSharing – 更新現有政策

Amazon Redshift 已新增動作 sqlworkbench:ListQueryExecutionHistorysqlworkbench:GetQueryExecutionHistory 的許可。這可准許查看查詢歷史記錄。

2022 年 8 月 30 日

AmazonRedshiftFullAccess – 更新現有政策

Amazon Redshift Serverless 的許可已新增至現有的 AmazonRedshiftFullAccess 受管政策。

2022 年 7 月 22 日

AmazonRedshiftDataFullAccess – 更新現有政策

Amazon Redshift 已將標籤 aws:ResourceTag/RedshiftDataFullAccess 許可的 redshift-serverless:GetCredentials 預設範圍條件從 StringEquals 更新為 StringLike,以授予標記了標籤索引鍵 RedshiftDataFullAccess 和任何標籤值之資源的存取權。 2022 年 7 月 11 日

AmazonRedshiftDataFullAccess – 更新現有政策

Amazon Redshift 已新增新的許可,以允許使用 redshift-serverless:GetCredentials 獲得 Amazon Redshift Serverless 的臨時憑證。 2022 年 7 月 8 日

AmazonRedshiftQueryEditorV2NoSharing – 更新現有政策

Amazon Redshift 已增加動作 sqlworkbench:GetAccountSettings 的許可。這可准許取得帳戶設定。

2022 年 6 月 15 日

AmazonRedshiftQueryEditorV2ReadSharing – 更新現有政策

Amazon Redshift 已增加動作 sqlworkbench:GetAccountSettings 的許可。這可准許取得帳戶設定。

2022 年 6 月 15 日

AmazonRedshiftQueryEditorV2ReadWriteSharing – 更新現有政策

Amazon Redshift 已增加動作 sqlworkbench:GetAccountSettings 的許可。這可准許取得帳戶設定。

2022 年 6 月 15 日

AmazonRedshiftServiceLinkedRolePolicy – 更新現有政策

為了能夠公開存取新的 Amazon Redshift Serverless 端點,Amazon Redshift 會將彈性 IP 地址配置並關聯到客戶帳戶中 VPC 端點的彈性網路介面。其會透過服務連結角色所提供的許可來執行此操作。為了實現這個使用案例,用來配置和釋放彈性 IP 地址的動作已新增至 Amazon Redshift Serverless 服務連結角色。

2022 年 5 月 26 日

AmazonRedshiftQueryEditorV2FullAccess – 更新現有政策

動作 sqlworkbench:ListTaggedResources 的許可。其具體的適用範圍是 Amazon Redshift 查詢編輯器 v2 資源。此政策更新提供了只能透過查詢編輯器 v2 呼叫 tag:GetResources 的權利。

2022 年 2 月 22 日

AmazonRedshiftQueryEditorV2NoSharing – 更新現有政策

動作 sqlworkbench:ListTaggedResources 的許可。其具體的適用範圍是 Amazon Redshift 查詢編輯器 v2 資源。此政策更新提供了只能透過查詢編輯器 v2 呼叫 tag:GetResources 的權利。

2022 年 2 月 22 日

AmazonRedshiftQueryEditorV2ReadSharing – 更新現有政策

動作 sqlworkbench:ListTaggedResources 的許可。其具體的適用範圍是 Amazon Redshift 查詢編輯器 v2 資源。此政策更新提供了只能透過查詢編輯器 v2 呼叫 tag:GetResources 的權利。

2022 年 2 月 22 日

AmazonRedshiftQueryEditorV2ReadWriteSharing – 更新現有政策

動作 sqlworkbench:ListTaggedResources 的許可。其具體的適用範圍是 Amazon Redshift 查詢編輯器 v2 資源。此政策更新提供了只能透過查詢編輯器 v2 呼叫 tag:GetResources 的權利。

2022 年 2 月 22 日

AmazonRedshiftQueryEditorV2ReadSharing – 更新現有政策

sqlworkbench:AssociateQueryWithTab 動作的許可已新增至受管政策。新增此項目讓客戶得以建立會連結至與其共用之查詢的編輯器標籤。

2022 年 2 月 22 日

AmazonRedshiftServiceLinkedRolePolicy – 更新現有政策

Amazon Redshift 已新增新動作的許可,以允許管理 Amazon Redshift 網路和 VPC 資源。

2021 年 11 月 22 日

AmazonRedshiftAllCommandsFullAccess – 新政策

Amazon Redshift 已新增一項新政策,以允許使用從 Amazon Redshift 主控台建立的 IAM 角色,並將其設定為叢集的預設值,以便執行 COPY (從 Amazon S3)、UNLOAD、CREATE EXTERNAL SCHEMA、CREATE EXTERNAL FUNCTION、CREATE MODEL 或 CREATE LIBRARY 命令。

2021 年 11 月 18 日

AmazonRedshiftServiceLinkedRolePolicy – 更新現有政策

Amazon Redshift 已經為新動作新增了許可,以允許管理 Amazon Redshift CloudWatch 日誌群組和日誌串流,包括稽核日誌匯出。

2021 年 11 月 15 日

AmazonRedshiftFullAccess – 更新現有政策

Amazon Redshift 已新增新的許可,以允許模型可解釋性、DynamoDB、Redshift Spectrum 和 Amazon RDS 聯合。 2021 年 10 月 7 日

AmazonRedshiftQueryEditorV2FullAccess – 新政策

Amazon Redshift 已新增一項新政策,以允許 Amazon Redshift 查詢編輯器 v2 的完整存取權。

2021 年 9 月 24 日

AmazonRedshiftQueryEditorV2NoSharing – 新政策

Amazon Redshift 已新增一項新政策,以允許在不共用資源的情況下使用 Amazon Redshift 查詢編輯器 v2。

2021 年 9 月 24 日

AmazonRedshiftQueryEditorV2ReadSharing – 新政策

Amazon Redshift 已新增一項新政策,以允許在 Amazon Redshift 查詢編輯器 v2 內進行讀取共用。

2021 年 9 月 24 日

AmazonRedshiftQueryEditorV2ReadWriteSharing – 新政策

Amazon Redshift 已新增一項新政策,以允許在 Amazon Redshift 查詢編輯器 v2 內進行讀取和更新共用。

2021 年 9 月 24 日

AmazonRedshiftFullAccess – 更新現有政策

Amazon Redshift 已新增新的許可,以允許 sagemaker:*Job*

2021 年 8 月 18 日

AmazonRedshiftDataFullAccess – 更新現有政策

Amazon Redshift 已新增新的許可,以允許 AuthorizeDataShare

2021 年 8 月 12 日

AmazonRedshiftDataFullAccess – 更新現有政策

Amazon Redshift 已新增新的許可,以允許 BatchExecuteStatement

2021 年 7 月 27 日

Amazon Redshift 已開始追蹤變更

Amazon Redshift 開始追蹤其 AWS 受管政策的變更。

2021 年 7 月 27 日

要使用 Redshift Spectrum 所需的許可

Amazon Redshift Spectrum 需要其他 AWS 服務的許可,才能存取 資源。如需有關 Redshift Spectrum IAM 政策中許可的詳細資訊,請參閱《Amazon Redshift 資料庫開發人員指南》中的 Amazon Redshift Spectrum 的 IAM 政策

要使用 Amazon Redshift 主控台所需的許可

若要讓使用者使用 Amazon Redshift 主控台,該使用者必須擁有一組最低許可,允許使用者描述其 AWS 帳戶的 Amazon Redshift 資源。這些許可也必須允許使用者描述其他相關資訊,包括 Amazon EC2 安全、Amazon CloudWatch、Amazon SNS 和網路資訊。

如果您建立比最基本必要許可更嚴格的 IAM 政策,則對於採取該 IAM 政策的使用者而言,主控台就無法如預期運作。為確保這些使用者仍可使用 Amazon Redshift 主控台,也請將 AmazonRedshiftReadOnlyAccess 受管政策附加至使用者。若要了解如何執行這項操作,請參閱 AWS Amazon Redshift 的 受管政策

如需有關向使用者提供 Amazon Redshift 主控台上查詢編輯器存取權的資訊,請參閱要使用 Amazon Redshift 主控台查詢編輯器所需的許可

對於僅呼叫 AWS CLI 或 Amazon Redshift API 的使用者,您不需要允許最低主控台許可。

要使用 Amazon Redshift 主控台查詢編輯器所需的許可

使用者若要使用 Amazon Redshift 查詢編輯器,就必須擁有一組包含 Amazon Redshift 和 Amazon Redshift 資料 API 操作的最基本許可。若要使用機密連線到資料庫,您也必須擁有 Secrets Manager 許可。

若要讓使用者存取 Amazon Redshift 主控台上的查詢編輯器,請連接 AmazonRedshiftQueryEditorAmazonRedshiftReadOnlyAccess AWS 受管政策。AmazonRedshiftQueryEditor 政策會讓使用者獲得僅擷取自己 SQL 陳述式結果的許可。也就是說,由相同 提交的陳述式aws:userid,如 AmazonRedshiftQueryEditor AWS 受管政策的本節所示。

{ "Sid":"DataAPIIAMStatementPermissionsRestriction", "Action": [ "redshift-data:GetStatementResult", "redshift-data:CancelStatement", "redshift-data:DescribeStatement", "redshift-data:ListStatements" ], "Effect": "Allow", "Resource": "*", "Condition": { "StringEquals": { "redshift-data:statement-owner-iam-userid": "${aws:userid}" } } }

若要允許使用者擷取有相同 IAM 角色之其他人的 SQL 陳述式結果,請建立您自己的政策,但不要有用來限制目前使用者存取權的條件。同時,請限制只有管理員能獲得變更政策的存取權。

要使用查詢編輯器 v2 所需的許可

若要讓使用者使用 Amazon Redshift 查詢編輯器 v2,該使用者必須擁有 Amazon Redshift、查詢編輯器 v2 操作和其他 AWS 服務的一組最低許可 AWS Key Management Service,例如 AWS Secrets Manager和標記服務。

若要讓使用者完整存取查詢編輯器 v2,請連接 AmazonRedshiftQueryEditorV2FullAccess AWS 受管政策。AmazonRedshiftQueryEditorV2FullAccess 政策會讓使用者獲得與同一團隊中的其他成員共用查詢編輯器 v2 資源 (例如查詢) 的許可。如需查詢編輯器 v2 資源存取權控制方式的詳細資訊,請參閱 IAM 主控台中查詢編輯器 v2 特定受管政策的定義。

某些 Amazon Redshift 查詢編輯器 v2 AWS 受管政策會在條件內使用 AWS 標籤來限制對 資源的存取。在查詢編輯器 v2 內,會以附加至主體 (IAM 角色) 的 IAM 政策中的標籤索引鍵和值 "aws:ResourceTag/sqlworkbench-team": "${aws:PrincipalTag/sqlworkbench-team}" 為基礎來共用查詢。相同 AWS 帳戶 中具有相同標籤值 (例如 accounting-team) 的主體,在查詢編輯器 v2 中會位於相同團隊。您一次只能與一個團隊相關聯。具有管理許可的使用者可以透過為所有團隊成員提供相同的 sqlworkbench-team 標籤值,以在 IAM 主控台中設定團隊。如果 IAM 使用者或 IAM 角色的 sqlworkbench-team 標籤值發生變更,則可能要等一段時間,共用資源才會反映此變更。如果資源 (例如查詢) 的標籤值發生變更,則一樣可能要等一段時間才會反映此變更。團隊成員還必須擁有 tag:GetResources 許可才能共用。

範例:新增 IAM 角色的 accounting-team 標籤
  1. 登入 AWS Management Console ,並在 https://console.aws.amazon.com/iam/://www. 開啟 IAM 主控台。

  2. 在主控台導覽窗格中,選擇 Roles (角色),然後選擇您要編輯的角色名稱。

  3. 選擇標籤索引標籤,然後選擇新增標籤

  4. 新增標籤索引鍵 sqlworkbench-team 和值 accounting-team

  5. 選擇儲存變更

    現在,當 IAM 主體 (附加了此 IAM 角色) 與團隊共用查詢時,具有相同 accounting-team 標籤值的其他主體都可以檢視該查詢。

如需如何將標籤附加到主體 (包括 IAM 角色和 IAM 使用者) 的相關資訊,請參閱《IAM 使用者指南》中的標記 IAM 資源

您也可以使用身分提供者 (IdP) 在工作階段層級設定團隊。這可讓使用相同 IAM 角色的多個使用者擁有不同的團隊。IAM 角色的信任政策必須允許 sts:TagSession 操作。如需詳細資訊,請參閱《IAM 使用者指南》中的新增工作階段標籤所需的許可。將主體標籤屬性新增至 IdP 提供的 SAML 聲明。

<Attribute Name="https://aws.amazon.com/SAML/Attributes/PrincipalTag:sqlworkbench-team"> <AttributeValue>accounting-team</AttributeValue> </Attribute>

遵循身分提供者 (IdP) 的指示,將來自目錄的內容填入到 SAML 屬性。如需身分提供者 (IdP) 和 Amazon Redshift 的相關資訊,請參閱《IAM 使用者指南》中的使用 IAM 身分驗證產生資料庫使用者憑證身分提供者和聯合

sqlworkbench:CreateNotebookVersion 可准許在帳戶上取得筆記本儲存格的目前內容並建立筆記本版本。這意味著,在建立版本時,筆記本的目前內容會與版本的內容相同。之後,當目前的筆記本更新時,版本中的儲存格內容會保持不變。sqlworkbench:GetNotebookVersion 可准許取得筆記本的版本。在筆記本上沒有 sqlworkbench:BatchGetNotebookCell 許可但有 sqlworkbench:CreateNotebookVersionsqlworkbench:GetNotebookVersion 許可的使用者可以存取版本中的筆記本儲存格。這位沒有 sqlworkbench:BatchGetNotebookCell 許可的使用者仍然可以透過先建立版本,然後取得所建立的這個版本,以擷取筆記本儲存格的內容。

要使用 Amazon Redshift 排程器所需的許可

使用 Amazon Redshift 排程器時,您要設定與 Amazon Redshift 排程器 (scheduler.redshift.amazonaws.com) 有信任關係的 IAM 角色,讓排程器代您取得許可。您也要將政策 (許可) 附加到您想排程之 Amazon Redshift API 操作的角色。

以下範例示範 JSON 格式的政策文件,以設定與 Amazon Redshift 排程器和 Amazon Redshift 的信任關係。

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": [ "scheduler.redshift.amazonaws.com", "redshift.amazonaws.com" ] }, "Action": "sts:AssumeRole" } ] }

如需信任實體的詳細資訊,請參閱《IAM 使用者指南》中的建立角色以將許可委派給 AWS 服務

您也必須新增要排程之 Amazon Redshift 操作的許可。

為使用 ResizeCluster 操作的排程器,在您的 IAM 政策中新增類似以下的許可。是否需要加強政策限制,視環境而定。

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "redshift:ResizeCluster", "Resource": "*" } ] }

如需為 Amazon Redshift 排程器建立角色的步驟,請參閱《IAM 使用者指南》中的為 AWS 服務建立角色 (主控台)。在 IAM 主控台中建立角色時,選擇以下項目:

  • 針對 Choose the service that will use this role (選擇將使用此角色的服務):選擇 Redshift

  • 針對 Select your use case (選取您的使用案例):選擇 Redshift - Scheduler (Redshift - 排程器)

  • 建立政策,或將政策附加到允許排程 Amazon Redshift 操作的角色。選擇 Create policy (建立政策) 或修改角色以連接政策。輸入要排程之操作的 JSON 政策。

  • 建立角色之後,編輯 IAM 角色的 Trust Relationship (信任關係) 以納入服務 redshift.amazonaws.com

您建立的 IAM 角色有信任的 scheduler.redshift.amazonaws.com.rproxy.goskope.comredshift.amazonaws.com 實體。且附加了允許受支援 Amazon Redshift API 動作的政策,例如 "redshift:ResizeCluster"

要使用 Amazon EventBridge 排程器所需的許可

使用 Amazon EventBridge 排程器時,您要設定與 EventBridge 排程器 (events.amazonaws.com) 有信任關係的 IAM 角色,讓排程器代您取得許可。您也要將政策 (許可) 附加到您想排程之 Amazon Redshift 資料 API 操作的角色,以及附加 Amazon EventBridge 操作的政策。

當您使用主控台上的 Amazon Redshift 查詢編輯器建立已排程的查詢時,您會使用 EventBridge 排程器。

您可以建立 IAM 角色,以便在 IAM 主控台上執行已排程的查詢。在此 IAM 角色中,請附加 AmazonEventBridgeFullAccessAmazonRedshiftDataFullAccess

以下範例示範 JSON 格式的政策文件,以設定與 EventBridge 排程器的信任關係。

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": [ "events.amazonaws.com", ] }, "Action": "sts:AssumeRole" } ] }

如需信任實體的詳細資訊,請參閱《IAM 使用者指南》中的建立角色以將許可委派給 AWS 服務

如需為 EventBridge 排程器建立角色的步驟,請參閱《IAM 使用者指南》中的為 AWS 服務建立角色 (主控台)。在 IAM 主控台中建立角色時,選擇以下項目:

  • 針對選擇將使用此角色的服務:選擇 CloudWatch 事件

  • 針對選取您的使用案例:選擇 CloudWatch 事件

  • 附加以下許可政策:AmazonEventBridgeFullAccessAmazonRedshiftDataFullAccess

您建立的 IAM 角色有信任的 events.amazonaws.com 實體。且附加了允許受支援 Amazon Redshift 資料 API 動作的政策,例如 "redshift-data:*"

要使用 Amazon Redshift 機器學習 (ML) 所需的許可

接下來,您可以找到要針對不同使用案例使用 Amazon Redshift 機器學習 (ML) 所需之許可的描述。

若要讓使用者將 Amazon Redshift ML 與 Amazon SageMaker AI 搭配使用,請使用比預設更嚴格的政策來建立 IAM 角色。您可以使用下列政策。您也可以修改此政策以因應您的需求。

下列政策顯示執行 SageMaker AI Autopilot 所需的許可,以及來自 Amazon Redshift 的模型可解釋性。

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "sagemaker:CreateTrainingJob", "sagemaker:CreateAutoMLJob", "sagemaker:CreateCompilationJob", "sagemaker:CreateEndpoint", "sagemaker:DescribeAutoMLJob", "sagemaker:DescribeTrainingJob", "sagemaker:DescribeCompilationJob", "sagemaker:DescribeProcessingJob", "sagemaker:DescribeTransformJob", "sagemaker:ListCandidatesForAutoMLJob", "sagemaker:StopAutoMLJob", "sagemaker:StopCompilationJob", "sagemaker:StopTrainingJob", "sagemaker:DescribeEndpoint", "sagemaker:InvokeEndpoint", "sagemaker:StopProcessingJob", "sagemaker:CreateModel", "sagemaker:CreateProcessingJob" ], "Resource": [ "arn:aws:sagemaker:*:*:model/*redshift*", "arn:aws:sagemaker:*:*:training-job/*redshift*", "arn:aws:sagemaker:*:*:automl-job/*redshift*", "arn:aws:sagemaker:*:*:compilation-job/*redshift*", "arn:aws:sagemaker:*:*:processing-job/*redshift*", "arn:aws:sagemaker:*:*:transform-job/*redshift*", "arn:aws:sagemaker:*:*:endpoint/*redshift*" ] }, { "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:DescribeLogStreams", "logs:PutLogEvents" ], "Resource": [ "arn:aws:logs:*:*:log-group:/aws/sagemaker/Endpoints/*redshift*", "arn:aws:logs:*:*:log-group:/aws/sagemaker/ProcessingJobs/*redshift*", "arn:aws:logs:*:*:log-group:/aws/sagemaker/TrainingJobs/*redshift*", "arn:aws:logs:*:*:log-group:/aws/sagemaker/TransformJobs/*redshift*" ] }, { "Effect": "Allow", "Action": [ "cloudwatch:PutMetricData" ], "Resource": "*", "Condition": { "StringEquals": { "cloudwatch:namespace": [ "SageMaker", "/aws/sagemaker/Endpoints", "/aws/sagemaker/ProcessingJobs", "/aws/sagemaker/TrainingJobs", "/aws/sagemaker/TransformJobs" ] } } }, { "Effect": "Allow", "Action": [ "ecr:BatchCheckLayerAvailability", "ecr:BatchGetImage", "ecr:GetAuthorizationToken", "ecr:GetDownloadUrlForLayer" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:GetBucketAcl", "s3:GetBucketCors", "s3:GetEncryptionConfiguration", "s3:GetBucketLocation", "s3:ListBucket", "s3:ListAllMyBuckets", "s3:ListMultipartUploadParts", "s3:ListBucketMultipartUploads", "s3:PutObject", "s3:PutBucketAcl", "s3:PutBucketCors", "s3:DeleteObject", "s3:AbortMultipartUpload", "s3:CreateBucket" ], "Resource": [ "arn:aws:s3:::redshift-downloads", "arn:aws:s3:::redshift-downloads/*", "arn:aws:s3:::*redshift*", "arn:aws:s3:::*redshift*/*" ] }, { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:GetBucketAcl", "s3:GetBucketCors", "s3:GetEncryptionConfiguration", "s3:GetBucketLocation", "s3:ListBucket", "s3:ListAllMyBuckets", "s3:ListMultipartUploadParts", "s3:ListBucketMultipartUploads", "s3:PutObject", "s3:PutBucketAcl", "s3:PutBucketCors", "s3:DeleteObject", "s3:AbortMultipartUpload", "s3:CreateBucket" ], "Resource": "*", "Condition": { "StringEqualsIgnoreCase": { "s3:ExistingObjectTag/Redshift": "true" } } }, { "Effect": "Allow", "Action": [ "iam:PassRole" ], "Resource": "arn:aws:iam::*:role/*", "Condition": { "StringEquals": { "iam:PassedToService": [ "redshift.amazonaws.com", "sagemaker.amazonaws.com" ] } } } ] }

下列政策顯示可允許存取 Amazon DynamoDB、Redshift Spectrum 和 Amazon RDS 聯合的完整最基本許可。

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "sagemaker:CreateTrainingJob", "sagemaker:CreateAutoMLJob", "sagemaker:CreateCompilationJob", "sagemaker:CreateEndpoint", "sagemaker:DescribeAutoMLJob", "sagemaker:DescribeTrainingJob", "sagemaker:DescribeCompilationJob", "sagemaker:DescribeProcessingJob", "sagemaker:DescribeTransformJob", "sagemaker:ListCandidatesForAutoMLJob", "sagemaker:StopAutoMLJob", "sagemaker:StopCompilationJob", "sagemaker:StopTrainingJob", "sagemaker:DescribeEndpoint", "sagemaker:InvokeEndpoint", "sagemaker:StopProcessingJob", "sagemaker:CreateModel", "sagemaker:CreateProcessingJob" ], "Resource": [ "arn:aws:sagemaker:*:*:model/*redshift*", "arn:aws:sagemaker:*:*:training-job/*redshift*", "arn:aws:sagemaker:*:*:automl-job/*redshift*", "arn:aws:sagemaker:*:*:compilation-job/*redshift*", "arn:aws:sagemaker:*:*:processing-job/*redshift*", "arn:aws:sagemaker:*:*:transform-job/*redshift*", "arn:aws:sagemaker:*:*:endpoint/*redshift*" ] }, { "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:DescribeLogStreams", "logs:PutLogEvents" ], "Resource": [ "arn:aws:logs:*:*:log-group:/aws/sagemaker/Endpoints/*redshift*", "arn:aws:logs:*:*:log-group:/aws/sagemaker/ProcessingJobs/*redshift*", "arn:aws:logs:*:*:log-group:/aws/sagemaker/TrainingJobs/*redshift*", "arn:aws:logs:*:*:log-group:/aws/sagemaker/TransformJobs/*redshift*" ] }, { "Effect": "Allow", "Action": [ "cloudwatch:PutMetricData" ], "Resource": "*", "Condition": { "StringEquals": { "cloudwatch:namespace": [ "SageMaker", "/aws/sagemaker/Endpoints", "/aws/sagemaker/ProcessingJobs", "/aws/sagemaker/TrainingJobs", "/aws/sagemaker/TransformJobs" ] } } }, { "Effect": "Allow", "Action": [ "ecr:BatchCheckLayerAvailability", "ecr:BatchGetImage", "ecr:GetAuthorizationToken", "ecr:GetDownloadUrlForLayer" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:GetBucketAcl", "s3:GetBucketCors", "s3:GetEncryptionConfiguration", "s3:GetBucketLocation", "s3:ListBucket", "s3:ListAllMyBuckets", "s3:ListMultipartUploadParts", "s3:ListBucketMultipartUploads", "s3:PutObject", "s3:PutBucketAcl", "s3:PutBucketCors", "s3:DeleteObject", "s3:AbortMultipartUpload", "s3:CreateBucket" ], "Resource": [ "arn:aws:s3:::redshift-downloads", "arn:aws:s3:::redshift-downloads/*", "arn:aws:s3:::*redshift*", "arn:aws:s3:::*redshift*/*" ] }, { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:GetBucketAcl", "s3:GetBucketCors", "s3:GetEncryptionConfiguration", "s3:GetBucketLocation", "s3:ListBucket", "s3:ListAllMyBuckets", "s3:ListMultipartUploadParts", "s3:ListBucketMultipartUploads", "s3:PutObject", "s3:PutBucketAcl", "s3:PutBucketCors", "s3:DeleteObject", "s3:AbortMultipartUpload", "s3:CreateBucket" ], "Resource": "*", "Condition": { "StringEqualsIgnoreCase": { "s3:ExistingObjectTag/Redshift": "true" } } }, { "Effect": "Allow", "Action": [ "dynamodb:Scan", "dynamodb:DescribeTable", "dynamodb:Getitem" ], "Resource": [ "arn:aws:dynamodb:*:*:table/*redshift*", "arn:aws:dynamodb:*:*:table/*redshift*/index/*" ] }, { "Effect": "Allow", "Action": [ "elasticmapreduce:ListInstances" ], "Resource": [ "arn:aws:elasticmapreduce:*:*:cluster/*redshift*" ] }, { "Effect": "Allow", "Action": [ "elasticmapreduce:ListInstances" ], "Resource": "*", "Condition": { "StringEqualsIgnoreCase": { "elasticmapreduce:ResourceTag/Redshift": "true" } } }, { "Effect": "Allow", "Action": [ "lambda:InvokeFunction" ], "Resource": "arn:aws:lambda:*:*:function:*redshift*" }, { "Effect": "Allow", "Action": [ "glue:CreateDatabase", "glue:DeleteDatabase", "glue:GetDatabase", "glue:GetDatabases", "glue:UpdateDatabase", "glue:CreateTable", "glue:DeleteTable", "glue:BatchDeleteTable", "glue:UpdateTable", "glue:GetTable", "glue:GetTables", "glue:BatchCreatePartition", "glue:CreatePartition", "glue:DeletePartition", "glue:BatchDeletePartition", "glue:UpdatePartition", "glue:GetPartition", "glue:GetPartitions", "glue:BatchGetPartition" ], "Resource": [ "arn:aws:glue:*:*:table/*redshift*/*", "arn:aws:glue:*:*:catalog", "arn:aws:glue:*:*:database/*redshift*" ] }, { "Effect": "Allow", "Action": [ "secretsmanager:GetResourcePolicy", "secretsmanager:GetSecretValue", "secretsmanager:DescribeSecret", "secretsmanager:ListSecretVersionIds" ], "Resource": [ "arn:aws:secretsmanager:*:*:secret:*redshift*" ] }, { "Effect": "Allow", "Action": [ "secretsmanager:GetRandomPassword", "secretsmanager:ListSecrets" ], "Resource": "*", "Condition": { "StringEquals": { "secretsmanager:ResourceTag/Redshift": "true" } } }, { "Effect": "Allow", "Action": [ "iam:PassRole" ], "Resource": "arn:aws:iam::*:role/*", "Condition": { "StringEquals": { "iam:PassedToService": [ "redshift.amazonaws.com", "glue.amazonaws.com", "sagemaker.amazonaws.com", "athena.amazonaws.com" ] } } } ] }

或者,若要使用 AWS KMS 金鑰進行加密,請將下列許可新增至政策。

{ "Effect": "Allow", "Action": [ "kms:CreateGrant", "kms:Decrypt", "kms:DescribeKey", "kms:Encrypt", "kms:GenerateDataKey*" ], "Resource": [ "arn:aws:kms:<your-region>:<your-account-id>:key/<your-kms-key>" ] }

若要允許 Amazon Redshift 和 SageMaker AI 擔任上述 IAM 角色以與其他 服務互動,請將下列信任政策新增至角色。

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": [ "redshift.amazonaws.com", "sagemaker.amazonaws.com", "forecast.amazonaws.com" ] }, "Action": "sts:AssumeRole" } ] }

在上文中,Amazon S3 儲存貯體 redshift-downloads/redshift-ml/ 是用於其他步驟和範例之範例資料的儲存所在位置。如果您不需要從 Amazon S3 載入資料,則可以移除此儲存貯體。或者,也可以將其取代為您用來將資料載入 Amazon Redshift 的其他 Amazon S3 儲存貯體。

your-account-idyour-roleyour-s3-bucket 值是您在 CREATE MODEL 命令中所指定的帳戶 ID、角色和儲存貯體。

或者,如果您指定要與 Amazon Redshift ML 搭配使用的 AWS KMS 金鑰,則可以使用範例政策的 AWS KMS 金鑰區段。your-kms-key 值是您用來作為 CREATE MODEL 命令一部分的金鑰。

當您為 hyperparameter 調校任務指定私有虛擬私有雲端 (VPC) 時,請新增下列許可。

{ "Effect": "Allow", "Action": [ "ec2:CreateNetworkInterface", "ec2:CreateNetworkInterfacePermission", "ec2:DeleteNetworkInterface", "ec2:DeleteNetworkInterfacePermission", "ec2:DescribeNetworkInterfaces", "ec2:DescribeVpcs", "ec2:DescribeDhcpOptions", "ec2:DescribeSubnets", "ec2:DescribeSecurityGroups" ] }

若要使用模型說明,請確定您具有呼叫 SageMaker AI API 操作的許可。建議您使用 AmazonSageMakerFullAccess 受管政策。如果您想要建立具有更嚴格政策的 IAM 角色,請使用以下政策。

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "sagemaker::CreateEndpoint", "sagemaker::CreateEndpointConfig", "sagemaker::DeleteEndpoint", "sagemaker::DeleteEndpointConfig", "sagemaker::DescribeEndpoint", "sagemaker::DescribeEndpointConfig", "sagemaker::DescribeModel", "sagemaker::InvokeEndpoint", "sagemaker::ListTags" ], "Resource": "*" } ] }

如需 AmazonSageMakerFullAccess受管政策的詳細資訊,請參閱《Amazon SageMaker AI 開發人員指南》中的 AmazonSageMakerFullAccessAmazon SageMaker

如果您想要建立 Forecast 模型,建議您使用 AmazonForecastFullAccess 受管政策。如果您想要使用更嚴格的政策,請新增以下政策至 IAM 角色。

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "forecast:CreateAutoPredictor", "forecast:CreateDataset", "forecast:CreateDatasetGroup", "forecast:CreateDatasetImportJob", "forecast:CreateForecast", "forecast:CreateForecastExportJob", "forecast:DeleteResourceTree", "forecast:DescribeAutoPredictor", "forecast:DescribeDataset", "forecast:DescribeDatasetGroup", "forecast:DescribeDatasetImportJob", "forecast:DescribeForecast", "forecast:DescribeForecastExportJob", "forecast:StopResource", "forecast:TagResource", "forecast:UpdateDatasetGroup" ], "Resource": "*" } ] }

如果您想要建立 Amazon Bedrock 模型,建議您使用 AmazonBedrockFullAccess受管政策。如果您想要使用更嚴格的政策,請新增以下政策至 IAM 角色。

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "bedrock:InvokeModel", "Resource": [ "*", "arn:aws:bedrock:>region<::foundation-model/*" ] } ] }

如需 Amazon Redshift ML 的詳細資訊,請參閱在 Amazon Redshift、CREATE MODEL 或 CREATE EXTERNAL MODEL 中使用機器學習https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_MODEL.html https://docs.aws.amazon.com/redshift/latest/dg/r_create_external_model.html

串流擷取的許可

串流擷取可與兩個服務搭配運作。這兩個服務是 Kinesis Data Streams 和 Amazon MSK。

要搭配 Kinesis Data Streams 使用串流擷取所需的許可

您可以在開始從 Amazon Kinesis Data Streams 擷取串流中找到包含受管政策範例的程序。

要搭配 Amazon MSK 使用串流擷取所需的許可

您可以在開始從 Amazon Managed Streaming for Apache Kafka 擷取串流中找到包含受管政策範例的程序。

要使用資料共用 API 操作所需的許可

若要控制資料共用 API 操作的存取權,請使用 IAM 動作型政策。如需有關如何管理 IAM 政策的資訊,請參閱《IAM 使用者指南》中的管理 IAM 政策

具體而言,假設生產者叢集管理員需要使用 AuthorizeDataShare 呼叫來為 AWS 帳戶外部的資料共用授權輸出。在此情況下,您需要設定 IAM 動作型政策以授予此許可。使用 DeauthorizeDataShare 呼叫以撤銷輸出。

使用 IAM 動作型政策時,您也可以在政策中指定 IAM 資源,例如 DataShareARN。以下內容會顯示 DataShareARN 的格式和範例。

arn:aws:redshift:region:account-id:datashare:namespace-guid/datashare-name arn:aws:redshift:us-east-1:555555555555:datashare:86b5169f-01dc-4a6f-9fbb-e2e24359e9a8/SalesShare

您可以在 IAM 政策中指定資料共用名稱,以限制特定資料共用的 AuthorizeDataShare 存取權。

{ "Statement": [ { "Action": [ "redshift:AuthorizeDataShare", ], "Resource": [ "arn:aws:redshift:us-east-1:555555555555:datashare:86b5169f-01dc-4a6f-9fbb-e2e24359e9a8/SalesShare" ], "Effect": "Deny" } ] }

您也可以將 IAM 政策的範圍限制在特定生產者叢集擁有的所有資料共用。若要這麼做,請使用萬用字元或星號來取代政策中的 datashare-name 值。保留叢集的 namespace-guid 值。

arn:aws:redshift:us-east-1:555555555555:datashare:86b5169f-01dc-4a6f-9fbb-e2e24359e9a8/*

以下是可防止實體呼叫特定生產者叢集所擁有資料共用上 AuthorizeDataShare 的 IAM 政策。

{ "Statement": [ { "Action": [ "redshift:AuthorizeDataShare", ], "Resource": [ "arn:aws:redshift:us-east-1:555555555555:datashare:86b5169f-01dc-4a6f-9fbb-e2e24359e9a8/*" ], "Effect": "Deny" } ] }

DataShareARN 會根據資料共用名稱和擁有端叢集命名空間的全域唯一 ID (GUID) 來限制存取權。其會透過將名稱指定為星號來進行此操作。

GetClusterCredentials 的資源政策

若要以 IAM 資料庫登入資料使用 JDBC 或 ODBC 連線來連線至叢集資料庫,或是以程式設計方式呼叫 GetClusterCredentials 動作,您需要基本的一組許可。您至少需要呼叫 redshift:GetClusterCredentials 動作的許可,該動作具有 dbuser 資源的存取權。

如果您使用 JDBC 或 ODBC 連線,而不是 serverport,您可以指定 cluster_idregion,但要這麼做,您的政策必須允許具有 redshift:DescribeClusters 資源存取的 cluster 動作。

如果您使用選用參數 AutocreateDbGroupsDbName 來呼叫 GetClusterCredentials,請務必也允許動作並允許下表所列資源的存取權。

GetClusterCredentials 參數

動作

資源

Autocreate

redshift:CreateClusterUser

dbuser

DbGroups

redshift:JoinGroup

dbgroup

DbName

NA dbname

如需資源的相關資訊,請參閱Amazon Redshift 資源和操作

您也可以在政策包含下列條件:

  • redshift:DurationSeconds

  • redshift:DbName

  • redshift:DbUser

如需條件的相關資訊,請參閱在政策中指定條件

客戶受管政策範例

在本節中,您可以找到授予各種 Amazon Redshift 動作之許可的使用者政策範例。當您使用 Amazon Redshift API、 AWS SDKs或 時,這些政策即可運作 AWS CLI。

注意

所有範例皆使用美國西部 (奧勒岡) 區域 (us-west-2) 及虛構帳戶 ID。

範例 1:允許使用者對所有 Amazon Redshift 動作和資源的完整存取權

下列政策允許存取處理所有資源的所有 Amazon Redshift 動作。

{ "Version": "2012-10-17", "Statement": [ { "Sid":"AllowRedshift", "Action": [ "redshift:*" ], "Effect": "Allow", "Resource": "*" } ] }

Action 元素中的值 redshift:* 指出 Amazon Redshift 中的所有動作。

範例 2:拒絕使用者存取一組 Amazon Redshift 動作

預設會拒絕所有的許可。不過,有時您必須明確拒絕對特定動作或動作集的存取權。下列政策允許對所有 Amazon Redshift 動作的存取權,並明確拒絕對名稱開頭為 Delete 之任何 Amazon Redshift 動作的存取權。此政策適用於 us-west-2 中的所有 Amazon Redshift 資源。

{ "Version": "2012-10-17", "Statement": [ { "Sid":"AllowUSWest2Region", "Action": [ "redshift:*" ], "Effect": "Allow", "Resource": "arn:aws:redshift:us-west-2:*" }, { "Sid":"DenyDeleteUSWest2Region", "Action": [ "redshift:Delete*" ], "Effect": "Deny", "Resource": "arn:aws:redshift:us-west-2:*" } ] }

範例 3:允許使用者管理叢集

下列政策允許使用者建立、刪除、修改所有叢集和將它們重新開機,然後拒絕刪除叢集名稱開頭為 protected 之任何叢集的許可。

{ "Version": "2012-10-17", "Statement": [ { "Sid":"AllowClusterManagement", "Action": [ "redshift:CreateCluster", "redshift:DeleteCluster", "redshift:ModifyCluster", "redshift:RebootCluster" ], "Resource": [ "*" ], "Effect": "Allow" }, { "Sid":"DenyDeleteProtected", "Action": [ "redshift:DeleteCluster" ], "Resource": [ "arn:aws:redshift:us-west-2:123456789012:cluster:protected*" ], "Effect": "Deny" } ] }

範例 4:允許使用者授權和撤銷快照存取

下列政策允許使用者 (例如使用者 A) 來執行下列動作:

  • 授予對透過名為 shared 之叢集建立的任何快照的存取權。

  • 撤銷對透過 shared 叢集建立、快照名稱開頭為 revokable 之任何快照的快照存取權。

{ "Version": "2012-10-17", "Statement": [ { "Sid":"AllowSharedSnapshots", "Action": [ "redshift:AuthorizeSnapshotAccess" ], "Resource": [ "arn:aws:redshift:us-west-2:123456789012:shared/*" ], "Effect": "Allow" }, { "Sid":"AllowRevokableSnapshot", "Action": [ "redshift:RevokeSnapshotAccess" ], "Resource": [ "arn:aws:redshift:us-west-2:123456789012:snapshot:*/revokable*" ], "Effect": "Allow" } ] }

如果使用者 A 已允許使用者 B 存取快照,使用者 B 必須具備以下這類的政策以允許使用者 B 從快照還原叢集。下列政策允許使用者 B 從快照描述和還原,以及建立叢集。這些叢集名稱的開頭必須是 from-other-account

{ "Version": "2012-10-17", "Statement": [ { "Sid":"AllowDescribeSnapshots", "Action": [ "redshift:DescribeClusterSnapshots" ], "Resource": [ "*" ], "Effect": "Allow" }, { "Sid":"AllowUserRestoreFromSnapshot", "Action": [ "redshift:RestoreFromClusterSnapshot" ], "Resource": [ "arn:aws:redshift:us-west-2:123456789012:snapshot:*/*", "arn:aws:redshift:us-west-2:444455556666:cluster:from-other-account*" ], "Effect": "Allow" } ] }

範例 5:允許使用者複製叢集快照和從快照還原叢集

下列政策允許使用者複製透過名為 big-cluster-1 之叢集建立的任何快照,以及還原快照名稱開頭為 snapshot-for-restore 的任何快照。

{ "Version": "2012-10-17", "Statement": [ { "Sid":"AllowCopyClusterSnapshot", "Action": [ "redshift:CopyClusterSnapshot" ], "Resource": [ "arn:aws:redshift:us-west-2:123456789012:snapshot:big-cluster-1/*" ], "Effect": "Allow" }, { "Sid":"AllowRestoreFromClusterSnapshot", "Action": [ "redshift:RestoreFromClusterSnapshot" ], "Resource": [ "arn:aws:redshift:us-west-2:123456789012:snapshot:*/snapshot-for-restore*", "arn:aws:redshift:us-west-2:123456789012:cluster:*" ], "Effect": "Allow" } ] }

以下範例政策可讓您存取 Amazon Redshift、Amazon Simple Notification Service (Amazon SNS) 和 Amazon CloudWatch 的所有動作和資源。它也會允許在該帳戶下於所有相關 Amazon EC2 資源上的指定動作。

注意

此範例政策中指定的 Amazon EC2 動作不支援資源層級許可。

{ "Version": "2012-10-17", "Statement": [ { "Sid":"AllowRedshift", "Effect": "Allow", "Action": [ "redshift:*" ], "Resource": [ "*" ] }, { "Sid":"AllowSNS", "Effect": "Allow", "Action": [ "sns:*" ], "Resource": [ "*" ] }, { "Sid":"AllowCloudWatch", "Effect": "Allow", "Action": [ "cloudwatch:*" ], "Resource": [ "*" ] }, { "Sid":"AllowEC2Actions", "Effect": "Allow", "Action": [ "ec2:AllocateAddress", "ec2:AssociateAddress", "ec2:AttachNetworkInterface", "ec2:DescribeAccountAttributes", "ec2:DescribeAddresses", "ec2:DescribeAvailabilityZones", "ec2:DescribeInternetGateways", "ec2:DescribeSecurityGroups", "ec2:DescribeSubnets", "ec2:DescribeVpcs" ], "Resource": [ "*" ] } ] }

範例 7:允許使用者使用 Amazon Redshift 主控台標記資源

以下範例政策可讓使用者使用 AWS Resource Groups透過 Amazon Redshift 主控台標記資源。此政策可附加至會叫用新的或原始 Amazon Redshift 主控台的使用者角色。如需標記的相關資訊,請參閱在 Amazon Redshift 中標記資源

{ "Version": "2012-10-17", "Statement": [ { "Sid":"Tagging permissions", "Effect": "Allow", "Action": [ "redshift:DeleteTags", "redshift:CreateTags", "redshift:DescribeTags", "tag:UntagResources", "tag:TagResources" ], "Resource": "*" } ] }

使用 GetClusterCredentials 的範例政策

以下範例政策使用這些範例參數值:

  • 區域: us-west-2

  • AWS 帳戶: 123456789012

  • 叢集名稱: examplecluster

以下策略启用 GetCredentialsCreateClusterUserJoinGroup 操作。政策使用條件索引鍵,只在 AWS 使用者 ID 符合 時,才允許 GetClusterCredentialsCreateClusterUser動作"AIDIODR4TAW7CSEXAMPLE:${redshift:DbUser}@yourdomain.com"。僅會對 "testdb" 資料庫請求 IAM 存取權。此政策也允許使用者加入名為 "common_group" 的群組。

{ "Version": "2012-10-17", "Statement": [ { "Sid":"GetClusterCredsStatement", "Effect": "Allow", "Action": [ "redshift:GetClusterCredentials" ], "Resource": [ "arn:aws:redshift:us-west-2:123456789012:dbuser:examplecluster/${redshift:DbUser}", "arn:aws:redshift:us-west-2:123456789012:dbname:examplecluster/testdb", "arn:aws:redshift:us-west-2:123456789012:dbgroup:examplecluster/common_group" ], "Condition": { "StringEquals": { "aws:userid":"AIDIODR4TAW7CSEXAMPLE:${redshift:DbUser}@yourdomain.com" } } }, { "Sid":"CreateClusterUserStatement", "Effect": "Allow", "Action": [ "redshift:CreateClusterUser" ], "Resource": [ "arn:aws:redshift:us-west-2:123456789012:dbuser:examplecluster/${redshift:DbUser}" ], "Condition": { "StringEquals": { "aws:userid":"AIDIODR4TAW7CSEXAMPLE:${redshift:DbUser}@yourdomain.com" } } }, { "Sid":"RedshiftJoinGroupStatement", "Effect": "Allow", "Action": [ "redshift:JoinGroup" ], "Resource": [ "arn:aws:redshift:us-west-2:123456789012:dbgroup:examplecluster/common_group" ] } ] }
隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。