From b73ba7d74eb4c8ee6d9b4b7cc5c040367c697567 Mon Sep 17 00:00:00 2001 From: Ibrahim AshShohail Date: Tue, 6 Oct 2020 22:17:24 +0300 Subject: [PATCH] Update beanstalk-deploy.js --- beanstalk-deploy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beanstalk-deploy.js b/beanstalk-deploy.js index 007ad1b..c9b8707 100755 --- a/beanstalk-deploy.js +++ b/beanstalk-deploy.js @@ -22,7 +22,7 @@ function checkIfFileExistsInS3(bucket, s3Key) { return awsApiRequest({ service : 's3', - host: `${bucket}.s3.amazonaws.com`, + host: `${bucket}.s3.${awsApiRequest.region}.amazonaws.com`, path : s3Key, method: 'HEAD' }); @@ -42,7 +42,7 @@ function readFile(path) { function uploadFileToS3(bucket, s3Key, filebuffer) { return awsApiRequest({ service : 's3', - host: `${bucket}.s3.amazonaws.com`, + host: `${bucket}.s3.${awsApiRequest.region}.amazonaws.com`, path : s3Key, method: 'PUT', headers: { 'Content-Type' : 'application/octet-stream'},