I run the command to run my ecs task:
**aws ecs run-task --cluster tryimport --task-definition fromecr --network-configuration { security_groups: ["sg-e9bh4ab9"], subnets: ["subnet-0b170efc0b8f6f53b"]}
zsh: parse error near `}'**
What am i doing wrong?
Thanks to @luk3202, i corrected.
But as well, i had to specify the launch-type="FARGATE", see also: AWS ECS Error when running task: No Container Instances were found in your cluster
and also {"assignPublicIp": "ENABLED" ...
Thus in my example the solution is:
aws ecs run-task --cluster tryimport --task-definition fromecr:2 --launch-type="FARGATE" --network-configuration '{ "awsvpcConfiguration": { "assignPublicIp":"ENABLED, "securityGroups": ["sg-e9bd4ab9"], "subnets": ["subnet-0b170efc0b8f6f53b"]}}'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.