將 ECR 映像提取至您的 AWS 帳戶
Athena Federation Connector Lambda 函式會使用存放在 Athena 受管 Amazon ECR 儲存庫中的容器映像。若要在這些容器映像上執行安全掃描,您必須先將其複製到帳戶中的 Amazon ECR 儲存庫。本節提供如何將映像複製到您的儲存庫,並設定 Lambda 函式以使用映像的逐步說明。
必要條件
-
Athena Federation Connector – 該連接器可以透過任何來源建立,前提是其使用了容器映像。
注意
若要驗證映像部署,請檢查 Athena Federation Connector Lambda 中的映像索引標籤
-
Docker 已安裝且在執行中
-
AWS CLI 已安裝
-
具有適當提取許可的帳戶憑證
如何傳輸映像
-
從 Athena Federation Connector Lambda 找到映像 URI
account_id_1.dkr.ecr.us-east-1.amazonaws.com/athena-federation-repository:2025.15.1 -
為 Athena 受管帳戶產生 Docker 身分驗證權杖:
aws ecr get-login-password --regionregionID| docker login --username AWS --password-stdinathena-managed-registry其中:
-
regionID是您的部署區域 (例如 us-east-1) -
athena-managed-registry是映像 URI 的登錄檔部分 (例如 account_id_1.dkr.ecr.us-east-1.amazonaws.com)
-
-
從 Athena 受管帳戶提取映像:
docker pullathenaImageURI -
向您的登錄檔驗證 Docker:
aws ecr get-login-password --regionregionID| docker login --username AWS --password-stdincustomer-registry其中
customer-registry是您的 ECR 登錄檔 (例如 account_id_2.dkr.ecr.us-east-1.amazonaws.com) -
為您的儲存庫標記提取的映像:
docker tagathenaImageURIyourImageURI -
將映像推送到您的儲存庫:
docker pushyourImageURI -
更新您的 Athena Federation Connector:
-
導覽至您的 Lambda 函式
-
選取部署新映像
-
輸入您的新映像 URI
Athena 聯合連接器映像現在位於您的帳戶中,可讓您在映像上執行 CVE 掃描。
-