Docker ECR not authorized

๋ฌธ์ œ์ 

ํ•ด๋‹น ์œ ์ €์—๊ฒŒ ๊ถŒํ•œ์ด ๋ถ€์—ฌ๋˜์ง€ ์•Š์•„ CLI์ƒ์—์„œ ECR ์‚ฌ์šฉ ๋ถˆ๊ฐ€๋Šฅํ•˜์—ฌ ์—๋Ÿฌ ๋ฉ”์„ธ์ง€ ์ถœ๋ ฅ

Error: User: {user} is not authorized to perform: ecr:DescribeRepositories on resource: {resource_path} because no identity-based policy allows the ecr:DescribeRepositories action

์†”๋ฃจ์…˜

IAM > ์‚ฌ์šฉ์ž > ์ •์ฑ… ์ƒ์„ฑ

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "ListImagesInRepository",
            "Effect": "Allow",
            "Action": [
                "ecr:ListImages"
            ],
            "Resource": {resource_path}
        },
        {
            "Sid": "GetAuthorizationToken",
            "Effect": "Allow",
            "Action": [
                "ecr:GetAuthorizationToken"
            ],
            "Resource": "*"
        },
        {
            "Sid": "ManageRepositoryContents",
            "Effect": "Allow",
            "Action": [
                "ecr:GetAuthorizationToken",
                "ecr:BatchCheckLayerAvailability",
                "ecr:GetDownloadUrlForLayer",
                "ecr:GetRepositoryPolicy",
                "ecr:DescribeRepositories",
                "ecr:ListImages",
                "ecr:DescribeImages",
                "ecr:BatchGetImage",
                "ecr:InitiateLayerUpload",
                "ecr:UploadLayerPart",
                "ecr:CompleteLayerUpload",
                "ecr:PutImage",
                "ecr:CreateRepository"
            ],
            "Resource": {resource_path}
        }
    ]
}

Last updated