https://prefect.io logo
Title
s

Samuel Hinton

03/06/2023, 12:07 PM
Hi all! Does anyone know what you need to do to actually make use of the ECS Task’s
stream_output
flag? Ive got
_stream_output_=True
and
_configure_cloudwatch_logs_=True
. The cloudwatch logs look fine (see the screenshot), but the stream_output flag doesnt seem to do anything. Im running the simple
command=["echo", "hello world"],
example right from the docs too, nothing fancy going on. I can confirm it has access to all three logs:CreateLogStream, logs:CreateLogGroup, and logs:PutLogEvents permissions, but the logs never actually appear in the prefect flows logs, which was what I was expecting. Does anyone know what I’m missing?
z

Zanie

03/06/2023, 5:45 PM
stream_logs
streams logs from the ECS task to standard output of the caller of the ECS task
It doesn’t connect it to the local flow run logger
s

Samuel Hinton

03/06/2023, 10:58 PM
Ah… is there a nice way to make it go to the flow run logger?
z

Zanie

03/06/2023, 10:59 PM
You could do it in a task with logging of prints enabled 😶 I think
Otherwise we could consider an interface for it
s

Samuel Hinton

03/08/2023, 12:07 AM
Adding the log prints kwarg to the flow made it all work nicely, thanks for the help Zanie 🙂