我正在尝试创建一个在同一网络中运行2个容器的ECS任务。我试图将我的cft更新为以下内容:
"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": "..."
}
}
但我遇到错误 UPDATE_FAILED遇到不支持的属性链接。这是在ECS上在同一网络中创建两个容器的正确方法吗?
答案 0 :(得分:0)