3 Answers
- Newest
- Most votes
- Most comments
0
Hi. I think you may have a problem with your IoT policy. Please review it. Please post it here if you're unsure.
https://docs.aws.amazon.com/iot/latest/developerguide/connect-and-pub.html
0
Thanks a lot. After having a closer look at my Policy, i figured out that the topic name in policy was incorrect. After correcting it is working fine.
For reference below is the Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "iot:Connect",
"Resource": "arn:aws:iot:ap-south-1:1234567890:client/${iot:Connection.Thing.ThingName}"
},
{
"Effect": "Allow",
"Action": "iot:Subscribe",
"Resource": "arn:aws:iot:ap-south-1:1234567890:topicfilter/esp8266/sub"
},
{
"Effect": "Allow",
"Action": "iot:Receive",
"Resource": "arn:aws:iot:ap-south-1:1234567890:topic/esp8266/sub"
},
{
"Effect": "Allow",
"Action": "iot:Publish",
"Resource": "arn:aws:iot:ap-south-1:1234567890:topic/esp8266/pub"
}
]
}
answered 3 years ago
0
I am using the same code but cannot get any readings.
See my console
Please help me.
answered 3 years ago
Relevant content
- asked 3 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 5 months ago
