Building S3 commands monadically, generalizing AWS functionality to type classes