gabakugik
@gabakugik (GABAKU GIK)

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

ECSでイメージを表示できない。

Q&A

Closed

解決したいこと

ECRでpushしたリポジトリーを表示させたい

発生している問題・エラー

タスクの停止時刻: 2025-02-01T12:53:46.157Z
ResourceInitializationError: unable to pull secrets or registry auth: execution resource retrieval failed: unable to retrieve ecr registry auth: service call has been retried 1 time(s): AccessDeniedException: User: arn:aws:sts::684591648795:assumed-role/ecsTaskExecutionRole/96aed41a2d90440b8b96765ca7ca2797 is not authorized to perform: ecr:GetAuthorizationToken on resource: * because no identity-based policy allows the ecr:GetAuthorizationToken action status code: 400, request id: b04f347d-21de-4e62-b6c4-f8ee38b8f6cbタスクの停止時刻: 2025-02-01T12:53:46.157Z
ResourceInitializationError: unable to pull secrets or registry auth: execution resource retrieval failed: unable to retrieve ecr registry auth: service call has been retried 1 time(s): AccessDeniedException: User: arn:aws:sts::684591648795:assumed-role/ecsTaskExecutionRole/96aed41a2d90440b8b96765ca7ca2797 is not authorized to perform: ecr:GetAuthorizationToken on resource: * because no identity-based policy allows the ecr:GetAuthorizationToken action status code: 400, request id: b04f347d-21de-4e62-b6c4-f8ee38b8f6cb

ロググループ /ecs/demo-cluster のログストリーム ecs/demo-repo/96aed41a2d90440b8b96765ca7ca2797 からのログの取得中にエラーが発生しました。
The specified log stream does not exist.

ENI の詳細の取得中にエラーが発生しました
The networkInterface ID 'eni-02b130cabb04de1e7' does not exist
{
    "taskDefinitionArn": "arn:aws:ecs:ap-northeast-1:684591648795:task-definition/demo-cluster:4",
    "containerDefinitions": [
        {
            "name": "demo-repo",
            "image": "684591648795.dkr.ecr.ap-northeast-1.amazonaws.com/demo-repo:latest",
            "cpu": 0,
            "portMappings": [
                {
                    "name": "demo-repo-80-tcp",
                    "containerPort": 80,
                    "hostPort": 80,
                    "protocol": "tcp",
                    "appProtocol": "http"
                }
            ],
            "essential": true,
            "environment": [],
            "environmentFiles": [],
            "mountPoints": [],
            "volumesFrom": [],
            "ulimits": [],
            "logConfiguration": {
                "logDriver": "awslogs",
                "options": {
                    "awslogs-group": "/ecs/demo-cluster",
                    "mode": "non-blocking",
                    "awslogs-create-group": "true",
                    "max-buffer-size": "25m",
                    "awslogs-region": "ap-northeast-1",
                    "awslogs-stream-prefix": "ecs"
                },
                "secretOptions": []
            },
            "systemControls": []
        }
    ],
    "family": "demo-cluster",
    "executionRoleArn": "arn:aws:iam::684591648795:role/ecsTaskExecutionRole",
    "networkMode": "awsvpc",
    "revision": 4,
    "volumes": [],
    "status": "ACTIVE",
    "requiresAttributes": [
        {
            "name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
        },
        {
            "name": "ecs.capability.execution-role-awslogs"
        },
        {
            "name": "com.amazonaws.ecs.capability.ecr-auth"
        },
        {
            "name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
        },
        {
            "name": "com.amazonaws.ecs.capability.docker-remote-api.1.28"
        },
        {
            "name": "ecs.capability.execution-role-ecr-pull"
        },
        {
            "name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
        },
        {
            "name": "ecs.capability.task-eni"
        },
        {
            "name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
        }
    ],
    "placementConstraints": [],
    "compatibilities": [
        "EC2",
        "FARGATE"
    ],
    "requiresCompatibilities": [
        "FARGATE"
    ],
    "cpu": "1024",
    "memory": "3072",
    "runtimePlatform": {
        "cpuArchitecture": "X86_64",
        "operatingSystemFamily": "LINUX"
    },
    "registeredAt": "2025-02-01T12:52:29.601Z",
    "registeredBy": "arn:aws:iam::684591648795:root",
    "enableFaultInjection": false,
    "tags": []
}

ちょっとどうしたらいいかわからないので、ここまで書きました。
ググってみたんですが、わかりませんでした。

0

No Answers yet.

Your answer might help someone💌