From 8642c89d041e7f43982ba2622957dcaede974dd9 Mon Sep 17 00:00:00 2001 From: Schnitzel Date: Wed, 20 Feb 2019 17:54:36 -0500 Subject: [PATCH] allow to define region for S3 --- services/api/src/clients/aws.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/api/src/clients/aws.js b/services/api/src/clients/aws.js index 45f599dbd8..7bca65f009 100644 --- a/services/api/src/clients/aws.js +++ b/services/api/src/clients/aws.js @@ -7,6 +7,7 @@ const s3Host = R.propOr('http://docker.for.mac.localhost:9000', 'S3_HOST', proce const accessKeyId = R.propOr('minio', 'S3_ACCESS_KEY_ID', process.env); const secretAccessKey = R.propOr('minio123', 'S3_SECRET_ACCESS_KEY', process.env); const bucket = R.propOr('lagoon-files', 'S3_BUCKET', process.env); +const s3Region = R.propOr('', 'S3_REGION', process.env); const s3 = new AWS.S3({ endpoint: s3Host, @@ -14,6 +15,7 @@ const s3 = new AWS.S3({ secretAccessKey, s3ForcePathStyle: true, signatureVersion: 'v4', + region: s3Region, }); module.exports = {