2 Answers
- Newest
- Most votes
- Most comments
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
answered 2 years ago
0
not, this works not. My IAM role has these rigths > the same error.
answered 2 years ago
Relevant content
- asked 2 years ago
- asked 6 months ago
- asked a year ago
- asked 5 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago