Added error 500 message to aws.py