ECS CFT error: Encountered unsupported property links
ECS CFT error: Encountered unsupported property links
我正在尝试创建一个 ECS 任务,运行在同一网络中有 2 个容器。我尝试将我的 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 Encountered unsupported 属性 links。这是在 ECS 上的同一网络中创建两个容器的正确方法吗?
您的模板中只有一个小错字。 属性 需要被称为 Links
而不是 links
:-)
查看documentation了解更多详情
(如果您仔细阅读错误消息,您将自行解决此问题)
我正在尝试创建一个 ECS 任务,运行在同一网络中有 2 个容器。我尝试将我的 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 Encountered unsupported 属性 links。这是在 ECS 上的同一网络中创建两个容器的正确方法吗?
您的模板中只有一个小错字。 属性 需要被称为 Links
而不是 links
:-)
查看documentation了解更多详情
(如果您仔细阅读错误消息,您将自行解决此问题)