Using S3 versioning to sort PretzelBox emails
(tl;dr; — PretzelBox is a serverless inbox for AWS SES; emails in inboxes need to be LIFO sorted; sorting is done by leveraging S3 versioning)
Fundamentally, PretzelBox is an inbox for your domain.
The semantics of being an inbox dictate that emails be shown in descending order by date i.e., emails in inboxes are LIFO or equally, your inbox is a stack.
(The stack like behaviour of inboxes should give you a hint as to why we use the word STACK in our DSL::response)