Closed matwerber1 closed 5 years ago
So, with the assistance of @wizage, found that aws-amplify (v 1.1.36) installed in a clean project (e.g. npm init, npm install aws-amplify) using aws-sdk 2.474.0 worked fine. It was only in an environment from npm create react-app test
+ amplify init
where the issue arises.
On top of that, changing var rdsdataservice = new AWS.RDSDataService({apiVersion: '2018-08-01'});
to var rdsdataservice = require('aws-sdk/clients/rdsdataservice');
gets the Amplify project working.
I was mistaken in thinking that the aws-sdk dependency needed to be updated to 2.474.0. In any case, still not sure why the fix above was needed, but ok to close this issue unless you want to further investigate.
@matwerber1 Sounds good, I will close this then. Glad you got it solved!
@sammartinez is there a simple way of forcing a newer version of the SDK?
@jkeys-ecg-nmsu are you looking for an SDK version higher than 2.518.0? We do pin it based on breaking changes that can cause issues to Amplify. But Im going to cut an issue to see about updating the aws-sdk version in our core package.
@sammartinez yes, we would like to use the Kinesis Video Streams WebRTC integration, which requires at least 2.585.0.
Thank you for tagging the request.
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels or Discussions for those types of questions.
Which Category is your question related to? Amplify, Aurora Serverless
What AWS Services are you utilizing? Amplify, Aurora Serverless
Provide additional details e.g. code snippets
When attempting this:
I receive this error:
TypeError: AWS.RDSDataService is not a constructor
a
console.log(AWS.VERSION)
shows2.474.0
, which does not contain the RDSDataService; I'm trying to force a dependency update to2.518.0
.In my project root, I navigate to
./node-modules/@aws-amplify/core/package.json
and update dependencies to:Then I run
npm install
in that directory. I then navigate to the project root, delete the root./package.json
, and runnpm shrinkwrap
, which createsnpm-shrinkwrap.json
and verify it contains:My understanding is that this should work, but my project continues to show
2.474.0
fromconsole.log(AWS.VERSION)
.Can you advise on how I can force a newer aws-sdk version? Understood that I could use GraphQL/AppSync to interact with Aurora Serverless but for the project I'm working on I'd like to make the API call directly from the browser using Cognito federated identities.