使用 Amazon Keyspaces 應用程式的角色 auto 擴展 - Amazon Keyspaces (適用於 Apache Cassandra)

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

使用 Amazon Keyspaces 應用程式的角色 auto 擴展

Amazon Keyspaces(對於阿帕奇卡桑德拉)使用AWS Identity and Access Management(IAM)服務鏈接的角色。服務連結角色是直接連結至 Amazon Keyspaces 的唯一 IAM 角色類型。服務連結角色由 Amazon Keyspaces space 預先定義,並包含服務代表您呼叫其他AWS服務所需的所有許可。

服務連結角色可讓您更輕鬆地設定 Amazon Keyspaces,因為您不必手動新增必要的許可。Amazon Keyspaces 會定義其服務連結角色的許可,除非另有定義,否則只有 Amazon Keyspaces 可以擔任其角色。定義的許可包括信任政策和許可政策,且該許可政策無法附加至其他 IAM 實體。

您必須先刪除角色的相關資源,才能刪除服務連結角色。這樣可以保護您的 Amazon Keyspaces 資源,因為您無法意外移除存取資源的權限。

如需關於支援服務連結角色的其他服務資訊,請參閱《可搭配 IAM 運作的 AWS 服務》,尋找服務連結角色欄中顯示為是的服務。選擇具有連結的,以檢視該服務的服務連結角色文件。

Amazon Keyspaces 的服務連結角色許可

Amazon Keyspaces 使用名為AWSServiceRoleForApplicationAutoScaling_CassandraTable的服務連結角色,允許 Application Auto Scaling 代表您呼叫 Amazon Keyspaces 和 Amazon CloudWatch 。

服 AWSServiceRoleForApplicationAutoScaling_CassandraTable 務連結角色會信任下列服務擔任該角色:

  • cassandra.application-autoscaling.amazonaws.com

角色許可政策允許應用程式自動擴展在指定的 Amazon Keyspaces 資源上完成下列動作:

  • 動作:arn:*:cassandra:*:*:/keyspace/system/table/* 上的 cassandra:Select

  • 動作:對資源 arn:*:cassandra:*:*:/keyspace/system_schema/table/* 執行 cassandra:Select

  • 動作:對資源 arn:*:cassandra:*:*:/keyspace/system_schema_mcs/table/* 執行 cassandra:Select

  • 動作:對資源 arn:*:cassandra:*:*:"*" 執行 cassandra:Alter

為 Amazon Keyspaces 創建服務鏈接角色

您不需要為 Amazon Keyspaces 自動擴展手動建立服務連結角色。當您使用AWS Management Console、CQL、或 AWS API 在表格上啟用 Amazon Keyspaces auto 動擴展時,應用程式自動擴展會為您建立服務連結角色。AWS CLI

若您刪除此服務連結角色然後需要再次建立,便可在帳戶中使用相同程序重新建立角色。當您為表格啟用 Amazon Keyspaces auto 擴展時,Application Auto Scaling 會再次為您建立服務連結角色。

重要

此服務連結角色可以顯示在您的帳戶,如果您於其他服務中完成一項動作時,可以使用支援此角色的功能。若要進一步了解,請參閱在我的 AWS 帳戶 中顯示新角色

若您刪除此服務連結角色然後需要再次建立,便可在帳戶中使用相同程序重新建立角色。當您為表格啟用 Amazon Keyspaces 自動應用程式擴展時,Application Auto Scaling 會再次為您建立服務連結角色。

編輯 Amazon Keyspaces 的服務連結角色

Amazon Keyspaces 不允許您編輯 AWSServiceRoleForApplicationAutoScaling_CassandraTable 服務連結角色。因為有各種實體可能會參考服務連結角色,所以您無法在建立角色之後變更角色名稱。然而,您可使用 IAM 來編輯角色描述。如需詳細資訊,請參閱 IAM 使用者指南中的編輯服務連結角色

刪除 Amazon Keyspaces 的服務鏈接角色

若您不再使用需要服務連結角色的功能或服務,我們建議您刪除該角色。如此一來,您就沒有未主動監控或維護的未使用實體。不過,您必須先停用帳戶中所有資料表的自動調整功能,AWS 區域才能手動刪除服務連結角色。若要停用 Amazon Keyspaces 表格上的自動擴展功能,請參閱修改或停用 Amazon Keyspaces 自動擴展設定。

注意

如果您嘗試修改資源時,Amazon Keyspaces 自動擴展正在使用該角色,則取消註冊可能會失敗。若此情況發生,請等待數分鐘後並再次嘗試操作。

使用 IAM 手動刪除服務連結角色

使用 IAM 主控台或 AWS API 刪除 AWSServiceRoleForApplicationAutoScaling_CassandraTable 服務連結角色。AWS CLI如需詳細資訊,請參閱《IAM 使用者指南》中的刪除服務連結角色

注意

若要刪除 Amazon Keyspaces 自動擴展所使用的服務連結角色,您必須先停用帳戶中所有表格的自動擴展功能。

支援 Amazon Keyspaces 服務連結角色的區域

Amazon Keyspaces 支援在所有提供服務的區域中使用服務連結角色。如需詳細資訊,請參閱 Amazon Keyspaces 的服務端點