From 173ec6f0f821851cafadaa95aa9a3da1e332daab Mon Sep 17 00:00:00 2001 From: Elliot DeNolf Date: Sun, 2 Apr 2023 13:21:54 -0400 Subject: [PATCH] feat: set bucket region in s3 storage client --- dev/.env.example | 1 + src/utilities/getStorageClient.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/dev/.env.example b/dev/.env.example index 15740abb84..f8af431df0 100644 --- a/dev/.env.example +++ b/dev/.env.example @@ -11,3 +11,4 @@ PAYLOAD_CLOUD_COGNITO_USER_POOL_ID= PAYLOAD_CLOUD_ENVIRONMENT= PAYLOAD_CLOUD_PROJECT_ID= PAYLOAD_CLOUD_COGNITO_PASSWORD= +PAYLOAD_CLOUD_BUCKET_REGION= diff --git a/src/utilities/getStorageClient.ts b/src/utilities/getStorageClient.ts index b93ef56326..61c1d6729c 100644 --- a/src/utilities/getStorageClient.ts +++ b/src/utilities/getStorageClient.ts @@ -42,6 +42,7 @@ export const getStorageClient: GetStorageClient = async () => { identityID = credentials.identityId storageClient = new AWS.S3({ + region: process.env.PAYLOAD_CLOUD_BUCKET_REGION, credentials, })