Call Device Shadow RestAPI and authenticate TLS mutual authentication with a client certificate.

0

https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-rest-api.html As mentioned in document above: The Device Shadow service accepts two forms of authentication: Signature Version 4 with IAM credentials or TLS mutual authentication with a client certificate. How can we get client certificate? Is it the one I downloaded when create thing in IOT Core?

질문됨 일 년 전239회 조회
1개 답변
0

Hi. Yes that is one way to get a client certificate (and associated private key). And the easiest way when you're getting started.

Note that a device will typically use the MQTT topics (not the REST API) to interact with shadows: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html

If you use one of our IoT Device SDKs, they have shadow support (on the MQTT topics) built-in: https://docs.aws.amazon.com/iot/latest/developerguide/iot-sdks.html#iot-device-sdks

profile pictureAWS
전문가
Greg_B
답변함 일 년 전
  • I am using postman to test API request to Device Shadow REST API. But got Forbidden error after config client certificate. If I using access keys and private keys, it works. Could you have any example using client certificate?

  • Here's how you do it with curl: https://docs.aws.amazon.com/iot/latest/developerguide/http.html

    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"
    

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인