From 5bb43596ff08ebe9ac3da7381f39f613e05e0351 Mon Sep 17 00:00:00 2001 From: Jason Belich Date: Mon, 10 Feb 2020 23:11:29 -0800 Subject: [PATCH] support bucketNameKey in syncMetadata I get an error when deploying with the new bucketNameKey feature. this fixes it. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 4e4dd0f..e77007b 100644 --- a/index.js +++ b/index.js @@ -207,7 +207,7 @@ class ServerlessS3Sync { if (s.hasOwnProperty('acl')) { acl = s.acl; } - if (!s.bucketName || !s.localDir) { + if ((!s.bucketName && !s.bucketNameKey) || !s.localDir) { throw 'Invalid custom.s3Sync'; } const localDir = path.join(servicePath, s.localDir);