Support for sorting in Amazon Web Services (AWS) sucks. A lot. AWS has different types of sorts that you can perform based on the type of product for which you are looking. For example, you can sort by age range for toys, or Artist A-Z for music. That's not the part that sucks.
What sucks is that AWS uses different values for the exact same sort type across search indices. Take, for instance, sorting by price. The value to sort low to high by price for apparel is 'pricerank'. The opposite sort value is 'inverseprice'. Not bad.
However, the exact same sort types for DVDs are 'price' and '-price'. Such variations occur throughout the product set, for no good reason that I can fathom. There are 24 different values for about half a dozen concepts. It is maddening.
It gets worse. I can find no way to return these values programmatically from the web service. That means I must code by hand some kind of unholy array of sort types based on the AWS API documentation (which I have done; contact me if you need it). If Amazon ever changes the values (to a saner system), I'll have to update my array by hand. Crazy.
Update: Jeff Barr of the AWS blog chimed in with the comment that he'd funnel my gripes to the ECS team (ECS means E-Commerce Service). Jeff's comment reminds me that, behind each product, there are designers and engineers who care about that product. I appreciate their passion. Thanks, Jeff.