Moved TLS AWS fix into module from sync.js