- 최신
- 최다 투표
- 가장 많은 댓글
Not a silly question at all. There are multiple endpoints for interacting with AWS IoT Core. If you are trying to interact with devices on the data plane endpoint, you want to use your custom service endpoint, which can be fetched with aws iot describe-endpoint --endpoint-type iot:Data-ATS
. The endpoint returned is what you would plug into Postman as the base URL.
The example in the last part of your post references "wireless-devices" though, which makes me wonder if you are trying to interact with devices connected through AWS IoT Core for LoRaWAN. This service uses separate endpoints for control plane and data plane, which can be found here: https://docs.aws.amazon.com/general/latest/gr/iot-core.html#iot-wireless_region.
Finally, the question about the custom domain configuration should work with Postman once you set up a custom domain, but please note that the only service endpoint you can setup with a custom domain is the AWS IoT Core data plane endpoint. This doesn't work with the AWS IoT Core control plane, other data plane endpoints like Jobs or CredentialProvider, or other data endpoints like the AWS IoT Core for LoRaWAN endpoint mentioned above.
I found a post on Stack Overflow that has some notes on using Postman to connect here: https://stackoverflow.com/questions/52814373/http-post-to-aws-iot
(For other readers, the best place to start for an introduction to AWS IoT Core endpoints is here.)
There are no silly questions at re:Post ;) Let me disambiguate the concept of "endpoint" in AWS ioT a bit.
AWS IoT Core for LoRaWAN control plane API endpoints : these ones are what you most probably need to use based on the example you provided
You can find an overview of endpoints for AWS IoT API for control plane here: https://docs.aws.amazon.com/general/latest/gr/iot-core.html#iot-wireless_region
You can find APIs for IoT Wireless here: https://docs.aws.amazon.com/iot-wireless/2020-11-22/apireference/API_Operations.html, e.g. take a look at https://docs.aws.amazon.com/iot-wireless/2020-11-22/apireference/API_ListWirelessDevices.html
If using postman, you should combine the control plane endpoint and the API call: GET https://api.iotwireless.us-east-1.amazonaws.com/wireless-devices
You should also use Postman's AWS authentication capabilities: https://learning.postman.com/docs/sending-requests/authorization/#aws-signature
As a side remark, when developing applications using one of our SDK https://aws.amazon.com/tools/ is a recommended approach to interact with AWS IoT control plane APIs. You could also use AWS CLI e.g.
aws iotwireless list-wireless-devices
** AWS IoT Core Data plane endpoints for MQTT and HTTP ingestion**
Please note that the above approach applies to the control plane APIs. AWS IoT Core also offers endpoints like abcddef-ats.iot.us-east-1.amazonaws.com. There are data plane endpoints for the protocols you see here: https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html. Because you are using AWS IoT core for LoRaWAN, these endpoints are not relevant for your solution. If you ever want to use data plane endpoints to publish via HTTPS, you would say:
aws iot describe-endpoint --endpoint-type iot:Data-ATS
curl --tlsv1.2 \
--cacert Amazon-root-CA-1.pem \
--cert device.pem.crt \
--key private.pem.key \
--request POST \
--data "{ \"message\": \"Hello, world\" }" \
"https://IoT_data_endpoint:8443/topics/topic?qos=1"
Details are here: https://docs.aws.amazon.com/iot/latest/developerguide/http.html
** AWS IoT core for LoRaWAN LNS and CUPS endpoints**
To make it complete, AWS IoT core for LoRaWAN offers endpoints for your LoRaWAN gateway to connect, you will find more info here
https://docs.aws.amazon.com/iot-wireless/2020-11-22/apireference/API_GetServiceEndpoint.html
To get CUPS or LNS endpoints using AWS CLI, you could call:
aws iotwireless get-service-endpoint
Terrific thank you both. Was able to get it working with both of your answers!
관련 콘텐츠
- AWS 공식업데이트됨 3년 전