Kushal Kumar Thakur
Kushal Kumar Thakur

Reputation: 11

Forbidden: 403 error aws Device Shadow REST API

I use AWS IoT-core Device Shadow REST API I have created an IAM user role and give all access this is my API key and header and endpoint

URL: {{endpoint-url}}/things/thingName/shadow

Method: GET

Header: header pass with AWS signature

accessKey: "accessKey" secretKey: "secretKey"

execute-api working fine this is API response [ { "id": 1, "type": "dog", "price": 249.99 }, { "id": 2, "type": "cat", "price": 124.99 }, { "id": 3, "type": "fish", "price": 0.99 } ]

but my IoT-core Shadow REST API not working I follow this docs https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-rest-api.html

attached screenshot: https://i.sstatic.net/luBMa.png

Upvotes: 1

Views: 854

Answers (1)

Connor Goddard
Connor Goddard

Reputation: 635

I had the same issue, and the solution was to set the Service Name field in Postman AWS Signature settings used to sign the AWS Signature V4 auth header to iotdevicegateway as per the docs here: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iot-data.html#IoTDataPlane.Client.get_thing_shadow

enter image description here

Upvotes: 1

Related Questions