Skip to content

Commit

Permalink
Merge pull request #47 from ibrasho-forks/s3-region
Browse files Browse the repository at this point in the history
Update beanstalk-deploy.js to support regional buckets
  • Loading branch information
Einar Egilsson authored May 6, 2021
2 parents ebe3476 + b73ba7d commit 75b5415
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions beanstalk-deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
});
Expand All @@ -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'},
Expand Down

0 comments on commit 75b5415

Please sign in to comment.