make awsclient thread safe