Can't use execute-command --interactive in AWS CLI session manager
I'm trying to use the AWS cli + session manager plugin to get into a database container to run some migrations, and I am struggling to get it working. I'm trying to use the following command:
aws ecs execute-command --cluster {cluster} --task {task} --container {container} --interactive
--command "/bin/sh"
And the error message it gives me is: aws.exe: error: argument operation: Invalid choice, valid choices are:
along with a list of possible commands to use.
I've also tried running
aws ecs update-service --service {service} --cluster {cluster} --enable-execute-command
and it gives me the error Unknown options: --enable-execute-command
. I've also tried these commands with the region parameter included, but it gives me the same error messages. I've tried this all in a few different terminals - bash, powershell, and wsl.
I'm using AWS CLI version 2.0.27, and session manager plugin version 1.2.279.0. Does anyone know what I should try next?
AWS CLI 2.0.27 is 2 years old. You need to update it to get support for new options.