Now a days people with multiple mobile device is growing. These people might use their phone on the go and their tablet when they at home. Consequently, they now want to be able to seamlessly transition from one device to another.
AWS Cognito Sync functionality to synchronise user data across an end user’s devices.
Imagine your app allows end user to add or bookmark link/data. Your end user probably get frustrated if they don’t get their important bookmarks over when they switch device.
To fix this you want to synchronise the bookmarks using cognito sync so they can resume where they left off.

Creating an Identity Pool :

First step is to create an identity pool. An identity pool holds the user identities.Each end user has his/her identity.

In order to sync data across devices, your identity pool must support authenticated identities like Facebook,Twitter,Amazon,Google+.

Unauthenticated identities are device specific,So unless an end user authenticates,no data can be synced across devices.

Syncing Data :
Once you have installed and configured your development environment, you need to instantiate the Cognito credentials provider in your app.

We have created dataset.Now,How do we synchronize this data on another device? The process for accessing the data on another device is similar. Once you have opened your dataset and synchronized it, you can retrieve the value for a particular key like

Because Cognito stores all data locally , you can continue to interact with your data even when you are offline.Anything you put into dataset, you can retrieve it anytime even if the device is offline.