1

第一次,好久不见!

收到此错误:

An error occurred (InternalFailure) when calling the GetAuthorizationToken operation (reached max retries: 2): 

运行时:

aws ecr-public get-login-password --region us-west-2 --profile <IAM user profile>

IAM 用户附加了此政策(出于沮丧,这是非常宽容的;)):

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "sts:*",
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "ecr-public:*",
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor2",
            "Effect": "Allow",
            "Action": "ecr:*",
            "Resource": "*"
        }
    ]
}

以及具有信任策略的角色:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowIamUserAssumeRole",
      "Effect": "Allow",
      "Principal": {
        "AWS": "<ARN of IAM user>"
      },
      "Action": "sts:AssumeRole"
    },
    {
      "Sid": "AllowPassSessionTags",
      "Effect": "Allow",
      "Principal": {
        "AWS": "<ARN of IAM user>"
      },
      "Action": "sts:TagSession"
    }
  ]
}

该角色附加了“AmazonEC2ContainerRegistryFullAccess”和“AmazonElasticContainerRegistryPublicFullAccess”策略。

我在这里做错了什么?

4

1 回答 1

0

跑步aws ecr-public get-login-password --region us-east-1 --profile <IAM user profile>有效。希望这将在未来为某人节省一些痛苦。

于 2021-07-26T15:33:20.710 回答