Hello, Is there an option to enable_execute_comman...
# prefect-cloud
s
Hello, Is there an option to enable_execute_command in the tasks which prefect creates to run flows ?
k
I think you'd need to add
"enableExecuteCommand": true
on the
"task_run_request"
part of the ecs work pool's base job template
let me see if I can get it working and send an example
s
We tried it, but giving below error, may be we are adding it in the wrong place botocore.exceptions.ParamValidationError: Parameter validation failed: Unknown parameter in input: "enableExecuteCommand", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAccelerators, ephemeralStorage, runtimePlatform
Copy code
"task_run_request": {
        "launchType": "{{ launch_type }}",
        "cluster": "${ cluster }",
        "overrides": {
          "containerOverrides": [
            {
              "name": "{{ container_name }}",
              "command": "{{ command }}",
              "environment": "{{ env }}",
            "cpu": ${cpu},
            "memory": ${memory}
          }
        ],
		"enableExecuteCommand": true,
        "cpu": ${cpu},
        "memory": ${memory},
        "taskRoleArn": "{{task_role_arn}}"
      },
        "tags": "{{ labels }}",
        "taskDefinition": "{{ task_definition_arn }}"
      },
k
Copy code
"task_run_request": {
      "tags": "{{ labels }}",
      "cluster": "{{ cluster }}",
      "overrides": {
        "cpu": "{{ cpu }}",
        "memory": "{{ memory }}",
        "taskRoleArn": "{{ task_role_arn }}",
        "containerOverrides": [
          {
            "cpu": "{{ cpu }}",
            "name": "{{ container_name }}",
            "memory": "{{ memory }}",
            "command": "{{ command }}",
            "environment": "{{ env }}"
          }
        ]
      },
      "launchType": "{{ launch_type }}",
      "taskDefinition": "{{ task_definition_arn }}",
      "enableExecuteCommand": true,
      "capacityProviderStrategy": "{{ capacity_provider_strategy }}"
    },
looks like we added the same thing
I'm trying a run with it. still pending
s
Cool, I am running as well and will keep you posted
k
yep it ran ok for me
s
Nice, CI is still running so hopefully it works for us too 🤞
That works and thanks Kevin.
k
awesome!