Hello, I’m reposting an issue i’m having as I have...
# ask-community
a
Hello, I’m reposting an issue i’m having as I have not been able to resolve. I have created a deployment using an ECStask block. The ECStask block is configured to run an existing task definition. When I try to run the deployment I get the following error: Submission failed. KeyError: "No class found for dispatch key 'ecs-task' in registry for type 'Block'." This error shows up under details of the flow run but there are no other logs. I already tried registering the block again. cc: @Taylor Curran
1
z
It sounds like
prefect-aws
isn’t installed on your agent.
a
I followed these instructions to set up the agent https://github.com/PrefectHQ/prefect-recipes/tree/main/devops/infrastructure-as-code/aws/cli-prefect2-ecs-agent. How do I validate prefect-aws is installed and install?
EXTRA_PIP_PACKAGES
with a value of
"prefect-aws"
cc @George Coyne might make sense to have this be a default
🧠 1
a
Thanks!
@James Gatter
j
Hi @Zanie does this method still work? my definition contains:
Copy code
{
    "taskDefinitionArn": "arn:aws:ecs:us-east-1:<My account ID>:task-definition/cyflows:18",
    "containerDefinitions": [
        {
            "name": "cyflows",
            "image": "prefecthq/prefect:2.7.12-python3.9",
            "cpu": 0,
            "links": [],
            "portMappings": [],
            "essential": true,
            "entryPoint": [
                "bash",
                "-c"
            ],
            "command": [
                "prefect agent start -q cyflows"
            ],
            "environment": [
                {
                    "name": "EXTRA_PIP_PACKAGES",
                    "value": "prefect-aws"
                },
                ...
but it seems the agent does not have prefect-aws installed, outputting the same error.