跳至內容

Is ECR cross-account access allowed in GovCloud?

1

Does anyone know if ECR cross-account access is allowed in GovCloud? The Lambda doc (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-lambda.html) states it's not possible, but the ECR doc (https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-ecs.html) doesn't mention it either way. I know we recently launched cross-account/region support for ECR replication in GovCloud, but not sure about cross-account access for image sharing

已提問 4 個月前檢視次數 76 次
2 個答案
6
已接受的答案

Yes but you need to watch out for:

  • Repository policies must be explicit: You’ll need to enumerate account IDs in your ECR repository policy to grant access.
  • Lambda service principal quirks: Lambda accesses ECR as a service principal, so aws:PrincipalOrgID conditions won’t work — you’ll need to use aws:sourceArn and service-specific conditions.
  • GovCloud limitations: Public registries and pull-through cache rules are not supported in GovCloud.
專家
已回答 4 個月前
1
  • ECR repositories in GovCloud support resource-based policies, so you can share images across GovCloud accounts.
  • However, Lambda in GovCloud does NOT support pulling images cross-account, even if ECR allows it.
  • For cross-account usage, you’d either: replicate images to the other account’s ECR repo, or use ECS or other services that support pulling images cross-account (and have correct IAM permissions).
已回答 4 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。