From d4c7681a6c63008d8560a8fbe4640c3846cf8f6c Mon Sep 17 00:00:00 2001 From: Dean Mraz Date: Thu, 7 Nov 2019 16:28:00 -0800 Subject: [PATCH] reorder when profile gets configured --- index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 7699a67..9e64f11 100644 --- a/index.js +++ b/index.js @@ -15,18 +15,18 @@ function _list(opts) { let profile = opts.profile; let manifestKey = opts.manifestKey - let client = new AWS.S3({ - accessKeyId, - secretAccessKey, - region - }); - if (profile) { AWS.config.credentials = new AWS.SharedIniFileCredentials({ profile: profile }); } + let client = new AWS.S3({ + accessKeyId, + secretAccessKey, + region + }); + let listObjects = RSVP.denodeify(client.listObjects.bind(client)); let getObject = RSVP.denodeify(client.getObject.bind(client));