我正在尝试使用以下JSON配置为Amazon EC2上的postgres sql创建简单的任务:
{
"requiresAttributes": [],
"taskDefinitionArn": "arn:aws:ecs:us-east-1:870465292454:task-definition/Application:2",
"networkMode": "bridge",
"status": "ACTIVE",
"revision": 2,
"taskRoleArn": null,
"containerDefinitions": [
{
"volumesFrom": [],
"memory": 512,
"extraHosts": null,
"dnsServers": null,
"disableNetworking": null,
"dnsSearchDomains": null,
"portMappings": [
{
"hostPort": 5432,
"containerPort": 5432,
"protocol": "tcp"
}
],
"hostname": null,
"essential": true,
"entryPoint": null,
"mountPoints": [],
"name": "postgres",
"ulimits": null,
"dockerSecurityOptions": null,
"environment": [
{
"name": "POSTGRES_PASSWORD",
"value": "*******"
}
],
"links": [],
"workingDirectory": null,
"readonlyRootFilesystem": null,
"image": "postgres",
"command": null,
"user": null,
"dockerLabels": null,
"logConfiguration": null,
"cpu": 0,
"privileged": null,
"memoryReservation": null
}
],
"placementConstraints": [],
"volumes": [
{
"host": {
"sourcePath": "/var/lib/postgresql/data"
},
"name": "PGDATA"
}
],
"family": "Application"
}
但是当我尝试运行此任务时,我会从服务器获得“Unable to run task The validated string is empty
”作为响应。
有人可以帮我理解我在这里缺少的东西。
答案 0 :(得分:0)
错误消息非常有效......但在配置群集之前,我收到了此错误消息。确保在创建任务时选择了群集。