https://prefect.io logo
#prefect-cloud
Title
# prefect-cloud
j

jack

04/18/2023, 8:58 PM
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

Ryan Peden

04/18/2023, 10:08 PM
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

jack

04/19/2023, 2:19 PM
That was it! Thanks
👍 1
r

Ryan Peden

04/19/2023, 2:19 PM
You're welcome! Glad to hear it worked.
2 Views