add debug statements to AWS errors