If you do a full backup of local and restore to the cloud then you should have the same uids.
I know when they launched the namespaces in the cloud I had this same concern and I copied all uids for existing nodes to an xid field but when the support migrated my instance they were able to keep all my same uids in tact.