# Hive MQ “Invalid handshake response getStatus: 426 Upgrade Required” connecting to AWS

**URL:** <https://community.hivemq.com/t/hive-mq-invalid-handshake-response-getstatus-426-upgrade-required-connecting-to-aws/1480>\
**Category:** HiveMQ Client Library\
**Created:** [September 26, 2022, 3:51pm UTC](https://community.hivemq.com/t/hive-mq-invalid-handshake-response-getstatus-426-upgrade-required-connecting-to-aws/1480 "2022-09-26T15:51:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JonathanMason](https://avatars.discourse-cdn.com/v4/letter/j/ec9cab/32.png) [@JonathanMason](https://community.hivemq.com/u/JonathanMason)\
**Post date:** [September 26, 2022, 3:51pm UTC](https://community.hivemq.com/t/hive-mq-invalid-handshake-response-getstatus-426-upgrade-required-connecting-to-aws/1480/1 "2022-09-26T15:51:23Z")

</div>

I am trying to connect to an AWS MQTT broker/server using the Hive MQ client library for Android Studio (v1.3.0) with an AWS pre-signed URL.

```auto
implementation("com.hivemq:hivemq-mqtt-client:1.3.0")
implementation(platform("com.hivemq:hivemq-mqtt-client-websocket:1.3.0"))

```

The parameters I am using are shown below with the sensitive information removed:

```auto
host: xxx.amazonaws.com
path: /mqtt?X-Amz-Algorithm=xxx&X-Amz-Credential=xxx&X-Amz-Date=xxx&X-Amz-SignedHeaders=host&X-Amz-Signature=xxx

```

This is my latest attempt to connect:

```auto
MqttClient.builder()
    .identifier(UUID.randomUUID().toString())
    .serverHost(host)
    .webSocketConfig()
        .serverPath(path)
     .applyWebSocketConfig()
     .sslWithDefaultConfig()
     .useMqttVersion3()
     .build()

```

But when connecting, I get the error:

> com.hivemq.client.mqtt.exceptions.ConnectionFailedException: io.netty.handler.codec.http.websocketx.WebSocketHandshakeException: Invalid handshake response getStatus: 426 Upgrade Required

---

<div class="post-metadata">

**Author:** ![Hiben](https://avatars.discourse-cdn.com/v4/letter/h/f04885/32.png) [@Hiben](https://community.hivemq.com/u/Hiben)\
**Post date:** [May 2, 2024, 7:53am UTC](https://community.hivemq.com/t/hive-mq-invalid-handshake-response-getstatus-426-upgrade-required-connecting-to-aws/1480/2 "2024-05-02T07:53:11Z")

</div>

Hello. Is there is any solution for this problem? I got the same error with the version 1.3.3

---

<div class="post-metadata">

**Author:** ![Daria\_H](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@Daria\_H](https://community.hivemq.com/u/Daria_H)\
**Post date:** [June 14, 2024, 2:55pm UTC](https://community.hivemq.com/t/hive-mq-invalid-handshake-response-getstatus-426-upgrade-required-connecting-to-aws/1480/4 "2024-06-14T14:55:47Z")

</div>

Hi @Hiben ,

If you are still experiencing the issue, please feel free to share your project (repository) along with the following details:

1. Steps to build and execute the project.
2. Steps to test the scenario you described.

Reproducing the error on our end is essential for troubleshooting it effectively. This will help us provide a more accurate and timely solution to your problem.

Thank you!

Best regards,  
Dasha from the HiveMQ Team
