When I try to connect to the FARGATE container I have got this message error below
I tried many things, to add vpc endpoint but still the same error.
I also tried to "enable_execute_command = true # Enable execute command" in the task definition but this has no effect
aws ecs execute-command \
--cluster example-staging-app \
--task 07168b-mytaskid-a86f54b362e3 \
--container example-staging-app-Instance \
--interactive \
--command "/bin/bash" \
--region eu-west-1 \
--profile example-dev
The Session Manager plugin was installed successfully. Use the AWS CLI to start a session.
An error occurred (InvalidParameterException) when calling the ExecuteCommand operation: The execute command failed because execute command was not enabled when the task was run or the execute command agent isn’t running. Wait and try again or run a new task with execute command enabled and try again.
Any idea on connection to the Fargate container? Thanks
aws ecs update-service --cluster example-staging-app\ --service example-staging-app \ --region eu-west-1 \ --enable-execute-command \ --profile example-dev