Thanks for changing the code to use the AWS CLI to backup. I almost had to move away from Virtualmin for this reason alone.
Im on centOS 6.6 and the python version is 2.6.6 (from @updates). Amazon's documentation indicates minimum python version of 2.7 to use AWS CLI. I installed it anyways, ran "aws --help" and it works. How do I know the backups are being done using aws from now on, instead of waiting for them to fail?