11

Amazon Cognito is a user management and authentication service provided by Amazon through Amazon Web Services:

Amazon Cognito lets you easily add user sign-up and sign-in to your mobile and web apps. With Amazon Cognito, you also have the options to authenticate users through social identity providers such as Facebook, Twitter, or Amazon, with SAML identity solutions, or by using your own identity system. In addition, Amazon Cognito enables you to save data locally on users devices, allowing your applications to work even when the devices are offline. You can then synchronise data across users devices so that their app experience remains consistent regardless of the device they use.

What you are effectively doing is storing your customer data in a closed system hosted by Amazon. If you are a company, such as a social network, who's data represents a significant asset within your organisation how to you ensure that this data is protected from:

  • Amazon Cognito being shut down unexpectedly, i.e. at request from a law enforcement or government agency.
  • Your access keys being compromised and some or all records being corrupted.
  • The relationship between your organisation and Amazon breaking down to the point Amazon withdraws all services with immediate effect.

Amazon Cognito is a huge benefit to organisations and developers as it takes a particularly hard piece of software and makes it easy to implement; from a service operability perspective, we need to find ways to mitigate, remediate or accept risks to the companies assets at all times.

  • From a quick look to doc, I'd go with cognito streams to get a redshift backup usable elsewhere. – Tensibai Apr 13 '17 at 9:01
10

The Amazon Cognito streams feature can be used to backup data.

Currently, Amazon does not provide a solution to backup their Cognito user Pools. You can use the following NPM package called "cognito-backup":

Install:

npm install -g cognito-backup

Usage

cognito-backup backup-users <user-pool-id> <options>  Backup all users in a single user pool
cognito-backup backup-all-users <options>  Backup all users in all user pools for this account

Examples

cognito-backup backup-users eu-west-1_1_12345
cognito-backup backup-users eu-west-1_1_12345 --region eu-west-1 --file mypool.json
cognito-backup backup-all-users eu-west-1_1_12345 --region eu-west-1 --dir output

Source: https://www.npmjs.com/package/cognito-backup

  • 2
    Just a word of warning... Read to the bottom of those docs before you start using cognito-backup: "Todo: Implement restore". LOL – Chris Jaynes Mar 11 '18 at 23:52
  • 2
    Ability to restore the json file is already available: cognito-backup restore-users eu-west-1_12345 Abcd.1234 --file eu-west-1_12345.json – schystz Oct 17 '18 at 1:26
  • The passwords won't be in the backup, so I suppose the restore will require all the users to reset their password. – bananasplit Dec 14 '18 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.