Skip to content

🎥 Make videos programmatically with React

allow all lambdas to be connected

Jonny Burger02212147abb5
diff --git a/packages/lambda/src/shared/aws-clients.ts b/packages/lambda/src/shared/aws-clients.ts
index 3a680e540f..3ec61a05dc 100644
--- a/packages/lambda/src/shared/aws-clients.ts
+++ b/packages/lambda/src/shared/aws-clients.ts
@@ -8,6 +8,7 @@ import {fromIni} from '@aws-sdk/credential-providers';
import {random} from 'remotion/no-react';
import type {AwsRegion} from '../pricing/aws-regions';
import {checkCredentials} from './check-credentials';
+import {MAX_FUNCTIONS_PER_RENDER} from './constants';
import {isInsideLambda} from './is-in-lambda';
const _clients: Partial<
@@ -223,6 +224,11 @@ export const getServiceClient = <T extends keyof ServiceMapping>({
: new Client({
region,
credentials: getCredentials(),
+ requestHandler: {
+ httpsAgent: {
+ maxSockets: MAX_FUNCTIONS_PER_RENDER + 50,
+ },
+ },
});
if (process.env.REMOTION_DISABLE_AWS_CLIENT_CACHE) {