Amazon Redshift 自 2025 年 11 月 1 日起不再支援建立新的 Python UDF。如果您想要使用 Python UDF,請在該日期之前建立 UDF。現有 Python UDF 將繼續正常運作。如需詳細資訊,請參閱部落格文章
對 Amazon Redshift 查詢編輯器 v2 的連線進行故障診斷
此清單詳細說明經常發生的錯誤,並可協助您使用 AWS IAM Identity Center 身分透過查詢編輯器 v2 連線至 Redshift 資料庫。
-
錯誤:Connection Issue: No Identity center session information available. (連線問題:沒有可用的 Identity Center 工作階段資訊。) - 當此錯誤發生時,請檢查您瀏覽器的安全和隱私權設定。這些瀏覽器設定,特別是針對安全 Cookie 的設定 (例如 Firefox 的 Total Cookie Protection 功能),可能會導致 Amazon Redshift 查詢編輯器 v2 對 Redshift 資料庫的連線嘗試遭到封鎖。請依照您瀏覽器的詳細修復步驟進行:
-
Firefox - 目前預設為封鎖第三方 Cookie。按一下瀏覽器網址列中的盾牌圖示,並將切換開關切換至關閉,以關閉查詢編輯器 v2 的增強型追蹤保護。
-
Chrome incognito 模式 - 根據預設,Chrome Incognito 模式會封鎖第三方 Cookie。按一下網址列中的眼睛圖示,允許查詢編輯器 v2 使用第三方 Cookie。您變更設定以允許 Cookie 之後,網址列上可能不會顯示眼睛圖示。
-
Safari - 在 Mac 上,開啟 Safari app。選擇設定,然後選擇進階。切換至關閉:封鎖所有 Cookie。
-
Edge - 選擇設定,然後選擇 Cookie 和網站許可。然後選取管理和刪除 Cookie 和網站資料,然後關閉封鎖第三方 Cookie。
如果您在變更設定後嘗試連線,但繼續收到錯誤訊息 Connection Issue: No Identity center session information available (連線問題:沒有可用的 Identity Center 工作階段資訊),建議您重新整理與 AWS IAM Identity Center 的連線。若要這樣做,請在 Redshift 資料庫執行個體上按一下滑鼠右鍵,然後選擇重新整理。新視窗隨即出現,您可以用來進行身分驗證。
-
-
錯誤:Connection issue: Identity center session expired or invalid. (連線問題:Identity Center 工作階段已過期或無效。) - 將 Redshift 佈建叢集或 Serverless 工作群組與 AWS IAM Identity Center 整合之後,當使用者嘗試從查詢編輯器 v2 連線至 Redshift 資料庫時,可能會收到此錯誤。成功連線後也可能發生此錯誤。在這種情況下,我們建議您重新驗證身分。若要這樣做,請在 Redshift 資料庫執行個體上按一下滑鼠右鍵,然後選擇重新整理。新視窗隨即出現,您可以用來進行身分驗證。
-
錯誤:Invalid scope. (無效的範圍。) User credentials are not authorized to connect to Redshift. (使用者憑證未經授權無法連線至 Redshift。) - 將 Redshift 佈建叢集或 Serverless 工作群組與 AWS IAM Identity Center 整合以進行身分管理之後,當使用者嘗試從查詢編輯器 v2 連線至 Redshift 資料庫時,可能會收到此錯誤。在此情況下,管理員必須透過 Redshift 主控台將使用者指派至 Redshift AWS IAM Identity Center 應用程式,查詢編輯器 v2 才能透過 AWS IAM Identity Center 成功連線並驗證使用者身分,以存取正確的資源。此操作會在 IAM Identity Center 連線下完成。在此之後,使用者可於一小時後建立成功的連線,這是 AWS IAM Identity Center 工作階段快取的限制。
-
錯誤:Databases couldn't be listed. (無法列出資料庫。) FATAL: Failed query when cluster is auto paused. (嚴重:叢集自動暫停時查詢失敗。) - 當 Amazon Redshift Serverless 資料庫處於閒置狀態,而未處理任何工作負載時,該資料庫可能在您連線 AWS IAM Identity Center 身分時仍為暫停狀態。若要修正此問題,請使用另一種身分驗證方法登入,以繼續執行無伺服器工作群組。然後使用您的 AWS IAM Identity Center 身分連線至資料庫。
-
錯誤:An error occurred during the attempt to federate with AWS IAM Identity Center. (嘗試與 AWS IAM Identity Center 聯合時發生錯誤。) An Amazon Redshift administrator must delete and recreate the AWS IAM Identity Center QEV2 application, using the Redshift console. (Amazon Redshift 管理員必須使用 Redshift 主控台刪除並重新建立 AWS IAM Identity Center QEV2 應用程式。) - 此錯誤通常是在刪除了與查詢編輯器 v2 相關聯的 AWS IAM Identity Center 應用程式執行個體時發生。若要修正此問題,Amazon Redshift 管理員必須刪除並重新建立 AWS IAM Identity Center 的 Redshift 和查詢編輯器 v2 應用程式。此操作可以在 Redshift 主控台上或使用 https://docs.aws.amazon.com/cli/latest/reference/redshift/delete-redshift-idc-application.html CLI 命令執行。