Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    AWS IoT topic subscribe callback never called

    Scheduled Pinned Locked Moved Issues & Bugs
    2 Posts 1 Posters 41 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F Offline
      fausto.milletari
      last edited by fausto.milletari

      Hello,

      I am using AWS IoT and I am trying to subscribe to a topic using the package "simple" or the code in the AWS example on pycom website. The subscription seems to be successful and I expect my callback to be called when i publish messages to the topic I subscribed to. I am, of course, able to publish without issues but cannot subscribe.

      I am testing everything using AWS tools. The integrated web-based client and observing events about "things". When i subscribe, I can see trace of this subscription and the fact it was successful. When i publish, I see my messages in the relative topics.

      Although I am using "simple" right now, I have tried with both simple and the guide in the pycom documentation. I suspect at this point a misconfiguration from the side of AWS. This issue seems to be silent though. Subscription and publishing is successful! Receiving messages is not.

      I was wondering if somebody has some advice or some experience to share about this issue.

      Just to recap:
      Certificates are correct
      Endpoint is correct
      Connection is successful
      Publishing is successful
      Policy is correct (can subscribe to anything)
      Subscription is successful
      -> Receiving messages is not successful <-

      2747c45c-24d1-4a4f-95b2-4ca7a4d78f06-image.png
      any help is appreciated!

      1 Reply Last reply Reply Quote 0
      • F Offline
        fausto.milletari
        last edited by fausto.milletari

        OKAY!

        The problem has been solved by adding a receive policy to the group the thing belongs to.

        {
        "Effect": "Allow",
        "Action": [
        "iot:Receive"
        ],
        "Resource": [
        "*"
        ]
        }

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post

        Pycom on Twitter

        Pycom