When executing:

```
s3AsyncClient.headBucket(HeadBucketRequest.builder()
                    .bucket("local-stack-test-bucket")
                    .build()).join();
```

We get this exception thrown (Java): java.util.concurrent.CompletionException: software.amazon.awssdk.services.s3.model.S3Exception: null (Service: S3, Status Code: 502, Request ID: null)

I narrowed this down to db4cddea4e4844c1241cca5ac22ecbde08e52064 and found the problem. PR incoming shortly.
import re
import os
import sys
import ssl
import json
import socket
import inspect
import logging
import traceback
import click
import requests
from ssl import SSLError
from flask_cors import CORS
from requests.structures import CaseInsensitiveDict
from requests.models import Response, Request
from six import iteritems
from six.moves.socketserver import ThreadingMixIn
from six.moves.urllib.parse import urlparse
from six.moves.BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from localstack.config import TMP_FOLDER, USE_SSL, EXTRA_CORS_ALLOWED_HEADERS, EXTRA_CORS_EXPOSE_HEADERS
from localstack.constants import ENV_INTERNAL_TEST_RUN, APPLICATION_JSON
from localstack.utils.common import FuncThread, generate_ssl_cert, to_bytes
QUIET = False
SERVER_CERT_PEM_FILE = '%s/server.test.pem' % (TMP_FOLDER)