aws-sdk-mock icon indicating copy to clipboard operation
aws-sdk-mock copied to clipboard

AWS.setSDKInstance is not a function

Open ngocketit opened this issue 8 years ago • 4 comments

I'm trying to call AWS.setSDKInstance() as instructed but got the error:

TypeError: AWS.setSDKInstance is not a function

I notice that in the latest version (1.6.1) that I got with npm install, there is no such method in index.js while it's there on Github. Did you forget to update the version number?

ngocketit avatar Jan 07 '17 21:01 ngocketit

I am experiencing the same issue.

tnunes avatar Jan 10 '17 13:01 tnunes

The latest release seems to be 2 months old, while the PR to include the AWS.setSDKInstance was merged 3 weeks ago . Would it be possible to do a new release with the latest changes?

ecyshor avatar Jan 11 '17 11:01 ecyshor

+1

quantumew avatar Mar 16 '17 17:03 quantumew

+1 for release please

As a short term workaround you can

  1. clone the project
  2. navigate to the cloned project and run npm pack. This will create a aws-sdk-mock-1.6.1.tgz file in the project directory
  3. navigate to your project that depends on aws-sdk-mock and run npm install path/to/aws-sdk-mock-1.6.1-tgz

and your project will now have the latest and greatest aws-sdk-mock

or you can go to your your_project/node_modules/aws-sdk-mock/index.js and paste in the following underneath AWS.setSDK

AWS.setSDKInstance = function(sdk) {
  _AWS = sdk;
};

iwllyu avatar Mar 31 '17 20:03 iwllyu