Update connectAws.py

Added a try catch for exception handling