sunmingtao / sample-code

3 stars 4 forks source link

Fails to run task from command line: CannotPullContainerError: Error response from daem #261

Closed sunmingtao closed 3 years ago

sunmingtao commented 3 years ago

The command to run task:

aws ecs run-task --task-definition soccer-bet-task-def --cluster soccer-bet-cluster --count 1 --launch-type FARGATE --network-configuration "awsvpcConfiguration={subnets=[subnet-0fbe9b1e2d1a92cb9],securityGroups=[sg-045e5148ab9cc5d78]}" 
sunmingtao commented 3 years ago

I missed assignPublicIp=ENABLED in network-configuration

The complete command:

aws ecs run-task --task-definition soccer-bet-task-def --cluster soccer-bet-cluster --count 1 --launch-type FARGATE --network-configuration "awsvpcConfiguration={subnets=[subnet-0fbe9b1e2d1a92cb9],securityGroups=[sg-045e5148ab9cc5d78],assignPublicIp=ENABLED}"