選取您的 Cookie 偏好設定

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

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

為您的知識庫設定安全組態

焦點模式
為您的知識庫設定安全組態 - Amazon Bedrock

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

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

建立知識庫之後,您可能需要設定下列安全組態:

為您的知識庫設定資料存取政策

如果您使用自訂角色,請為新建立的知識庫設定安全組態。如果您讓 Amazon Bedrock 為您建立服務角色,您可以略過此步驟。依照您設定之資料庫對應索引標籤中的步驟進行。

Amazon OpenSearch Serverless

若要將 Amazon OpenSearch Serverless 集合的存取限制為知識庫服務角色,請建立資料存取政策。您可以透過下列方式執行此操作:

使用以下資料存取政策,指定 Amazon OpenSearch Serverless 集合和您的服務角色:

[ { "Description": "${data access policy description}", "Rules": [ { "Resource": [ "index/${collection_name}/*" ], "Permission": [ "aoss:DescribeIndex", "aoss:ReadDocument", "aoss:WriteDocument" ], "ResourceType": "index" } ], "Principal": [ "arn:aws:iam::${account-id}:role/${kb-service-role}" ] } ]
Pinecone, Redis Enterprise Cloud or MongoDB Atlas

若要整合 Pinecone、Redis Enterprise Cloud、MongoDB Atlas 向量索引,請將下列身分型政策連接至您的知識庫服務角色,以允許它存取向量索引的 AWS Secrets Manager 秘密。

{ "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": [ "bedrock:AssociateThirdPartyKnowledgeBase" ], "Resource": "*", "Condition": { "StringEquals": { "bedrock:ThirdPartyKnowledgeBaseCredentialsSecretArn": "arn:aws:iam::${region}:${account-id}:secret:${secret-id}" } } }] }

若要將 Amazon OpenSearch Serverless 集合的存取限制為知識庫服務角色,請建立資料存取政策。您可以透過下列方式執行此操作:

使用以下資料存取政策,指定 Amazon OpenSearch Serverless 集合和您的服務角色:

[ { "Description": "${data access policy description}", "Rules": [ { "Resource": [ "index/${collection_name}/*" ], "Permission": [ "aoss:DescribeIndex", "aoss:ReadDocument", "aoss:WriteDocument" ], "ResourceType": "index" } ], "Principal": [ "arn:aws:iam::${account-id}:role/${kb-service-role}" ] } ]

為您的 Amazon OpenSearch Serverless 知識庫設定網路存取政策

如果您針對知識庫使用私有 Amazon OpenSearch Serverless 集合,則只能透過 AWS PrivateLink VPC 端點存取。您可以在設定 Amazon OpenSearch Serverless 向量集合時建立私有 Amazon OpenSearch Serverless 集合,也可以在設定其網路存取政策時,將現有的 Amazon OpenSearch Serverless 集合 (包括 Amazon Bedrock 主控台為您建立的集合) 設為私有。 OpenSearch

Amazon OpenSearch Service 開發人員指南中的下列資源可協助您了解私有 Amazon OpenSearch Serverless 集合所需的設定:

若要允許 Amazon Bedrock 知識庫存取私有 Amazon OpenSearch Serverless 集合,您必須編輯 Amazon OpenSearch Serverless 集合的網路存取政策,以允許 Amazon Bedrock 做為來源服務。選擇您偏好方法的索引標籤,然後遵循下列步驟:

Console
  1. https://console.aws.amazon.com/aos/:// 開啟 Amazon OpenSearch Service 主控台。

  2. 從左側導覽窗格中,選取集合。然後選擇您的集合。

  3. 網路區段中,選取關聯政策

  4. 選擇編輯

  5. 對於選取政策定義方法,執行下列其中一項:

    • Select 政策定義方法保留為視覺化編輯器,並在規則 1 區段中設定下列設定:

      1. (選用) 在規則名稱欄位中,輸入網路存取規則的名稱。

      2. 存取集合來源下,選取私有 (建議)

      3. 選取AWS 服務私有存取。在文字方塊中,輸入 bedrock.amazonaws.com

      4. 取消選取啟用 OpenSearch Dashboards 的存取。

    • 選擇 JSON,並在 JSON 編輯器中貼上下列政策。

      [ { "AllowFromPublic": false, "Description":"${network access policy description}", "Rules":[ { "ResourceType": "collection", "Resource":[ "collection/${collection-id}" ] } ], "SourceServices":[ "bedrock.amazonaws.com" ] } ]
  6. 選擇更新

API

若要編輯 Amazon OpenSearch Serverless 集合的網路存取政策,請執行下列動作:

  1. 使用 OpenSearch Serverless 端點傳送 GetSecurityPolicy 請求。指定政策name的 ,並將 指定typenetwork。記下回應中的 policyVersion

  2. 使用 OpenSearch Serverless 端點傳送 UpdateSecurityPolicy 請求。至少,請指定下列欄位:

    欄位 描述
    name 政策的名稱
    policyVersion GetSecurityPolicy回應policyVersion傳回給您的 。
    type 安全政策的類型。指定 network
    政策 要使用的政策。指定下列 JSON 物件
    [ { "AllowFromPublic": false, "Description":"${network access policy description}", "Rules":[ { "ResourceType": "collection", "Resource":[ "collection/${collection-id}" ] } ], "SourceServices":[ "bedrock.amazonaws.com" ] } ]

如需 AWS CLI 範例,請參閱建立資料存取政策 (AWS CLI)

  1. https://console.aws.amazon.com/aos/:// 開啟 Amazon OpenSearch Service 主控台。

  2. 從左側導覽窗格中,選取集合。然後選擇您的集合。

  3. 網路區段中,選取關聯政策

  4. 選擇編輯

  5. 對於選取政策定義方法,執行下列其中一項:

    • Select 政策定義方法保留為視覺化編輯器,並在規則 1 區段中設定下列設定:

      1. (選用) 在規則名稱欄位中,輸入網路存取規則的名稱。

      2. 存取集合來源下,選取私有 (建議)

      3. 選取AWS 服務私有存取。在文字方塊中,輸入 bedrock.amazonaws.com

      4. 取消選取啟用 OpenSearch Dashboards 的存取。

    • 選擇 JSON,並在 JSON 編輯器中貼上下列政策。

      [ { "AllowFromPublic": false, "Description":"${network access policy description}", "Rules":[ { "ResourceType": "collection", "Resource":[ "collection/${collection-id}" ] } ], "SourceServices":[ "bedrock.amazonaws.com" ] } ]
  6. 選擇更新

  • 請依照建立網路政策 (主控台) 中的步驟使用 Amazon OpenSearch Service 主控台。請不要建立網路政策,而是在集合詳細資訊的網路子區段中記下關聯的政策

隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。