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.
self.quiet = quiet
        if self.httpd:
            self.httpd.server_close()
            self.server_stopped = True
    @classmethod
    def create_ssl_cert(cls, serial_number=None):
        return generate_ssl_cert(SERVER_CERT_PEM_FILE, serial_number=serial_number)
    @classmethod
    def get_flask_ssl_context(cls, serial_number=None):
        if USE_SSL:
            combined_file, cert_file_name, key_file_name = cls.create_ssl_cert(serial_number=serial_number)
            return (cert_file_name, key_file_name)
        return None
def serve_flask_app(app, port, quiet=True, host=None, cors=True):
    if cors:
        CORS(app)
    if quiet:
        logging.getLogger('werkzeug').setLevel(logging.ERROR)
    if not host:
        host = '0.0.0.0'
    ssl_context = GenericProxy.get_flask_ssl_context(serial_number=port)
    app.config['ENV'] = 'development'
    def noecho(*args, **kwargs):
        pass
    click.echo = noecho
    app.run(port=int(port), threaded=True, host=host, ssl_context=ssl_context)
    return app