2 個答案
- 最新
- 最多得票
- 最多評論
0
Hello
Verify that you have the IAM role curl http://169.254.169.254/latest/meta-data/iam/security-credentials/examplerole
use example policy Please use the policy below
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ecr:PutLifecyclePolicy",
"ecr:PutImageTagMutability",
"ecr:StartImageScan",
"ecr:CreateRepository",
"ecr:PutImageScanningConfiguration",
"ecr:UploadLayerPart",
"ecr:BatchDeleteImage",
"ecr:DeleteLifecyclePolicy",
"ecr:DeleteRepository",
"ecr:PutImage",
"ecr:CompleteLayerUpload",
"ecr:StartLifecyclePolicyPreview",
"ecr:InitiateLayerUpload",
"ecr:DeleteRepositoryPolicy"
],
"Resource": "arn:aws:ecr:us-east-1:<aws-account-id>:repository/ec2-ecr-test"
},
{
"Effect": "Allow",
"Action": "ecr:GetAuthorizationToken",
"Resource": "*"
},
{
"Effect": "Allow",
"Action": "ecr:BatchCheckLayerAvailability",
"Resource": "arn:aws:ecr:us-east-1:<aws-account-id>:repository/ec2-ecr-test"
}
]
}
The login
aws ecr get-login-password --region region | docker login --username AWS --password-stdin aws_account_id.dkr.ecr.region.amazonaws.com
相關內容
- 已提問 6 個月前
- 已提問 1 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前