Skip to content

Commit 833d495

Browse files
hickeydh-awsrycerrat
authored andcommitted
fix(asea): batch s3 mapping writes
1 parent 3adfb57 commit 833d495

File tree

1 file changed

+6
-0
lines changed
  • source/packages/@aws-accelerator/accelerator/utils

1 file changed

+6
-0
lines changed

source/packages/@aws-accelerator/accelerator/utils/app-utils.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,13 @@ export async function writeImportResources(props: {
10071007
s3Promises.push(...nestedStackPromises);
10081008
}
10091009
}
1010+
// Batch S3 writes to max socket size
1011+
if (s3Promises.length > 49) {
1012+
await Promise.all(s3Promises);
1013+
s3Promises.length = 0;
1014+
}
10101015
}
1016+
await Promise.all(s3Promises);
10111017
}
10121018

10131019
async function handleMapping(mapping: ASEAMapping) {

0 commit comments

Comments
 (0)