handle s3 responses generically