Posted On: Oct 21, 2021

AWS Amplify for JavaScript now supports pause, resume and cancel actions on file uploads to Simple Storage Service (Amazon S3) via the Amplify Storage category. Amplify provides a set of use-case oriented UI components, libraries and command-line tools to make it easy for frontend web and mobile developer to build AWS cloud backends for their apps. With this release, developers can create experiences where end-users can reliably upload very large files, including raw video and large productivity documents. Being able to resume uploads is particularly useful for handling scenarios where a user experiences network interruption during an upload.

The Amplify JS library will now automatically segment large files into 5Mb chunks, and upload them using the Amazon S3 Multipart upload process. This method allows chunks to be uploaded in any order, and individual chunks can be re-transmitted if their upload fails or times out. Developers are able to provide callback logic to control how and when re-transmits should be attempted.

We also improved Typescript type coverage for all of the Storage category functionality within Amplify. Previously, developers would not see auto-suggest options for the parameters which control interaction with Amazon S3 buckets, like file uploads and downloads. Now, web developers who use Typescript with a modern code editor will see suggestions, and detailed warnings when they attempt to use invalid values for function parameters.

Developers can get started with Resumable Uploads today by adding the Storage category to their Amplify projects.