question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connecting over websockets without root CA?

See original GitHub issue

Is it possible to connect without a root CA, using only an access key id and secret access key?

from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient

clientId = "my-client-id"
clientEndpoint = "my-client-endpoint"
accessKeyId = "my-access-key-id"
secretAccessKey = "my-secret-access-key"

myAWSIoTMQTTClient = AWSIoTMQTTClient(clientId, useWebsocket=True)
myAWSIoTMQTTClient.configureEndpoint(clientEndpoint, 443)
myAWSIoTMQTTClient.configureIAMCredentials(accessKeyId, secretAccessKey)
myAWSIoTMQTTClient.connect()

Should the above code work? It throws “AWSIoTPythonSDK.exception.AWSIoTExceptions.connectTimeoutException” with no other errors.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
rccarpercommented, Jun 8, 2020

For security reasons, if the above change fixes your issue, we do recommend trying to narrow down the policy to only the necessary permissions.

0reactions
delijaticommented, Jun 3, 2020

This solved it for us https://github.com/aws/aws-iot-device-sdk-python/issues/167#issuecomment-430675269 ->

iot:connect permissions?

{
    "Version": "2012-10-17",
    "Statement": [
        ... # more permissions
        {
            "Effect": "Allow",
            "Action": [
                "iot:*"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}   
Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - WebSocket secure connection self signed certificate
Add the Certificate Authority's public root certificate into Windows hosts ... Sign the custom-made certificate with the Windows CA server.
Read more >
Secure WebSocket and HTTPS - Crossbar.io
To configure a WebSocket transport for TLS, include a tls dictionary with (mandatory) attributes key and certificate in your transport configuration.
Read more >
Set up Secure WebSocket for Remote Connections
You might want to host a node on one server and then connect to it from a UI hosted on another, e.g. Polkadot-JS...
Read more >
Can't connect to WSS/SSL websocket server with a self ...
No Patrick. I'm not talking about a "failed resource". I'm talking about a self signed LOCAL resource. The fact that it's local should...
Read more >
Using MQTT Over WebSockets with Mosquitto
The client and server connect using http and then negotiate a connection upgrade to websockets, the connection then switches from http to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found