Brandon T. Kowalski

08/26/2022, 9:19 PM
I am currently attempting to get a Hello World running on an Agent deployed on ECS started from the 2.0 Cloud UI. I have added a storage block in S3 and see that the CLI uploaded code there. When I go to run the Flow via the Deployment the Agent on ECS receives the job but immediately fails. CloudWatch reports the following and I can figure out how to proceed.
20:53:32.166 | INFO    | prefect.agent - Submitting flow run 'adf8ae6e-675d-40dd-8a32-078aecbc248b'
20:53:32.359 | ERROR   | prefect.agent - Failed to submit flow run 'adf8ae6e-675d-40dd-8a32-078aecbc248b' to infrastructure.

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/prefect/", line 200, in submit_run
    await self.task_group.start(submit_flow_run, flow_run, infrastructure)
  File "/usr/local/lib/python3.9/site-packages/anyio/_backends/", line 807, in start
    return await future
  File "/usr/local/lib/python3.9/site-packages/prefect/infrastructure/", line 47, in submit_flow_run
    infrastructure = _prepare_infrastructure(flow_run, infrastructure)
  File "/usr/local/lib/python3.9/site-packages/prefect/infrastructure/", line 35, in _prepare_infrastructure
    "env": {**base_flow_run_environment(flow_run), **infrastructure.env},
AttributeError: 'S3' object has no attribute 'env'
Any pointers?


08/26/2022, 9:32 PM
it looks like you passed an S3 storage block to the
(infra block) flag do you mind sharing your full
prefect deployment build

Brandon T. Kowalski

08/27/2022, 12:40 AM
Doh! That did it. Many thanks!
👍 1