0
votes

I'm trying to create an ECS task that runs 2 containers in the same network. I tried to update my cft to the following:

"EcsTask": {
        "Type": "AWS::ECS::TaskDefinition",
        "Properties": {
            "Family": "...",
            "NetworkMode": "bridge",
            "ContainerDefinitions": [
                {
                    "Name": "exampleA",
                    "Essential": "true",
                    "Image": "...",
                    "PortMappings": [
                        {
                            "HostPort": 8000,
                            "ContainerPort": 8000,
                            "Protocol": "tcp"
                        }
                    ],
                    "links": ["exampleB"],
                    "MemoryReservation": 256
                },
                {
                    "Name": "exampleB",
                    "Essential": "true",
                    "Image": "...",
                    "MemoryReservation": 256
                }
            ],
            "TaskRoleArn": "..."
        }
    }

But I run into the error UPDATE_FAILED Encountered unsupported property links. Is this the right way to go about creating two containers in the same network on ECS?

1

1 Answers

1
votes

You have only a small typo within your teamplate. The property needs to be called Links and not links :-)

Check the documentation for more details

(If you read the error message carefully you would have tackled this issue by your own)