😺
aws ecs execute-command の時に InvalidParameterException
コンテナの中身チラ見しようと思って aws ecs execute-command したらみたことないエラー。InvalidParameterException
aws ecs execute-command --profile xxx --region ap-northeast-1 --cluster xxx-cluster --task xxx --container xxx-container --interactive --command "/bin/bash"
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.
enableExecuteCommand → true だし、
IAMの権限的にも不足するところはなさそう。
タスク定義の readonlyRootFilesystem を true → false にしたら入れた!
aws ecs execute-command --profile xxx --region ap-northeast-1 --cluster xxx-cluster --task xxx --container xxx-container --interactive --command "/bin/bash"
The Session Manager plugin was installed successfully. Use the AWS CLI to start a session.
Starting session with SessionId: ecs-execute-command-xxx
user@ip-xxx-xxx-xxx-xxx:/app#
Discussion