First class API for recursive directory uploads for S3
Describe the feature
Allow something like the current Upload utility, but for multiple files
Use Case
Currently, this is possible with AWS CLI
aws s3 cp local-dir s3://my-bucket
But there is no way to write this using JS SDK
Proposed Solution
Something like this would work
const myDir = 'path/to/dir';
new MultiUpload({
client: new S3Client(),
files: fs.readdirSync(myDir)
});
Other Information
No response
Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
SDK version used
3.637.0
Environment details (OS name and version, etc.)
n/a
Hi @just-boris - thanks for submitting this feature request.
I understand that this was raised internally and will be further discussed within JavaScript SDK team for potential implementation.
A few notes for reference:
- S3 Transfer Manager isn't currently available in JS SDK v3, at the moment. However,
@aws-sdk/lib-storagecan be used to recursively upload files from a directory. - This feature for recursive downloads is already available is available in AWS CLI and boto3: https://github.com/boto/s3transfer
- There is a similar open issue #5934 on the repository, but it is specifically for downloads.
The queued label has been added to this request for further discussion. To anyone that comes across this, feel free 👍🏽 on the original post and provide additional comments with your specific use case to aid in the consideration of this feature request.
Best, John