-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implement Lambda Python SDK payload compression for large input props #5384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Co-authored-by: JonnyBurger <[email protected]>
@copilot Instead of accepting a bucket name, get the first bucket that matches or create one if necessary. Use the same logic as in the JS SDK (
|
Co-authored-by: JonnyBurger <[email protected]>
Updated the Python SDK to use the same auto-discovery bucket logic as the JS SDK. Removed the |
This PR implements S3 payload compression in the Lambda Python SDK to handle large input props, bringing feature parity with the JavaScript SDK.
Problem
Previously, the Python SDK would throw an error when input props exceeded AWS Lambda payload limits:
The JavaScript SDK already had logic to automatically upload large payloads to S3 and pass them as
{type: 'bucket-url', hash: string, bucketName: string}
instead of{type: 'payload', payload: string}
.Solution
Implemented the same compression logic in the Python SDK:
Key Changes
Added S3 compression functionality in
remotionclient.py
:bucket-url
format for large payloads,payload
format for small onesEnhanced RemotionClient constructor with new optional parameters:
bucket_name
: Specify custom S3 bucket for large payloadsforce_path_style
: Enable path-style S3 URLsAdded comprehensive tests to verify:
Updated test client with large payload example
Updated documentation to reflect the new capability available from v4.0.315
Example Usage
Backward Compatibility
Testing
Fixes #5383.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.