By using AWS re:Post, you agree to the Terms of Use
/Is QLDB Document ID a globally unique UUID/

Is QLDB Document ID a globally unique UUID


In various places in the documentation the document ID is described as a unique identifier. e.g.

Is the document ID truly a GUID/UUID that uniquely identifies that document not only within a specific ledger, but across ALL possible ledgers?

Is the document ID safe to expose to the outside world as a truly unique identifier?

Will all document ID's be guaranteed to always be exactly 22 chars in length and match the regex


Is a document ID lexically sortable?

Can you describe the format and internal state of the document ID (perhaps compared to the various types of UUID as defined by RFC 4122? I can find no detailed description of this ID. It would be helpful for this to be defined in the documentation.


Edited by: glenn-truestamp on Jun 27, 2020 12:30 PM

Edited by: glenn-truestamp on Jun 27, 2020 12:33 PM

Edited by: glenn-truestamp on Jun 27, 2020 12:47 PM

asked 2 years ago16 views
3 Answers
Accepted Answer

Hi Glenn and thanks for your questions.

The IDs are 128 bit globally unique identifiers. We represent them in base 62, as you note. As long as the underlying value is a 128 bit UUID, the base 62 representation will be a string of 22 characters.

I'm not sure how to answer your sorting question. The sort order of the document ids has no semantic meaning, but obviously it is an operation you can do.

answered 2 years ago

Thanks Marc for answering my Twitter call. :-)

This would be useful info to include in the QLDB docs.

I asked about sorting as some UUID schemes (examples linked below) offer some form of natural time based ordering.

Sortable UUIDs:

Out of curiosity, can you say if the entirety of the 128bits represented in the UUID is purely random entropy? Or is there a time (or other) component mixed in there as well?

Is there a public library used to generate them?


Edited by: glenn-truestamp on Jul 6, 2020 10:19 AM

answered 2 years ago

Hi Glenn,

We'll get the docs fleshed out, thanks for that call out.

Also, thanks for the feature request around sortable document ids. I see a bunch of challenges there, but we'll get it on the backlog regardless!

As of right now, we're not willing to commit to the "UUID type" that we use, as we wish to leave ourselves free to change that (e.g. to implement the feature you just described). My recommendation to you is that you treat the ids as globally unique strings.

EDIT: new docs at

Edited by: marcbataws on Jul 9, 2020 8:40 PM

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions