I am attempting to disable ECS Exec on a service, but cannot find any documentation on how to do so. Here are the commads i've tried:
aws ecs update-service --cluster <clustername> --service <servicename> --force-new-deployment --enable-execute-command false`
aws ecs update-service --cluster <clustername> --service <servicename> --no-enable-execute-command`
aws ecs update-service --cluster <clustername> --service <servicename> --enable-execute-command false
None of them are valid commands. The AWS documentation only shows how to enable the feature on a service. It shows how to disable it in a task definition. I'd like to be able to do it at the service level because I don't want to manually disable it on every task deployment.
I want to do this because I'm receiving the following error on task deployment:
service was unable to place a task because no container instance met all of its requirements. The closest matching container-instance is missing an attribute required by your task. For more information, see the Troubleshooting section of the Amazon ECS Developer Guide.
Running the attribute list shows that there are no missing attributes between the task and container.
Edit: For other travelers who end up here, This link provides information about the error message and how others figured out it's not always the attributes that cause it.
Running through each person's troubleshooting steps yielded no discrepancies in my set up. Checking each of the fields in the service description eventually led me to figuring out that it was the enable exec flag.
Per the documentation for the AWS CLI, the flags to disable ECS exec is --disable-execute-command
. Although, it is unclear why you think having ECS Exec enabled is the reason for the error you are receiving.