Bug/AWS

[AWS Bug] 'cli-input-json': Invalid JSON received.

brightlightkim 2022. 3. 24. 03:19
root@BYUB-DM-7:/mnt/c/Users/k2289/repos/aws_cluster# aws ecs register-task-definition --cli-input-json ./fargate-task.json

Error parsing parameter 'cli-input-json': Invalid JSON received.

//In this case, you just need to add file:// in front of it.

root@BYUB-DM-7:/mnt/c/Users/k2289/repos/aws_cluster# aws ecs register-task-definition --cli-input-json file://fargate-task.json
{
    "taskDefinition": {
        "taskDefinitionArn": "arn:aws:ecs:us-east-1:843556918706:task-definition/sample-fargate:1",
        "containerDefinitions": [
            {
                "name": "fargate-app",
                "image": "public.ecr.aws/docker/library/httpd:latest",
                "cpu": 0,
                "portMappings": [
                    {
                        "containerPort": 80,
                        "hostPort": 80,
                        "protocol": "tcp"
                    }
: