From 9ffba7fdc621867d74bada203551bd268f55dd67 Mon Sep 17 00:00:00 2001 From: Max Redmond Date: Thu, 25 May 2017 13:45:27 -0400 Subject: [PATCH] adding check for deploymentBucketOptions to anohter part of the code --- lib/plugins/aws/deploy/lib/uploadArtifacts.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/plugins/aws/deploy/lib/uploadArtifacts.js b/lib/plugins/aws/deploy/lib/uploadArtifacts.js index a92cce804..55f344870 100644 --- a/lib/plugins/aws/deploy/lib/uploadArtifacts.js +++ b/lib/plugins/aws/deploy/lib/uploadArtifacts.js @@ -18,14 +18,16 @@ module.exports = { Body: body, ContentType: 'application/json', }; - if (this.serverless.service.provider.deploymentBucketOptions.sse){ - params.ServerSideEncryption = this.serverless.service.provider.deploymentBucketOptions.sse - } - if (this.serverless.service.provider.deploymentBucketOptions.sseKmsKeyId){ - params.SSEKMSKeyId = this.serverless.service.provider.deploymentBucketOptions.sseKmsKeyId - } - if (this.serverless.service.provider.deploymentBucketOptions.sseCustomerKey){ - params.SSECustomerKey = this.serverless.service.provider.deploymentBucketOptions.sseCustomerKey + if(this.serverless.service.provider.deploymentBucketOptions){ + if (this.serverless.service.provider.deploymentBucketOptions.sse){ + params.ServerSideEncryption = this.serverless.service.provider.deploymentBucketOptions.sse + } + if (this.serverless.service.provider.deploymentBucketOptions.sseKmsKeyId){ + params.SSEKMSKeyId = this.serverless.service.provider.deploymentBucketOptions.sseKmsKeyId + } + if (this.serverless.service.provider.deploymentBucketOptions.sseCustomerKey){ + params.SSECustomerKey = this.serverless.service.provider.deploymentBucketOptions.sseCustomerKey + } } return this.provider.request('S3', 'putObject',