繁体   English   中英

禁止:403 错误 aws 设备影子 REST API

[英]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

方法:获取

Header: header 通过 AWS 签名

访问密钥:“访问密钥” 秘密密钥:“秘密密钥”

execute-api 工作正常这是 API 响应 [ { "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

附截图: https://i.stack.imgur.com/luBMa.png

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/文档/api/latest/reference/services/iot-data.html#IoTDataPlane.Client.get_thing_shadow

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM