Getting `Submission failed. KeyError: 'env'` when ...
# prefect-cloud
j
Getting
Submission failed. KeyError: 'env'
when attempting a "Hello World" prefect flow on ECS Using the prefect-aws guide and using this invocation to build a deployment:
Copy code
prefect deployment build run.py:main \
    -n jack-test-1 \
    -ib ecs-task/ecs-block \
    -sb s3/flow-storage-block \
    --pool some-pool \
    --override env.EXTRA_PIP_PACKAGES=prefect-aws
1
Here is another thread where the same error was present. They seemed to get around it by specifying the
--override
elsewhere. But removing the
--override
from the above invocation leads to boto3 permissions errors.
r
I suspect this is because env is set to
None
in your
ecs-block
block right now. If you use the UI to set env to
{}
, and then try your deployment command again, does it work? It looks like the default for
env
is supposed to be an empty dict, which would prevent this from happening. But I just created a new ECS block and my env was None, which I believe will cause the problem you saw right about here when it tries to look up
env
in the block document.
💯 1
j
That was it! Thanks
👍 1
r
You're welcome! Glad to hear it worked.