aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.41k stars 2.11k forks source link

Amplify overrides AWS-SDK #2979

Closed aguilarcarlos closed 5 years ago

aguilarcarlos commented 5 years ago

Amplify overrides AWS-SDK

I'm using the services Cognito (Auth) and AWS Firehose on the client side, in an ES5 application.

The details are: I'm trying to use the amplify authentication, so far it works well, by doing:

awsAmplify.Auth.configure(config);
awsAmplify.Auth.signIn(username, password);

However, the problems start when I have to use a service from AWS-SDK, specifically Firehose, so if I include awsAmplify, this code does not work:

const fireHoseInstance = new AWS.Firehose({credentials});

I reviewed the code and I checked AWS-AMPLIFY overrides window.AWS namespace, so the question is: Can aws-sdk and aws-amplify be together?

elorzafe commented 5 years ago

@aguilarcarlos can you try on your import AWS from 'aws-sdk';

haverchuck commented 5 years ago

Closing this issue due to inactivity.

github-actions[bot] commented 3 years ago

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.