aws / aws-iot-device-sdk-python

SDK for connecting to AWS IoT from a device using Python.
Apache License 2.0
683 stars 426 forks source link

AWSIoTPythonSDK.exception.AWSIoTExceptions.DiscoveryDataNotFoundException #190

Closed jovelcjose closed 4 years ago

jovelcjose commented 5 years ago

I am trying to run basicdiscovery.py from my windows machine, my green grass core is installed within Raspberry, and i have attached 2 devices to the green grass group.

when i run the basicdiscovery.py with thingName HelloWorld_publisher, I get the following error.

AWSIoTPythonSDK.exception.AWSIoTExceptions.DiscoveryDataNotFoundException

Python version in windows is 3.7.1

JonathanHenson commented 5 years ago

Most likely, this is an authorization issue. Services will often return a 404, not because the resource doesn't exist but because you are not authorized to access the resource. Can you verify the policy your credentials are using?

abawchen commented 5 years ago

@JonathanHenson :

Same issue here, and policy as follows:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "iot:Publish",
        "iot:Subscribe",
        "iot:Connect",
        "iot:Receive"
      ],
      "Resource": [
        "*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "greengrass:*"
      ],
      "Resource": [
        "*"
      ]
    }
  ]
}
abawchen commented 5 years ago

I solved this one by To manually enter the endpoint section in https://docs.aws.amazon.com/en_us/greengrass/latest/developerguide/test-comms.html?shortFooter=true#corp-network-manual-detection since I am on corporate network.

github-actions[bot] commented 4 years ago

Greetings! Sorry to say but this is a very old issue that is probably not getting as much attention as it deservers. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to open a new one.