roel_88036 - 12/12/2025, 12:47:19 PM
Hi All, I am using the remotion lambda. I use it together with python remotionclient. I would like to get the progress of the render currently going, but that's impossible.
Normally it is, but i changed invoke lambda a bit. I cannot wait until the lambda is finished, as the lambda is triggered within a request of my webapplication. For that i subclassed RemotionClient and created an invoke lambda function which triggers the lambda without having to wait for it
response: Dict[str, Any] = client.invoke( FunctionName=function_name, Payload=payload, # Async invocation InvocationType="Event" )
This works, however the lambda returns without yielding renderid, as it would normally do. In the same RemotionClient the renderId is required to get the progress get_render_progress. I wonder how that works, because you can never get the renderId progress before the render function is done.
What would be nice is if i somehow can get the renderId before the render finishes. For example, it could call my application API with the renderId on initialization of the lambda renderer. Currently the webhook only calls when it's done (according to the documentation) The LambdaStill has an oninit hook, which could be a nice idea for rendermediaonlambda as well.
What would be the best approach to get the renderId or render progress before it is finished rendering? (By the way, if it is useful and there is a nice solution to get this going i am happy to share the 'AsyncRemotionClient' python code.)
jonnyburger - 12/15/2025, 9:34:42 AM
thanks for raising this! I am not good at python, so you have to help me a bit finding the solution.
the regular flow does support getting the render id and then querying the progress, example: https://github.com/remotion-dev/remotion/blob/main/packages/lambda-python/testclient_render_media.py
so what I think you are asking for is the same thing as in this issue: remotion-dev/remotion#4610
my understanding is that currently, it is blocking, and you are trying to make it non-blocking? is that correct? just to first correctly understand the problem
roel_88036 - 12/15/2025, 10:17:49 AM
Hi Jonny, thanks for your response. No worries about python, I will help when necessary.
The question in that ticket is about making the library truly 'async', as in: the async/await programming pattern. Where you have async functions and all that. My idea is to still keep it 'sync'-style. Completely forget about the async/await stuff from here on.
Currently the lambda is triggered, a connection is kept open to AWS and when the lambda is finished the result of the javascript running in that function is returned. However, the application is blocked until that result is returned.
My idea is to instead of waiting for the lambda to return with the result, just trigger the lambda. Basically the current process then forgets about the lambda, not waiting for the result. It is not possible to reference the lambda to see what it is doing after returning. So to figure out what the lambda is doing, the javascript running in the lambda would need to call an endpoint to provide feedback. As currently a webhook does a call when the lambda is finished.
Not sure if the async approach from the ticket above would work for monitoring process, because for getting the progress, it also would need the renderId. Not sure if that would be returned before the render is completed. How does the npx command line util handle this? It triggers the lambda, and then how does it get progress updates? If it is possible, it could also work for me. Edit: i think the javascript npx tool invokes a lambda with a streaming response, to which the lambda then 'streams'/yields the renderId? https://docs.aws.amazon.com/lambda/latest/dg/configuration-response-streaming.html
roel_88036 - 12/28/2025, 6:18:40 PM
I tried using a boto3 Session object instead of passing the aws keys (legacy). And indeed: using a Session object makes it work as intended, it returns immediately with a render_id. Great! (But it means there might be an issue with the legacy way of connecting. Could also be my aws defaults are the issue, but not sure.)
jonnyburger - 12/16/2025, 7:38:07 AM
Currently the lambda is triggered, a connection is kept open to AWS and when the lambda is finished the result of the javascript running in that function is returned. However, the application is blocked until that result is returned.
the idea is not that render_media_on_lambda blocks until the render is done. running our example https://github.com/remotion-dev/remotion/blob/main/packages/lambda-python/testclient_render_media.py I am able to get the progress just fine! I think you are running into another issue