Iot Core: problem to connect my device

0

Hello, I am starting with AWS Iot Core. I use the MQTT protocol.

I did create my Device on the account, as well as its shadow and embedded the 3 certificates: AmazonRootCA1.pem, <MyDeviceName>.cert.pem, and <MyDeviceName>.private.key

When I try to connect, each of these certificates seems to be well recognized by my API functions, (I'm not using the AWS SDK, I'm using the Azure RTOS APIs... provided by my device's microcontroller manufacturer)

However the TLS session seems to start correctly, the "ClientHello" transaction seems to start well with a successful first handshake, but the connection breaks without me being able to find the reason.

Namely, my code was adapted for AWS IOT Core, because it originally worked for Azure IT Hub...

I hope someone here can help me?

Thanks in advance,

Best Regards, Eric F.

質問済み 1年前537ビュー
3回答
2
承認された回答

You need to check whether the policy attached to that certificate allows the device to perform the operation your code is doing on the necessary resources. Assuming you're publishing into a specific topic, the policy needs to allow an iot:Publish action on that topic (or covered by a wildcard).

profile pictureAWS
エキスパート
Tasio
回答済み 1年前
profile pictureAWS
エキスパート
レビュー済み 1年前
1

Hello Eric,

you should enable logging for IoT Core. Then you might find information about what happens in CloudWatch logs.

You should also validate the IoT policy attached to your device certificate. If the MQTT client violates this policy, for example by sending a not permitted client ID it will be disconnected.

Cheers,
Philipp

AWS
エキスパート
回答済み 1年前
0

Thank you both for your quick answers. I had not actually attached my certificates to the policy I created... Regards, Eric

回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン