aws_iot: Cloud MQTT input error: -128

Hello,

I am receiving MQTT input error for my AWS IoT connection. Docs says it is an AWS policy problem here (https://nordicsemiconductor.github.io/asset-tracker-cloud-docs/saga/docs/devices/TroubleShooting.html#error-code-128)

My AWS Thing policy is as follows:

{
   "Version": "2012-10-17",
   "Statement": [{
         "Effect": "Allow",
         "Action": "iot:Connect",
         "Resource": "arn:aws:iot:us-west-1:account:client/*"
      },
      {
         "Effect": "Allow",
         "Action": "iot:Publish",
         "Resource": [
            "arn:aws:iot:us-west-1:account:topic/$aws/things/*/shadow/update",
            "arn:aws:iot:us-west-1:account:topic/$aws/things/*/shadow/delete",
            "arn:aws:iot:us-west-1:account:topic/$aws/things/*/shadow/get"
         ]
      },
      {
         "Effect": "Allow",
         "Action": "iot:Receive",
         "Resource": [
            "arn:aws:iot:us-west-1:account:topic/$aws/things/*/shadow/update/accepted",
            "arn:aws:iot:us-west-1:account:topic/$aws/things/*/shadow/delete/accepted",
            "arn:aws:iot:us-west-1:account:topic/$aws/things/*/shadow/get/accepted",
            "arn:aws:iot:us-west-1:account:topic/$aws/things/*/shadow/update/rejected",
            "arn:aws:iot:us-west-1:account:topic/$aws/things/*/shadow/delete/rejected"
         ]
      },
      {
         "Effect": "Allow",
         "Action": "iot:Subscribe",
         "Resource": [
            "arn:aws:iot:us-west-1:account:topicfilter/$aws/things/*/shadow/update/accepted",
            "arn:aws:iot:us-west-1:account:topicfilter/$aws/things/*/shadow/delete/accepted",
            "arn:aws:iot:us-west-1:account:topicfilter/$aws/things/*/shadow/get/accepted",
            "arn:aws:iot:us-west-1:account:topicfilter/$aws/things/*/shadow/update/rejected",
            "arn:aws:iot:us-west-1:account:topicfilter/$aws/things/*/shadow/delete/rejected"
         ]
      },
      {
         "Effect": "Allow",
         "Action": [
            "iot:GetThingShadow",
            "iot:UpdateThingShadow",
            "iot:DeleteThingShadow"
         ],
         "Resource": "arn:aws:iot:us-west-1:account:thing/*"

      }
   ]
}

Please advice if you see something wrong!

Thanks in advance.

``

Related