diff --git a/lib/schemas.ts b/lib/schemas.ts index b61b3e2..3e1656b 100644 --- a/lib/schemas.ts +++ b/lib/schemas.ts @@ -8,6 +8,7 @@ export const envStorageDriverSchema = type.or( 'AWS_ENDPOINT_URL?': 'string.url', 'AWS_ACCESS_KEY_ID?': 'string', 'AWS_SECRET_ACCESS_KEY?': 'string', + 'STORAGE_S3_SOCKET_TIMEOUT_MS': 'number = 10000', }, { STORAGE_DRIVER: type.unit('filesystem'), diff --git a/lib/storage.ts b/lib/storage.ts index d3c51ee..22a652b 100644 --- a/lib/storage.ts +++ b/lib/storage.ts @@ -527,7 +527,7 @@ class S3Adapter implements StorageAdapter { region: env.AWS_REGION, requestHandler: new NodeHttpHandler({ httpsAgent: agent, - socketTimeout: 3000, + socketTimeout: env.STORAGE_S3_SOCKET_TIMEOUT_MS, }), })