本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
在 ElastiCache Valkey 或 Redis OSS 快取上停用存取控制
請依照下列指示,停用啟用 Valkey 或 Redis OSS TLS 快取的存取控制。您的快取將有兩種不同類型的組態:AUTH 預設使用者存取或使用者群組存取控制清單 (RBAC)。如果您的快取是使用 AUTH 組態所建立,則必須先將它變更為 RBAC 組態,才能藉由移除使用者群組來停用快取。如果您的快取是使用 RBAC 組態所建立,則可以直接將它停用。
停用使用 RBAC 設定的 Valkey 或 Redis OSS 無伺服器快取
-
移除使用者群組以停用存取控制。
aws elasticache modify-serverless-cache --serverless-cache-name <serverless-cache> --remove-user-group
-
(選用) 確認沒有與無伺服器快取相關聯的使用者群組。
aws elasticache describe-serverless-caches --serverless-cache-name <serverless-cache> { "..." "UserGroupId": "" "..." }
使用 AUTH 字符設定 來停用 Valkey 或 Redis OSS 快取
-
將 AUTH 字符變更為 RBAC 並指定要新增的使用者群組。
aws elasticache modify-replication-group --replication-group-id <replication-group-id-value> --auth-token-update-strategy DELETE --user-group-ids-to-add <user-group-value>
-
確認 AUTH 字符已停用且使用者群組已新增。
aws elasticache describe-replication-groups --replication-group-id <replication-group-id-value> { "..." "AuthTokenEnabled": false, "UserGroupIds": [ "<user-group-value>" ] "..." }
-
移除使用者群組以停用存取控制。
aws elasticache modify-replication-group --replication-group-id <replication-group-value> --user-group-ids-to-remove <user-group-value> { "..." "PendingModifiedValues": { "UserGroups": { "UserGroupIdsToAdd": [], "UserGroupIdsToRemove": [ "<user-group-value>" ] } "..." }
-
(選用) 確認沒有與叢集相關聯的使用者群組。
AuthTokenEnabled
欄位也應顯示 false。aws elasticache describe-replication-groups --replication-group-id <replication-group-value> "AuthTokenEnabled": false
停用使用 RBAC 設定的 Valkey 或 Redis OSS 叢集
-
移除使用者群組以停用存取控制。
aws elasticache modify-replication-group --replication-group-id <replication-group-value> --user-group-ids-to-remove <user-group-value> { "..." "PendingModifiedValues": { "UserGroups": { "UserGroupIdsToAdd": [], "UserGroupIdsToRemove": [ "<user-group-value>" ] } "..." }
-
(選用) 確認沒有與叢集相關聯的使用者群組。
AuthTokenEnabled
欄位也應顯示 false。aws elasticache describe-replication-groups --replication-group-id <replication-group-value> "AuthTokenEnabled": false