From d454914478fd2732e9f348018263e8de2a65c98a Mon Sep 17 00:00:00 2001 From: Shlok Amin Date: Thu, 24 Oct 2024 14:46:32 -0400 Subject: [PATCH] fix(scripts): set correct aws bucket region when deploying (#16598) --- scripts/deploy/promote-to-production.js | 3 ++- scripts/deploy/promote-to-staging.js | 3 ++- scripts/deploy/rollback.js | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/deploy/promote-to-production.js b/scripts/deploy/promote-to-production.js index 3d4c84680ac..56470ef305a 100644 --- a/scripts/deploy/promote-to-production.js +++ b/scripts/deploy/promote-to-production.js @@ -65,7 +65,8 @@ async function runPromoteToProduction() { } const s3Client = new S3Client({ apiVersion: '2006-03-01', - region: 'us-east-1', + region: + projectDomain === PROTOCOL_DESIGNER_DOMAIN ? 'us-east-1' : 'us-east-2', credentials: productionCredentials, }) diff --git a/scripts/deploy/promote-to-staging.js b/scripts/deploy/promote-to-staging.js index e8b0d91ea0c..6fdc9f60e40 100644 --- a/scripts/deploy/promote-to-staging.js +++ b/scripts/deploy/promote-to-staging.js @@ -76,7 +76,8 @@ async function runPromoteToStaging() { const s3WithCreds = new S3Client({ apiVersion: '2006-03-01', - region: 'us-east-1', + region: + projectDomain === PROTOCOL_DESIGNER_DOMAIN ? 'us-east-1' : 'us-east-2', credentials: stagingCredentials, }) console.log(`Promoting ${projectDomain} from sandbox to staging\n`) diff --git a/scripts/deploy/rollback.js b/scripts/deploy/rollback.js index 7012fb838d3..cf5e5174199 100644 --- a/scripts/deploy/rollback.js +++ b/scripts/deploy/rollback.js @@ -97,7 +97,8 @@ async function runRollback() { const s3Client = new S3Client({ apiVersion: '2006-03-01', - region: 'us-east-1', + region: + projectDomain === PROTOCOL_DESIGNER_DOMAIN ? 'us-east-1' : 'us-east-2', credentials: rollBackCredentials, })