I wrote a short test code in Java to upload a PDF file generated in memory. In this test code I just use a dummy byte array, but in the real use I will put a generated PDF (
I've looked the source code of AWS and debugged it and discovered the following:
In other words, to answer my own question, it's enough to listen for the exceptions because also the MD5 of the data uploaded is checked, so if there was a corruption an exception would be raised.
AmazonClientException and AmazonServiceException are unchecked exceptions, so it's important to remember to listen for them since the compiler won't force you to.