From 712dbfe742ea39d196967c77647e2e3ee70a6043 Mon Sep 17 00:00:00 2001 From: Sean Keenan Date: Tue, 10 Oct 2017 01:38:43 -0700 Subject: [PATCH] Changed import of AWS Pulled out the S3 dependency, and imported AWS directly from aws-sdk/global --- src/libs/awsLib.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/awsLib.js b/src/libs/awsLib.js index 196b4cb..25c5d72 100644 --- a/src/libs/awsLib.js +++ b/src/libs/awsLib.js @@ -1,4 +1,5 @@ -import AWS from "aws-sdk"; +import AWS from 'aws-sdk/global'; +import S3 from 'aws-sdk/clients/s3'; import { CognitoUserPool } from "amazon-cognito-identity-js"; import sigV4Client from "./sigV4Client"; import config from "../config"; @@ -51,7 +52,7 @@ export async function s3Upload(file) { throw new Error("User is not logged in"); } - const s3 = new AWS.S3({ + const s3 = new S3({ params: { Bucket: config.s3.BUCKET }