Closed dotCID closed 6 years ago
You are using the certificate credential instead of AWS key access, that is needed by SigV4 way of authentication used by the MQTT over websockets protocol.
Create a AWS KEY and AWS SECRET for your user and use it. http://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys
Since I've not been able to find sources on how to proceed, here's my current issue in hopes of resolve. Upon connecting to AWS IoT I receive a "400: Bad Request" from the IoT server. This happens as a response to the connection upgrade header sent out by the example. I have attempted to solve this by adjusting the AWS IoT policies, but had no success; editing the (public) key only resolved in a 403, which to me indicates that the verification is not the issue. It seems from the console output that it is related to the following lines in the response:
Any advice on how to process would be much appreciated!
The debug console output is as follows:
These messages repeat in the console indefinitely.
My sketch is based upon the example that comes with this library. My only alterations are the debugging instructions seen here, some
Serial.print
s and an altered MQTT message.I am currently using the following software versions and libraries: Arduino IDE: 1.6.11 esp8266 by ESPCommunity: 2.3.0 And the most recent versions of the dependencies as listed in the readme.md of this project.
As for hardware, I'm using an Adafruit Feather Huzzah, which is based upon an ESP8266-12S.
Below is the sketch with the WiFi and Amazon keys redacted: