I recently finished adding support for idempotency tokens to amazonka (the unofficial Haskell AWS SDK), using the client token support provided by AWS. Implementing this required making some fairly substantial changes to the generator, the bespoke Haskell program that turns the service definitions in botocore into cabal packages. amazonka is over a decade old, and the generator has evolved as AWS have added new styles of APIs for their different services. Some services return XML, some return JSON, some return raw bytes, some return additional information in HTTP response headers, and so on. As a result, the generator’s logic had been extended each time and had grown gnarly.