Page updated Jan 16, 2024

Additional DataStore methods


To clear local data from DataStore, use the clear method:

1import { DataStore } from 'aws-amplify';
3await DataStore.clear();

If your app has authentication implemented, it is recommended to call DataStore.clear() on sign-in/sign-out to remove any user-specific data. This method is often important to use for shared device scenarios or where you need to purge the local on-device storage of records for security/privacy concerns.


To manually start the sync process, use the start method:

1import { DataStore } from 'aws-amplify';
3await DataStore.start();

Synchronization starts automatically whenever you run any of the following methods: DataStore.query(),, DataStore.delete(), or DataStore.observe().