From 4fc5f18e6d6b9b117c9ea5df5aa75a1080901e8a Mon Sep 17 00:00:00 2001 From: Chris Kalafarski Date: Tue, 9 Jun 2026 13:41:37 -0400 Subject: [PATCH 1/2] Use multipart copy for smaller files on ingest --- src/lambdas/ingest/source/aws-s3.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lambdas/ingest/source/aws-s3.js b/src/lambdas/ingest/source/aws-s3.js index 683bb0cf..14793163 100644 --- a/src/lambdas/ingest/source/aws-s3.js +++ b/src/lambdas/ingest/source/aws-s3.js @@ -130,7 +130,9 @@ export default async function main(event, artifact) { // S3 can perform a native copy of objects up to 5 GB using the CopyObject // API. For objects larger than 5 GB, a multi-part upload must be used. - if (head.ContentLength < 5000000000) { + // We use multi-part uploads for files over 50 MB + const MB = 10 ** 6; // 10^6 bytes = 1,000,000 B = 1 MB + if (head.ContentLength < 50 * MB) { // Copies an existing S3 object to the S3 artifact bucket. // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#copyObject-property // https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html From bcc4718df6ef9115fe56093203d286bac36d1516 Mon Sep 17 00:00:00 2001 From: Chris Kalafarski Date: Tue, 9 Jun 2026 13:45:11 -0400 Subject: [PATCH 2/2] Increase limit to 100 MB --- src/lambdas/ingest/source/aws-s3.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lambdas/ingest/source/aws-s3.js b/src/lambdas/ingest/source/aws-s3.js index 14793163..7c4ad5ba 100644 --- a/src/lambdas/ingest/source/aws-s3.js +++ b/src/lambdas/ingest/source/aws-s3.js @@ -130,9 +130,9 @@ export default async function main(event, artifact) { // S3 can perform a native copy of objects up to 5 GB using the CopyObject // API. For objects larger than 5 GB, a multi-part upload must be used. - // We use multi-part uploads for files over 50 MB + // We use multi-part uploads for files over 100 MB. const MB = 10 ** 6; // 10^6 bytes = 1,000,000 B = 1 MB - if (head.ContentLength < 50 * MB) { + if (head.ContentLength < 100 * MB) { // Copies an existing S3 object to the S3 artifact bucket. // https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#copyObject-property // https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html