[Fixed] The difference between AWS Amplify and amazon-cognito-identity-js?

Issue

I’m reviewing this demo of how to integrate Cognito with Angular, and it amazon-cognito-identity-js for the authorization service.

It seems that is what we should be using, but other tutorials install AWS Amplify as a whole:

npm i aws-amplify

Curious what the difference is and whether one is more current than the other?

Solution

amazon-cognito-identity-js used to be a separate package specifically for Cognito. Recently they’ve been bundling all their SDKs into Amplify to streamline the integration process.

For instance in our iOS app the Cognito SDK had a number of issues that were resolved by moving to Amplify.

As you can see in the link below, this package is now maintained in the Amplify umbrella.

https://github.com/aws-amplify/amplify-js/tree/master/packages/amazon-cognito-identity-js

It used to be standalone here:

https://github.com/amazon-archives/amazon-cognito-identity-js

I would recommend going forward with Amplify as that is the direction that AWS development is headed internally, and amazon-cognito-identity-js is maintained as part of Amplify anyway.

Leave a Reply

(*) Required, Your email will not be published