I have not been able to connect to the MQTT broker referred to in post
#1 using websocket and suspect this is due to the "
authorized url where you make a websocket connection to the message broker" returned by the authorisation call containing a query string.
Format of the "authorised url" (with line feeds added to make the query parameters more visible) is:
wss://xxxxxxxxxxxxxxxxxx.amazonaws.com/mqtt?
X-Amz-Algorithm=AWS4-HMAC-SHA256&
X-Amz-Credential=xxxxxxxxxxxxxxxxxxxxxx&
X-Amz-Date=20210429T234727Z&
X-Amz-Expires=86400&
X-Amz-SignedHeaders=host&
X-Amz-Signature=xxxxxxxxxxxxxxxxxxxxxxxxx&
X-Amz-Security-Token=xxxxxxxxxxxxxxxxxxxxxxxxxxx%3D%3D
Should I be able to use the "authorised url" as is? If not, do I need to separate out the url components, given the example Python code (above) includes the urlparse function to do that as I understand it and then somehow use them with Connect2 or another method?