diff --git a/lib/s3-helpers.js b/lib/s3-helpers.js index 2c2bb22..238356f 100644 --- a/lib/s3-helpers.js +++ b/lib/s3-helpers.js @@ -2,9 +2,13 @@ const aws = require('aws-sdk'); /* Keep a global reference se we can override it with a mock for testing. */ -let s3 = new aws.S3(); +let s3 = null; function getInstance() { + if (!s3) { + s3 = new aws.S3(); + } + return s3; } diff --git a/package.json b/package.json index 8325449..9cf66b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kart", - "version": "0.6.1", + "version": "0.6.2", "description": "Kano Archive and Release Tool. Managing releases mainly of static websites.", "main": "lib/index.js", "bin": {