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 }