feat(s3): use AWS SDK v2 TransferManager for copy task#684
feat(s3): use AWS SDK v2 TransferManager for copy task#684fdelbrayelle merged 13 commits intokestra-io:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the S3 Copy task from using the synchronous S3Client to the AWS SDK v2 TransferManager with S3AsyncClient, enabling automatic parallelization and multipart-aware copying for improved performance. The PR also fixes a critical bug where the KMS key ID field was defined but never actually applied when using AWS_KMS encryption.
Changes:
- Replaced synchronous
S3ClientwithS3AsyncClientandS3TransferManagerfor parallel copy operations - Fixed critical bug: KMS key ID is now properly applied when using AWS_KMS server-side encryption (lines 122-126)
- Improved error handling for the delete flag using
.orElse(false)instead of.orElseThrow()(line 143)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Hi @nancysangani 👋 Could you provide some screenshots showing how you tested it with AWS and Kestra UI please? |
|
Hi @fdelbrayelle, sure, I’ll add the screenshots of the tests and update the tests if needed. Will share them ASAP. |
|
Hi @fdelbrayelle, I tested this using a local setup with Kestra + LocalStack (S3) via Docker and verified the behavior through the Kestra UI. Testing with Kestra UI: Here is a screen recording showing the flow configuration in the Kestra UI and a successful execution: Video.Project.-.AWS.mp4Video.Project.-.AWS.Copy.mp4
Regarding test updates: No modifications to the test files were required. The migration from S3Client to S3TransferManager is an internal implementation change that doesn't affect the public API, so all existing tests pass without modification. |

Description
Implements AWS SDK for Java v2 TransferManager for S3 copy operations to improve performance through automatic parallelization and multipart-aware copying.
Changes
S3ClientwithS3AsyncClientandS3TransferManager.orElse(false)Performance Impact
Implementation Details
The TransferManager automatically handles:
Fixes
Closes #661