Amazon ECR 다른 AWS 계정에서 사용하는 법

2023. 10. 30. 13:43Dev/EKS

728x90

 

Amazon ECR - 권한 - 정책 JSON 편집

ECR 이미지 -> Repositories -> Permissions -> Edit policy JSON

 

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowPushPull",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::account-id:root"
      },
      "Action": [
        "ecr:GetDownloadUrlForLayer",
        "ecr:BatchGetImage",
        "ecr:BatchCheckLayerAvailability",
        "ecr:PutImage",
        "ecr:InitiateLayerUpload",
        "ecr:UploadLayerPart",
        "ecr:CompleteLayerUpload"
      ]
    }
  ]
}

account-id를 ECR을 사용할 계정의 id로 교체

 

728x90